diff options
-rw-r--r-- | .cirrus.yml | 2 | ||||
-rwxr-xr-x | runtests.sh | 2 | ||||
-rw-r--r-- | testsuite/chown.test | 7 | ||||
-rw-r--r-- | testsuite/devices.test | 14 | ||||
-rw-r--r-- | testsuite/xattrs.test | 13 |
5 files changed, 37 insertions, 1 deletions
diff --git a/.cirrus.yml b/.cirrus.yml index a8acc382..9d5f5a35 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -3,6 +3,8 @@ task: freebsd_instance: image: freebsd-12-1-release-amd64 prep_script: + - dd if=/dev/zero of=/tmp/zpool bs=1M count=1024 + - zpool create -m `pwd`/testtmp zpool /tmp/zpool - pkg install -y autotools xxhash zstd liblz4 openssl bash - ln -s /usr/local/bin/bash /bin/bash configure_script: diff --git a/runtests.sh b/runtests.sh index 536543f8..d5a174cb 100755 --- a/runtests.sh +++ b/runtests.sh @@ -249,7 +249,7 @@ prep_scratch() { [ -d "$scratchdir" ] && chmod -R u+rwX "$scratchdir" && rm -rf "$scratchdir" mkdir "$scratchdir" # Get rid of default ACLs and dir-setgid to avoid confusing some tests. - $setfacl_nodef "$scratchdir" || true + $setfacl_nodef "$scratchdir" 2>/dev/null || true chmod g-s "$scratchdir" case "$srcdir" in /*) ln -s "$srcdir" "$scratchdir/src" ;; diff --git a/testsuite/chown.test b/testsuite/chown.test index 1464c65a..3aec55a9 100644 --- a/testsuite/chown.test +++ b/testsuite/chown.test @@ -37,6 +37,13 @@ EOF done } ;; + freebsd*) + chown() { + own=$1 + shift + setextattr -h user "rsync.%stat" "100644 0,0 $own" "${@}" + } + ;; *) chown() { own=$1 diff --git a/testsuite/devices.test b/testsuite/devices.test index 908898c2..773c543f 100644 --- a/testsuite/devices.test +++ b/testsuite/devices.test @@ -50,6 +50,20 @@ echo "$mode $maj,$min 0:0" > rsync.%stat EOF } ;; + freebsd*) + mknod() { + fn="$1" + case "$2" in + p) mode=10644 ;; + c) mode=20644 ;; + b) mode=60644 ;; + esac + maj="${3:-0}" + min="${4:-0}" + touch "$fn" + setextattr -h user "rsync.%stat" "$mode $maj,$min 0:0" "$fn" + } + ;; *) mknod() { fn="$1" diff --git a/testsuite/xattrs.test b/testsuite/xattrs.test index 5931ffcd..59fe1601 100644 --- a/testsuite/xattrs.test +++ b/testsuite/xattrs.test @@ -45,6 +45,19 @@ EOF RSYNC_PREFIX='rsync' RUSR='rsync.nonuser' ;; +freebsd*) + xset() { + xnam="$1" + xval="$2" + shift 2 + setextattr -h user "$xnam" "$xval" "${@}" + } + xls() { + for f in "${@}"; do lsextattr -q -h user "$f" | tr '[[:space:]]' '\n' | sort | xargs -I % getextattr -h user % "$f"; done + } + RSYNC_PREFIX='rsync' + RUSR='rsync' + ;; *) xset() { xnam="$1" |