overlay: add unionmount tests with multi lower layers
authorAmir Goldstein <amir73il@gmail.com>
Sun, 31 May 2020 11:01:55 +0000 (14:01 +0300)
committerEryu Guan <guaneryu@gmail.com>
Sun, 26 Jul 2020 13:33:31 +0000 (21:33 +0800)
The tests with multi lower layers rotate the upper layer into a lower
layer on specific operations such as mkdir, rename and link.
That provides test coverage for redirect_dir and index features.

The following variations are covered:
1. All layers all on scratch fs (--ov=10 --samefs)
2. All layers on scratch fs expect for lowermost on test fs (--ov=10)
3. Lowermost layer on test fs, one layer on tmpfs and the rest
   on sratch fs (--ov=10 --maxfs=1)
4. Lowermost layer on test fs, one layer on scratch fs and the rest
   are unique tmpfs instances (--ov=10 --maxfs=10)

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
15 files changed:
tests/overlay/103 [new file with mode: 0755]
tests/overlay/103.out [new file with mode: 0644]
tests/overlay/104 [new file with mode: 0755]
tests/overlay/104.out [new file with mode: 0644]
tests/overlay/105 [new file with mode: 0755]
tests/overlay/105.out [new file with mode: 0644]
tests/overlay/106 [new file with mode: 0755]
tests/overlay/106.out [new file with mode: 0644]
tests/overlay/107 [new file with mode: 0755]
tests/overlay/107.out [new file with mode: 0644]
tests/overlay/108 [new file with mode: 0755]
tests/overlay/108.out [new file with mode: 0644]
tests/overlay/109 [new file with mode: 0755]
tests/overlay/109.out [new file with mode: 0644]
tests/overlay/group

