Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZTS: Use compatible arg order in tests #9228

Merged
merged 1 commit into from Aug 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ do
log_must zpool create $TESTPOOL $type $ZPOOL_DISKS \
special $stype $sdisks

ac_value="$(zpool get all -H -o property,value | \
ac_value="$(zpool get -H -o property,value all | \
egrep allocation_classes | nawk '{print $2}')"
if [ "$ac_value" = "active" ]; then
log_note "feature@allocation_classes is active"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ do
else
log_must zpool create $TESTPOOL $type $ZPOOL_DISKS
fi
ac_value="$(zpool get all -H -o property,value | \
ac_value="$(zpool get -H -o property,value all | \
egrep allocation_classes | awk '{print $2}')"
if [ "$ac_value" = "enabled" ]; then
log_note "feature@allocation_classes is enabled"
Expand All @@ -56,7 +56,7 @@ do
log_must zpool add $TESTPOOL special mirror \
$CLASS_DISK0 $CLASS_DISK1
fi
ac_value="$(zpool get all -H -o property,value | \
ac_value="$(zpool get -H -o property,value all | \
egrep allocation_classes | awk '{print $2}')"
if [ "$ac_value" = "active" ]; then
log_note "feature@allocation_classes is active"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ typeset -i cnt=0
typeset cmd
for cmd in ${pos_cmds[@]}; do
log_must zfs program $TESTPOOL $TESTZCP $TESTDS $cmd 2>&1
log_must zfs program $TESTPOOL -j $TESTZCP $TESTDS $cmd 2>&1
log_must zfs program -j $TESTPOOL $TESTZCP $TESTDS $cmd 2>&1
# json.tool is needed to guarantee consistent ordering of fields
# sed is needed to trim trailing space in CentOS 6's json.tool output
OUTPUT=$(zfs program $TESTPOOL -j $TESTZCP $TESTDS $cmd 2>&1 | python -m json.tool | sed 's/[[:space:]]*$//')
OUTPUT=$(zfs program -j $TESTPOOL $TESTZCP $TESTDS $cmd 2>&1 | python -m json.tool | sed 's/[[:space:]]*$//')
if [ "$OUTPUT" != "${pos_cmds_out[$cnt]}" ]; then
log_note "Got :$OUTPUT"
log_note "Expected:${pos_cmds_out[$cnt]}"
Expand All @@ -120,9 +120,9 @@ For the property list, run: zfs set|get
For the delegated permission list, run: zfs allow|unallow")
cnt=0
for cmd in ${neg_cmds[@]}; do
log_mustnot zfs program $TESTPOOL $TESTZCP $TESTDS $cmd 2>&1
log_mustnot zfs program $TESTPOOL -j $TESTZCP $TESTDS $cmd 2>&1
OUTPUT=$(zfs program $TESTPOOL -j $TESTZCP $TESTDS $cmd 2>&1)
log_mustnot zfs program $cmd $TESTPOOL $TESTZCP $TESTDS 2>&1
log_mustnot zfs program -j $cmd $TESTPOOL $TESTZCP $TESTDS 2>&1
OUTPUT=$(zfs program -j $cmd $TESTPOOL $TESTZCP $TESTDS 2>&1)
if [ "$OUTPUT" != "${neg_cmds_out[$cnt]}" ]; then
log_note "Got :$OUTPUT"
log_note "Expected:${neg_cmds_out[$cnt]}"
Expand Down