xfstests: test new v5 bulkstat commands
RFC PATCH 1/1 xfstests: test new v5 bulkstat commands
From: Darrick J. Wong <[email protected]>
Check that the new v5 bulkstat commands do everything the old one do, and then make sure the new functionality actually works.
Signed-off-by Darrick J. Wong <[email protected]>
--- common/xfs | 6 ++ src/Makefile | 2 - src/bulkstat_null_ocount.c | 61 ++++++++++++++++ tests/xfs/085 | 2 - tests/xfs/086 | 2 - tests/xfs/087 | 2 - tests/xfs/088 | 2 - tests/xfs/089 | 2 - tests/xfs/091 | 2 - tests/xfs/093 | 2 - tests/xfs/097 | 2 - tests/xfs/130 | 2 - tests/xfs/235 | 2 - tests/xfs/271 | 2 - tests/xfs/744 | 171 ++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/744.out | 105 +++++++++++++++++++++++++++ tests/xfs/745 | 44 +++++++++++ tests/xfs/745.out | 2 + tests/xfs/group | 2 + 19 files changed, 403 insertions(+), 12 deletions(-) create mode 100644 src/bulkstat_null_ocount.c create mode 100755 tests/xfs/744 create mode 100644 tests/xfs/744.out create mode 100755 tests/xfs/745 create mode 100644 tests/xfs/745.out
common/xfs +6 -0
@@ -862,3 +862,9 @@ _force_xfsv4_mount_options() fi echo "MOUNT_OPTIONS = $MOUNT_OPTIONS" >>$seqres.full } + +# Find AG count of mounted filesystem +_xfs_mount_agcount() +{ + $XFS_INFO_PROG "$1" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g' +}
src/Makefile +1 -1
@@ -28,7 +28,7 @@ LINUX_TARGETS = xfsctl bstat t_mtab getdevicesize preallo_rw_pattern_reader \ attr-list-by-handle-cursor-test listxattr dio-interleaved t_dir_type \ dio-invalidate-cache stat_test t_encrypted_d_revalidate \ attr_replace_test swapon mkswap t_attr_corruption t_open_tmpfiles \ - fscrypt-crypt-util + fscrypt-crypt-util bulkstat_null_ocount SUBDIRS = log-writes perf
src/bulkstat_null_ocount.c new file +61 -0
61 lines not on this page · raw message
tests/xfs/085 +1 -1
@@ -63,7 +63,7 @@ for x in `seq 2 64`; do touch "${TESTFILE}.${x}" done inode="$(stat -c '%i' "${TESTFILE}.1")" -agcount="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')" +agcount="$(_xfs_mount_agcount $SCRATCH_MNT)" umount "${SCRATCH_MNT}" echo "+ check fs"
tests/xfs/086 +1 -1
@@ -64,7 +64,7 @@ for x in `seq 2 64`; do touch "${TESTFILE}.${x}" done inode="$(stat -c '%i' "${TESTFILE}.1")" -agcount="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')" +agcount="$(_xfs_mount_agcount $SCRATCH_MNT)" test "${agcount}" -gt 1 || _notrun "Single-AG XFS not supported" umount "${SCRATCH_MNT}"
tests/xfs/087 +1 -1
@@ -64,7 +64,7 @@ for x in `seq 2 64`; do touch "${TESTFILE}.${x}" done inode="$(stat -c '%i' "${TESTFILE}.1")" -agcount="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')" +agcount="$(_xfs_mount_agcount $SCRATCH_MNT)" umount "${SCRATCH_MNT}" echo "+ check fs"
tests/xfs/088 +1 -1
@@ -64,7 +64,7 @@ for x in `seq 2 64`; do touch "${TESTFILE}.${x}" done inode="$(stat -c '%i' "${TESTFILE}.1")" -agcount="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')" +agcount="$(_xfs_mount_agcount $SCRATCH_MNT)" umount "${SCRATCH_MNT}" echo "+ check fs"
tests/xfs/089 +1 -1
@@ -64,7 +64,7 @@ for x in `seq 2 64`; do touch "${TESTFILE}.${x}" done inode="$(stat -c '%i' "${TESTFILE}.1")" -agcount="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')" +agcount="$(_xfs_mount_agcount $SCRATCH_MNT)" umount "${SCRATCH_MNT}" echo "+ check fs"
tests/xfs/091 +1 -1
@@ -64,7 +64,7 @@ for x in `seq 2 64`; do touch "${TESTFILE}.${x}" done inode="$(stat -c '%i' "${TESTFILE}.1")" -agcount="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')" +agcount="$(_xfs_mount_agcount $SCRATCH_MNT)" umount "${SCRATCH_MNT}" echo "+ check fs"
tests/xfs/093 +1 -1
@@ -64,7 +64,7 @@ for x in `seq 2 64`; do touch "${TESTFILE}.${x}" done inode="$(stat -c '%i' "${TESTFILE}.1")" -agcount="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')" +agcount="$(_xfs_mount_agcount $SCRATCH_MNT)" umount "${SCRATCH_MNT}" echo "+ check fs"
tests/xfs/097 +1 -1
@@ -67,7 +67,7 @@ for x in `seq 2 64`; do touch "${TESTFILE}.${x}" done inode="$(stat -c '%i' "${TESTFILE}.1")" -agcount="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')" +agcount="$(_xfs_mount_agcount $SCRATCH_MNT)" umount "${SCRATCH_MNT}" echo "+ check fs"
tests/xfs/130 +1 -1
@@ -43,7 +43,7 @@ _scratch_mkfs_xfs > /dev/null echo "+ mount fs image" _scratch_mount blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")" -agcount="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')" +agcount="$(_xfs_mount_agcount $SCRATCH_MNT)" echo "+ make some files" _pwrite_byte 0x62 0 $((blksz * 64)) "${SCRATCH_MNT}/file0" >> "$seqres.full"
tests/xfs/235 +1 -1
@@ -41,7 +41,7 @@ _scratch_mkfs_xfs > /dev/null echo "+ mount fs image" _scratch_mount blksz=$(stat -f -c '%s' ${SCRATCH_MNT}) -agcount=$($XFS_INFO_PROG ${SCRATCH_MNT} | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g') +agcount=$(_xfs_mount_agcount $SCRATCH_MNT) echo "+ make some files" _pwrite_byte 0x62 0 $((blksz * 64)) ${SCRATCH_MNT}/file0 >> $seqres.full
tests/xfs/271 +1 -1
@@ -37,7 +37,7 @@ echo "Format and mount" _scratch_mkfs > "$seqres.full" 2>&1 _scratch_mount -agcount=$($XFS_INFO_PROG $SCRATCH_MNT | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g') +agcount=$(_xfs_mount_agcount $SCRATCH_MNT) echo "Get fsmap" | tee -a $seqres.full $XFS_IO_PROG -c 'fsmap -v' $SCRATCH_MNT > $TEST_DIR/fsmap
tests/xfs/744 new file +171 -0
171 lines not on this page · raw message
tests/xfs/744.out new file +105 -0
105 lines not on this page · raw message
tests/xfs/745 new file +44 -0
44 lines not on this page · raw message
tests/xfs/745.out new file +2 -0
@@ -0,0 +1,2 @@ +QA output created by 745 +Silence is golden.
tests/xfs/group +2 -0
@@ -504,4 +504,6 @@ 504 auto quick mkfs label 505 auto quick spaceman 506 auto quick health +744 auto ioctl quick +745 auto ioctl quick 907 clone