function test1 {
# The read-write tests
-if [ $ODF -eq 1 ]; then
- POPULATE_ODF=0
-fi
+
+init_odf
( beforefiles ) | create_hierarchy
-if [ $ODF -eq 1 ]; then
- setup_odf
- mount_union "odf=$ODF_DIR" $LOWER_DIR0 $LOWER_DIR1
-else
- mount_union "" $LOWER_DIR0 $LOWER_DIR1
-fi
+mount_union "" $LOWER_DIR0 $LOWER_DIR1
do_chmod $MOUNTPOINT/a
do_chmod $MOUNTPOINT/b
unmount_union
-( beforefiles ) | check_hierarchy $TOP_LOWER_DIR
+( beforefiles ) | check_hierarchy
echo -n "[rw] "
-if [ $ODF -eq 1 ]; then
- discard_odf
-fi
+discard_odf
}
function test2 {
# The readonly tests
-if [ $ODF -eq 1 ]; then
- POPULATE_ODF=0
-fi
+init_odf
( beforefiles ) | create_hierarchy
-if [ $ODF -eq 1 ]; then
- setup_odf
- mount_union "odf=$ODF_DIR" $LOWER_DIR0 $LOWER_DIR1=ro
-else
- mount_union "" $LOWER_DIR0 $LOWER_DIR1=ro
-fi
+mount_union "" $LOWER_DIR0 $LOWER_DIR1=ro
+
do_chmod $MOUNTPOINT/a
do_chmod $MOUNTPOINT/b
do_chmod $MOUNTPOINT/c
do_chmod $MOUNTPOINT/e
do_chmod $MOUNTPOINT/f
unmount_union
-( beforefiles ; afterfiles_ro ) | check_hierarchy $TOP_LOWER_DIR
+( beforefiles ; afterfiles_ro ) | check_hierarchy
echo -n "[ro] "
-if [ $ODF -eq 1 ]; then
- discard_odf
-fi
+discard_odf
}
test1
checktype $MOUNTPOINT/c '-'
unmount_union
-( files ; beforefiles ) | check_hierarchy $TOP_LOWER_DIR/b? $ODF_DIR
+( files ; beforefiles ) | check_hierarchy
discard_odf
complete_test