generic: Add lease testing
authorIra Weiny <ira.weiny@intel.com>
Mon, 23 Sep 2019 17:59:59 +0000 (10:59 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 13 Oct 2019 11:29:39 +0000 (19:29 +0800)
The actual lease test code has been added to src/locktest.c (see
previous commits), now create a new lease test script to drive the
test.

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/locktest
tests/generic/571 [new file with mode: 0755]
tests/generic/571.out [new file with mode: 0644]
tests/generic/group

index c41f5054c52362176a14a3c62e1cf96452ce9eef..1da5fbb1eb62acfac615a03eeacd2d8a13307f13 100644 (file)
@@ -89,3 +89,7 @@ _run_generic() {
 _run_locktest() {
        _run_generic ""
 }
+
+_run_leasetest() {
+       _run_generic "-L"
+}
diff --git a/tests/generic/571 b/tests/generic/571
new file mode 100755 (executable)
index 0000000..68c8a60
--- /dev/null
@@ -0,0 +1,32 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2019 Intel, Corp.  All Rights Reserved.
+#
+# FSQA Test No. 571
+#
+# lease test
+#
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1       # failure is the default!
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+. ./common/locktest
+
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+# real QA test starts here
+_supported_fs generic
+_supported_os Linux
+_require_test
+_require_test_fcntl_advisory_locks
+
+_run_leasetest
+
+exit
diff --git a/tests/generic/571.out b/tests/generic/571.out
new file mode 100644 (file)
index 0000000..cc80a84
--- /dev/null
@@ -0,0 +1,2 @@
+QA output created by 571
+success!
index ee06992fb6d1c6699ab22157e190f209e966491b..ff2b2e35aae48128423bef4a939c7e580b61576e 100644 (file)
 568 auto quick rw prealloc
 569 auto quick rw swap prealloc
 570 auto quick rw swap
+571 auto quick