From dbbaac8ac360c5f4b6f3dc4bf731248e2666b059 Mon Sep 17 00:00:00 2001 From: Justin Wolf Date: Sun, 10 Dec 2023 21:16:42 -0600 Subject: [PATCH] modify zfs-get argument order for portability --- syncoid | 4 ++-- tests/syncoid/7_preserve_recordsize/run.sh | 10 +++++----- tests/syncoid/9_preserve_properties/run.sh | 16 ++++++++-------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/syncoid b/syncoid index 5ed00f0..02799d7 100755 --- a/syncoid +++ b/syncoid @@ -1357,9 +1357,9 @@ sub getlocalzfsvalues { if ($debug) { print "DEBUG: getting locally set values of properties on $fs...\n"; } my $mysudocmd; if ($isroot) { $mysudocmd = ''; } else { $mysudocmd = $sudocmd; } - if ($debug) { print "$rhost $mysudocmd $zfscmd get all -s local -H $fsescaped\n"; } + if ($debug) { print "$rhost $mysudocmd $zfscmd get -s local -H all $fsescaped\n"; } my ($values, $error, $exit) = capture { - system("$rhost $mysudocmd $zfscmd get all -s local -H $fsescaped"); + system("$rhost $mysudocmd $zfscmd get -s local -H all $fsescaped"); }; my %properties=(); diff --git a/tests/syncoid/7_preserve_recordsize/run.sh b/tests/syncoid/7_preserve_recordsize/run.sh index 3085b9b..9f7d7f4 100755 --- a/tests/syncoid/7_preserve_recordsize/run.sh +++ b/tests/syncoid/7_preserve_recordsize/run.sh @@ -32,17 +32,17 @@ zfs create -o recordsize=32k "${POOL_NAME}"/src/32 zfs create -o recordsize=128k "${POOL_NAME}"/src/128 ../../../syncoid --preserve-recordsize --recursive --debug --compress=none "${POOL_NAME}"/src "${POOL_NAME}"/dst -zfs get recordsize -t filesystem -r "${POOL_NAME}"/dst -zfs get volblocksize -t volume -r "${POOL_NAME}"/dst +zfs get -t filesystem -r recordsize "${POOL_NAME}"/dst +zfs get -t volume -r volblocksize "${POOL_NAME}"/dst -if [ "$(zfs get recordsize -H -o value -t filesystem "${POOL_NAME}"/dst/16)" != "16K" ]; then +if [ "$(zfs get -H -o value -t filesystem recordsize "${POOL_NAME}"/dst/16)" != "16K" ]; then exit 1 fi -if [ "$(zfs get recordsize -H -o value -t filesystem "${POOL_NAME}"/dst/32)" != "32K" ]; then +if [ "$(zfs get -H -o value -t filesystem recordsize "${POOL_NAME}"/dst/32)" != "32K" ]; then exit 1 fi -if [ "$(zfs get recordsize -H -o value -t filesystem "${POOL_NAME}"/dst/128)" != "128K" ]; then +if [ "$(zfs get -H -o value -t filesystem recordsize "${POOL_NAME}"/dst/128)" != "128K" ]; then exit 1 fi diff --git a/tests/syncoid/9_preserve_properties/run.sh b/tests/syncoid/9_preserve_properties/run.sh index 497ce9a..35f1bfa 100755 --- a/tests/syncoid/9_preserve_properties/run.sh +++ b/tests/syncoid/9_preserve_properties/run.sh @@ -33,34 +33,34 @@ zfs create -o recordsize=32k -o acltype=posixacl "${POOL_NAME}"/src/32 ../../../syncoid --preserve-properties --recursive --debug --compress=none "${POOL_NAME}"/src "${POOL_NAME}"/dst -if [ "$(zfs get recordsize -H -o value -t filesystem "${POOL_NAME}"/dst)" != "16K" ]; then +if [ "$(zfs get -H -o value -t filesystem recordsize "${POOL_NAME}"/dst)" != "16K" ]; then exit 1 fi -if [ "$(zfs get mountpoint -H -o value -t filesystem "${POOL_NAME}"/dst)" != "none" ]; then +if [ "$(zfs get -H -o value -t filesystem mountpoint "${POOL_NAME}"/dst)" != "none" ]; then exit 1 fi -if [ "$(zfs get xattr -H -o value -t filesystem "${POOL_NAME}"/dst)" != "on" ]; then +if [ "$(zfs get -H -o value -t filesystem xattr "${POOL_NAME}"/dst)" != "on" ]; then exit 1 fi -if [ "$(zfs get primarycache -H -o value -t filesystem "${POOL_NAME}"/dst)" != "none" ]; then +if [ "$(zfs get -H -o value -t filesystem primarycache "${POOL_NAME}"/dst)" != "none" ]; then exit 1 fi -if [ "$(zfs get recordsize -H -o value -t filesystem "${POOL_NAME}"/dst/16)" != "16K" ]; then +if [ "$(zfs get -H -o value -t filesystem recordsize "${POOL_NAME}"/dst/16)" != "16K" ]; then exit 1 fi -if [ "$(zfs get primarycache -H -o value -t filesystem "${POOL_NAME}"/dst/16)" != "none" ]; then +if [ "$(zfs get -H -o value -t filesystem primarycache "${POOL_NAME}"/dst/16)" != "none" ]; then exit 1 fi -if [ "$(zfs get recordsize -H -o value -t filesystem "${POOL_NAME}"/dst/32)" != "32K" ]; then +if [ "$(zfs get -H -o value -t filesystem recordsize "${POOL_NAME}"/dst/32)" != "32K" ]; then exit 1 fi -if [ "$(zfs get acltype -H -o value -t filesystem "${POOL_NAME}"/dst/32)" != "posix" ]; then +if [ "$(zfs get -H -o value -t filesystem acltype "${POOL_NAME}"/dst/32)" != "posix" ]; then exit 1 fi