diff --git a/tests/overlay/103 b/tests/overlay/103
new file mode 100755 (executable)
index 0000000..fb7fce0
--- /dev/null
@@ -0,0 +1,38 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (C) 2020 CTERA Networks. All Rights Reserved.
+#
+# FS QA Test 103
+#
+# Run unionmount testsuite to verify correctness
+# with multi lower layers on same fs as upper
+#
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1       # failure is the default!
+trap "_unionmount_testsuite_cleanup; exit \$status" 0 1 2 3 15
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# real QA test starts here
+
+_supported_fs overlay
+_supported_os Linux
+_require_scratch
+_require_unionmount_testsuite
+
+_unionmount_testsuite_run --ov=10 --samefs --verify
+
+# success, all done
+echo "Silence is golden"
+status=0
+exit
diff --git a/tests/overlay/103.out b/tests/overlay/103.out
new file mode 100644 (file)
index 0000000..78212a3
--- /dev/null
@@ -0,0 +1,2 @@
+QA output created by 103
+Silence is golden
diff --git a/tests/overlay/104 b/tests/overlay/104
new file mode 100755 (executable)
index 0000000..f867f34
--- /dev/null
@@ -0,0 +1,39 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (C) 2020 CTERA Networks. All Rights Reserved.
+#
+# FS QA Test 104
+#
+# Run unionmount testsuite to verify correctness
+# with multi lower layers, lowermost on unique fs
+#
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1       # failure is the default!
+trap "_unionmount_testsuite_cleanup; exit \$status" 0 1 2 3 15
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# real QA test starts here
+
+_supported_fs overlay
+_supported_os Linux
+_require_test
+_require_scratch
+_require_unionmount_testsuite
+
+_unionmount_testsuite_run --ov=10 --verify
+
+# success, all done
+echo "Silence is golden"
+status=0
+exit
diff --git a/tests/overlay/104.out b/tests/overlay/104.out
new file mode 100644 (file)
index 0000000..3f3bd2e
--- /dev/null
@@ -0,0 +1,2 @@
+QA output created by 104
+Silence is golden
diff --git a/tests/overlay/105 b/tests/overlay/105
new file mode 100755 (executable)
index 0000000..f964c58
--- /dev/null
@@ -0,0 +1,40 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (C) 2020 CTERA Networks. All Rights Reserved.
+#
+# FS QA Test 105
+#
+# Run unionmount testsuite to verify correctness
+# with multi lower layers, lowermost on unique fs,
+# with xino enabled
+#
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1       # failure is the default!
+trap "_unionmount_testsuite_cleanup; exit \$status" 0 1 2 3 15
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# real QA test starts here
+
+_supported_fs overlay
+_supported_os Linux
+_require_test
+_require_scratch
+_require_unionmount_testsuite
+
+_unionmount_testsuite_run --ov=10 --xino --verify
+
+# success, all done
+echo "Silence is golden"
+status=0
+exit
diff --git a/tests/overlay/105.out b/tests/overlay/105.out
new file mode 100644 (file)
index 0000000..edaafd4
--- /dev/null
@@ -0,0 +1,2 @@
+QA output created by 105
+Silence is golden
diff --git a/tests/overlay/106 b/tests/overlay/106
new file mode 100755 (executable)
index 0000000..52d6c7d
--- /dev/null
@@ -0,0 +1,41 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (C) 2020 CTERA Networks. All Rights Reserved.
+#
+# FS QA Test 106
+#
+# Run unionmount testsuite to verify correctness
+# with multi lower layers, some layers on unique fs,
+# one layer is on tmpfs.
+#
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1       # failure is the default!
+trap "_unionmount_testsuite_cleanup; exit \$status" 0 1 2 3 15
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# real QA test starts here
+
+_supported_fs overlay
+_supported_os Linux
+_require_tmpfs
+_require_test
+_require_scratch
+_require_unionmount_testsuite
+
+_unionmount_testsuite_run --ov=10 --maxfs=1 --verify
+
+# success, all done
+echo "Silence is golden"
+status=0
+exit
diff --git a/tests/overlay/106.out b/tests/overlay/106.out
new file mode 100644 (file)
index 0000000..85af05d
--- /dev/null
@@ -0,0 +1,2 @@
+QA output created by 106
+Silence is golden
diff --git a/tests/overlay/107 b/tests/overlay/107
new file mode 100755 (executable)
index 0000000..abcde30
--- /dev/null
@@ -0,0 +1,41 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (C) 2020 CTERA Networks. All Rights Reserved.
+#
+# FS QA Test 107
+#
+# Run unionmount testsuite to verify correctness
+# with multi lower layers, some layers on unique fs,
+# one layer is on tmpfs with xino enabled.
+#
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1       # failure is the default!
+trap "_unionmount_testsuite_cleanup; exit \$status" 0 1 2 3 15
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# real QA test starts here
+
+_supported_fs overlay
+_supported_os Linux
+_require_tmpfs
+_require_test
+_require_scratch
+_require_unionmount_testsuite
+
+_unionmount_testsuite_run --ov=10 --maxfs=1 --xino --verify
+
+# success, all done
+echo "Silence is golden"
+status=0
+exit
diff --git a/tests/overlay/107.out b/tests/overlay/107.out
new file mode 100644 (file)
index 0000000..862bdfb
--- /dev/null
@@ -0,0 +1,2 @@
+QA output created by 107
+Silence is golden
diff --git a/tests/overlay/108 b/tests/overlay/108
new file mode 100755 (executable)
index 0000000..d4e9b57
--- /dev/null
@@ -0,0 +1,41 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (C) 2020 CTERA Networks. All Rights Reserved.
+#
+# FS QA Test 108
+#
+# Run unionmount testsuite to verify correctness
+# with multi lower layers, all layers on unique fs,
+# some layers are on tmpfs.
+#
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1       # failure is the default!
+trap "_unionmount_testsuite_cleanup; exit \$status" 0 1 2 3 15
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# real QA test starts here
+
+_supported_fs overlay
+_supported_os Linux
+_require_tmpfs
+_require_test
+_require_scratch
+_require_unionmount_testsuite
+
+_unionmount_testsuite_run --ov=10 --maxfs=10 --verify
+
+# success, all done
+echo "Silence is golden"
+status=0
+exit
diff --git a/tests/overlay/108.out b/tests/overlay/108.out
new file mode 100644 (file)
index 0000000..326ffa9
--- /dev/null
@@ -0,0 +1,2 @@
+QA output created by 108
+Silence is golden
diff --git a/tests/overlay/109 b/tests/overlay/109
new file mode 100755 (executable)
index 0000000..7107298
--- /dev/null
@@ -0,0 +1,41 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (C) 2020 CTERA Networks. All Rights Reserved.
+#
+# FS QA Test 109
+#
+# Run unionmount testsuite to verify correctness
+# with multi lower layers, all layers on unique fs,
+# some layers are on tmpfs with xino enabled.
+#
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1       # failure is the default!
+trap "_unionmount_testsuite_cleanup; exit \$status" 0 1 2 3 15
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# remove previous $seqres.full before test
+rm -f $seqres.full
+
+# real QA test starts here
+
+_supported_fs overlay
+_supported_os Linux
+_require_tmpfs
+_require_test
+_require_scratch
+_require_unionmount_testsuite
+
+_unionmount_testsuite_run --ov=10 --maxfs=10 --xino --verify
+
+# success, all done
+echo "Silence is golden"
+status=0
+exit
diff --git a/tests/overlay/109.out b/tests/overlay/109.out
new file mode 100644 (file)
index 0000000..8356bef
--- /dev/null
@@ -0,0 +1,2 @@
+QA output created by 109
+Silence is golden
index 267161f..079ff0a 100644 (file)
 100 auto quick union samefs
 101 auto quick union nonsamefs
 102 auto quick union nonsamefs xino
+103 auto union rotate samefs
+104 auto union rotate nonsamefs
+105 auto union rotate nonsamefs xino
+106 auto union rotate nonsamefs
+107 auto union rotate nonsamefs xino
+108 auto union rotate nonsamefs
+109 auto union rotate nonsamefs xino