1 #!/bin/sh 2 3 # Check verbose decoding of btrfs ioctl w/ live ioctls. 4 5 # WARNING: USE OF THIS TEST WILL MODIFY AN EXISTING BTRFS FILE SYSTEM 6 7 # Typical usage: 8 # mkfs.btrfs <dev> 9 # mount <dev> /mnt 10 # BTRFS_MOUNTPOINT=/mnt make check TESTS="btrfs-vw" 11 # umount /mnt 12 13 . "${srcdir=.}/init.sh" 14 15 if [ -z "${BTRFS_MOUNTPOINT}" ]; then 16 skip_ "\$BTRFS_MOUNTPOINT not set" 17 elif [ ! -d "${BTRFS_MOUNTPOINT}" ]; then 18 skip_ "\$BTRFS_MOUNTPOINT does not point to a directory" 19 fi 20 21 run_prog ./btrfs -v -w "${BTRFS_MOUNTPOINT}" > /dev/null 22 run_strace -a16 -veioctl $args > "$EXP" 23 check_prog grep 24 grep -v '^ioctl([012],' < "$LOG" > "$OUT" 25 match_diff "$OUT" "$EXP" 26 27 rm -f "$EXP" "$OUT" 28 29 exit 0 30