2 # check that sanitized names with matching crc do not contain unprintable
3 # characters, namely 0x7f
5 source "$TEST_TOP/common"
7 check_prereq mkfs.btrfs
12 run_check "$TOP/mkfs.btrfs" -f "$TEST_DEV"
13 run_check_mount_test_dev
14 run_check $SUDO_HELPER chmod a+rw "$TEST_MNT"
16 # known to produce char 0x7f == 127
17 touch "$TEST_MNT/|5gp!"
19 run_check_umount_test_dev
21 run_check $SUDO_HELPER "$TOP/btrfs-image" -ss "$TEST_DEV" img
22 run_check $SUDO_HELPER "$TOP/btrfs-image" -r img img.restored
23 run_check_stdout $SUDO_HELPER "$TOP/btrfs" inspect-internal dump-tree img.restored > img.dump
25 ch7f=$(echo -en '\x7f')
26 if grep -q "$ch7f" img.dump; then
27 _fail "found char 0x7f in the sanitized names"
30 rm -f -- img img.restored img.dump