xfs: test packaged crc32c code
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 29 Oct 2018 18:12:42 +0000 (11:12 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sat, 3 Nov 2018 15:54:16 +0000 (23:54 +0800)
Use the new crc32selftest command in xfs_io to check the correct
operation of the packaged xfsprogs, on the off chance that the packages
were cross compiled on a different machine type (which means the build
time test doesn't hold much water).

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/xfs/494 [new file with mode: 0755]
tests/xfs/494.out [new file with mode: 0644]
tests/xfs/group

diff --git a/tests/xfs/494 b/tests/xfs/494
new file mode 100755 (executable)
index 0000000..718f2fa
--- /dev/null
@@ -0,0 +1,44 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2018, Oracle and/or its affiliates.  All Rights Reserved.
+#
+# FS QA Test No. 494
+#
+# Ensure that xfsprogs crc32 works correctly via xfs_io crc32cselftest command.
+#
+seq=`basename "$0"`
+seqres="$RESULT_DIR/$seq"
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+       cd /
+       rm -f $tmp.*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# real QA test starts here
+_supported_os Linux
+_supported_fs xfs
+_require_xfs_io_command "crc32cselftest"
+
+rm -f "$seqres.full"
+
+filter_selftest() {
+       sed -e 's/bytes in [0-9]* usec/bytes in XXX usec/g'
+}
+
+$XFS_IO_PROG -c 'crc32cselftest' | filter_selftest
+
+echo "Silence is golden."
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/494.out b/tests/xfs/494.out
new file mode 100644 (file)
index 0000000..4737c5c
--- /dev/null
@@ -0,0 +1,3 @@
+QA output created by 494
+crc32c: tests passed, 225944 bytes in XXX usec
+Silence is golden.
index 2cec0585c73c2a677a6f43c1ae8098c73fade9ed..136d3707d849b23f7931ca0abf526b18c12a0806 100644 (file)
 491 auto quick fuzz
 492 auto quick fuzz
 493 auto quick fuzz
+494 auto quick