2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2015 Red Hat, Inc. All Rights Reserved.
7 # This test verifies that the xfsprogs log formatting infrastructure works
8 # correctly for various log stripe unit values. The log is formatted with xfs_db
9 # and verified with xfs_logprint.
12 seqres=$RESULT_DIR/$seq
13 echo "QA output created by $seq"
17 status=1 # failure is the default!
18 trap "_cleanup; exit \$status" 0 1 2 3 15
28 # get standard environment, filters and checks
32 # real QA test starts here
34 # Modify as appropriate.
39 _require_xfs_db_command "logformat"
41 _scratch_mkfs >> $seqres.full 2>&1 || _fail "mkfs failed"
43 # Reformat the log with various log stripe unit sizes and see if logprint dumps
44 # any errors. Use a cycle value larger than 1 so the log is actually written
45 # (the log is zeroed when cycle == 1).
46 for i in 16 32 64 128 256; do
48 _scratch_xfs_db -x -c "logformat -c 3 -s $lsunit" | \
50 # don't redirect error output so it causes test failure
51 $XFS_LOGPRINT_PROG $SCRATCH_DEV >> $seqres.full