blob: 20f60abe93c50951ce30e18d2b6779c548ba51b1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/bin/sh
#
# Check verbose, verbose xlat decoding of btrfs ioctl w/ live ioctls.
#
# Copyright (c) 2018 The strace developers.
# All rights reserved.
#
# SPDX-License-Identifier: GPL-2.0-or-later
# WARNING: USE OF THIS TEST WILL MODIFY AN EXISTING BTRFS FILE SYSTEM
# Typical usage:
# mkfs.btrfs <dev>
# mount <dev> /mnt
# BTRFS_MOUNTPOINT=/mnt make check TESTS="btrfs-vwX"
# umount /mnt
. "${srcdir=.}/init.sh"
if [ -z "${BTRFS_MOUNTPOINT}" ]; then
skip_ "\$BTRFS_MOUNTPOINT not set"
elif [ ! -d "${BTRFS_MOUNTPOINT}" ]; then
skip_ "\$BTRFS_MOUNTPOINT does not point to a directory"
fi
check_prog grep
run_prog ../btrfs -v -w -X "${BTRFS_MOUNTPOINT}" > /dev/null
run_strace -a16 -Xverbose -veioctl $args > "$EXP"
grep -v '^ioctl([012],' < "$LOG" > "$OUT"
match_diff "$OUT" "$EXP"
|