# Note: you can give full name of test (t-chmod.sh) or short (chmod)
ALL_TESTS="
t-brm.sh
+ t-cache.sh
t-chmod.sh
t-creat-open.sh
t-create.sh
t-unlink-whiteout.sh
"
-# The branch-management test is "broken" and needs to be rewritten to
-# support the new remount-style -ezk.
-BROKEN_TESTS="
- t-branchman.sh
- t-incgen.sh
-"
# names of tests to run (change as you like)
# Will take $MYTESTS list of tests from the environment
TESTS2RUN=${MYTESTS:-$ALL_TESTS}
--- /dev/null
+#!/bin/sh
+# cache coherency tests
+
+source scaffold
+
+# initial directories
+function directories {
+cat <<FILES
+d $TOP_LOWER_DIR
+d $LOWER_DIR0
+d $LOWER_DIR1
+
+FILES
+}
+
+# initial set of files
+function beforefiles {
+cat <<FILES
+
+f $LOWER_DIR0/f0
+d $LOWER_DIR1/d1
+f $LOWER_DIR1/f1
+
+FILES
+}
+
+function afterfiles {
+cat <<FILES
+f $LOWER_DIR0/f0
+f $LOWER_DIR0/f0b
+d $LOWER_DIR0/d0
+
+d $LOWER_DIR2
+d $LOWER_DIR3
+
+FILES
+}
+
+##### simple tests
+( directories ; beforefiles) | create_hierarchy
+
+mount_union "" $LOWER_DIR0 $LOWER_DIR1
+
+##############################################################################
+
+function test_ls {
+ ls -lR $MOUNTPOINT > /dev/null 2>&1
+ echo -n "[ls] "
+}
+
+function test_touch {
+ touch $LOWER_DIR0/f0 || exit $?
+ sleep 5
+ test -f $MOUNTPOINT/f0 || exit $?
+ echo -n "[touch] "
+}
+
+function test_creat {
+ touch $LOWER_DIR0/f0b || exit $?
+ sleep 5
+ test -f $MOUNTPOINT/f0b || exit $?
+ echo -n "[creat] "
+}
+
+function test_mkdir {
+ mkdir -p $LOWER_DIR0/d0 || exit $?
+ sleep 5
+ test -d $MOUNTPOINT/d0 || exit $?
+ echo -n "[mkdir] "
+}
+
+function test_rm {
+ rm -f $LOWER_DIR1/f1 || exit $?
+ sync
+ sleep 5
+ test -f $MOUNTPOINT/f1 && exit $?
+ echo -n "[rm] "
+}
+
+function test_rmdir {
+ rmdir $LOWER_DIR1/d1 || exit $?
+ sync
+ sleep 5
+ test -d $MOUNTPOINT/d1 && exit $?
+ echo -n "[rmdir] "
+}
+
+function test_append {
+ date >> $LOWER_DIR0/f0 || exit $?
+ sleep 5
+ test -s $MOUNTPOINT/f0 || exit $?
+ echo -n "[append] "
+}
+
+LIST="ls touch creat mkdir rm rmdir append"
+
+for t in $LIST ; do
+ eval "test_${t}" || exit $?
+done
+
+unmount_union
+( directories ; afterfiles ) | check_hierarchy $TOP_LOWER_DIR
+
+complete_test
# Note: you can give full name of test (t-chmod.sh) or short (chmod)
ALL_TESTS="
t-brm.sh
+ t-cache.sh
t-chmod.sh
t-creat-open.sh
t-create.sh
t-unlink-whiteout.sh
"
-# The branch-management test is "broken" and needs to be rewritten to
-# support the new remount-style -ezk.
-BROKEN_TESTS="
- t-branchman.sh
- t-incgen.sh
-"
# names of tests to run (change as you like)
# Will take $MYTESTS list of tests from the environment
TESTS2RUN=${MYTESTS:-$ALL_TESTS}