1#!/bin/sh 2 3# Check verbose xlat 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-wX" 11# umount /mnt 12 13. "${srcdir=.}/init.sh" 14 15if [ -z "${BTRFS_MOUNTPOINT}" ]; then 16 skip_ "\$BTRFS_MOUNTPOINT not set" 17elif [ ! -d "${BTRFS_MOUNTPOINT}" ]; then 18 skip_ "\$BTRFS_MOUNTPOINT does not point to a directory" 19fi 20 21check_prog grep 22run_prog ../btrfs -w -X "${BTRFS_MOUNTPOINT}" > /dev/null 23run_strace -a16 -Xverbose -eioctl $args > "$EXP" 24grep -v '^ioctl([012],' < "$LOG" > "$OUT" 25match_diff "$OUT" "$EXP" 26