diff options
author | Paul Zuchowski <[email protected]> | 2022-08-09 13:54:17 +0000 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2022-08-09 11:46:12 -0700 |
commit | db5fd16f0b7fd5bd5e19350829c46d526fed6d71 (patch) | |
tree | 75646b3b86bfaaa968a2ee61503664acd0e98024 /tests | |
parent | e0dbab1a141cdd1b118fad7c932099a2053fa4d8 (diff) |
Fix problem with zdb_objset_id test.
Use large numbers for datasets with
numeric names to avoid name and id
collisions.
Signed-off-by: Paul Zuchowski <[email protected]>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/zfs-tests/tests/functional/cli_root/zdb/zdb_objset_id.ksh | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_objset_id.ksh b/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_objset_id.ksh index ce0732a6f..90a81007e 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_objset_id.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_objset_id.ksh @@ -54,6 +54,8 @@ write_count=8 blksize=131072 verify_runnable "global" verify_disk_count "$DISKS" 2 +hex_ds=$TESTPOOL/0x400000 +num_ds=$TESTPOOL/100000 default_mirror_setup_noexit $DISKS file_write -o create -w -f $init_data -b $blksize -c $write_count @@ -111,23 +113,22 @@ if is_linux; then "zdb -dddddd $TESTPOOL/$objset_hex failed $reason" fi -log_must zfs create $TESTPOOL/0x400 -log_must zfs create $TESTPOOL/100 -output=$(zdb -d $TESTPOOL/0x400) +log_must zfs create $hex_ds +log_must zfs create $num_ds +output=$(zdb -d $hex_ds) reason="($TESTPOOL/0x400 not in zdb output)" -echo $output |grep "$TESTPOOL/0x400" > /dev/null +echo $output |grep "$hex_ds" > /dev/null (( $? != 0 )) && log_fail \ + "zdb -d $hex_ds failed $reason" +output=$(zdb -d $num_ds) +reason="($num_ds not in zdb output)" +echo $output |grep "$num_ds" > /dev/null "zdb -d $TESTPOOL/0x400 failed $reason" -output=$(zdb -d $TESTPOOL/100) -reason="($TESTPOOL/100 not in zdb output)" -echo $output |grep "$TESTPOOL/100" > /dev/null -(( $? != 0 )) && log_fail \ - "zdb -d $TESTPOOL/100 failed $reason" # force numeric interpretation, should fail -log_mustnot zdb -N $TESTPOOL/0x400 -log_mustnot zdb -N $TESTPOOL/100 -log_mustnot zdb -Nd $TESTPOOL/0x400 -log_mustnot zdb -Nd $TESTPOOL/100 +log_mustnot zdb -N $hex_ds +log_mustnot zdb -N $num_ds +log_mustnot zdb -Nd $hex_ds +log_mustnot zdb -Nd $num_ds log_pass "zdb -d <pool>/<objset ID> generates the correct names." |