overlay/079: test for parent directory consistancy in copy-up
PATCH 1/1 overlay/079: test for parent directory consistancy in copy-up
Make sure the change for parent direcotry get synced in copy-up.
Signed-off-by Chengguang Xu <[email protected]>
--- tests/overlay/079 | 50 +++++++++++++++++++++++++++++++++++++++++++ tests/overlay/079.out | 2 ++ 2 files changed, 52 insertions(+) create mode 100755 tests/overlay/079 create mode 100644 tests/overlay/079.out
tests/overlay/079 new file +50 -0
@@ -0,0 +1,50 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Chengguang Xu <[email protected]>. +# All Rights Reserved. +# +# FS QA Test 079 +# +# Test copy up consistency for parent directory. +# +. ./common/preamble +_begin_fstest copyup quick + +# 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 + +# Modify as appropriate. +_supported_fs overlay +_require_scratch +#_require_command "$FLOCK_PROG" flock +_require_scratch_shutdown + + +# Remove all files from previous tests +_scratch_mkfs + +lowerdir=$OVL_BASE_SCRATCH_MNT/$OVL_LOWER +upperdir=$OVL_BASE_SCRATCH_MNT/$OVL_UPPER +mkdir -p $lowerdir/foo_dir +echo a > /tmp/foo +echo a > $lowerdir/foo_dir/foo + +# Mounting overlay +_scratch_mount + +touch $SCRATCH_MNT/foo_dir/foo +_scratch_shutdown +_scratch_cycle_mount + +echo "Silence is golden" +diff /tmp/foo $upperdir/foo_dir/foo + +# success, all done +status=0 +exit
tests/overlay/079.out new file +2 -0
@@ -0,0 +1,2 @@ +QA output created by 079 +Silence is golden
Signature · 1 line
2.27.0
Amir Goldstein
NAKQuoted 54 lines · Chengguang Xu
Make sure the change for parent direcotry get synced in copy-up.
Signed-off-by Chengguang Xu <[email protected]>--- tests/overlay/079 | 50 +++++++++++++++++++++++++++++++++++++++++++ tests/overlay/079.out | 2 ++ 2 files changed, 52 insertions(+) create mode 100755 tests/overlay/079 create mode 100644 tests/overlay/079.outtests/overlay/079 new file +37
-0@@ -0,0 +1,50 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Chengguang Xu <[email protected]>. +# All Rights Reserved. +# +# FS QA Test 079 +# +# Test copy up consistency for parent directory. +# +. ./common/preamble +_begin_fstest copyup quick + +# 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 + +# Modify as appropriate. +_supported_fs overlay +_require_scratch +#_require_command "$FLOCK_PROG" flock +_require_scratch_shutdown + + +# Remove all files from previous tests +_scratch_mkfs + +lowerdir=$OVL_BASE_SCRATCH_MNT/$OVL_LOWER +upperdir=$OVL_BASE_SCRATCH_MNT/$OVL_UPPER +mkdir -p $lowerdir/foo_dir +echo a > /tmp/foo +echo a > $lowerdir/foo_dir/foo +
tests/overlay/079 line 47
Quoted 10 lines
tests/overlay/079 new file +10
-0+# Mounting overlay +_scratch_mount + +touch $SCRATCH_MNT/foo_dir/foo +_scratch_shutdown +_scratch_cycle_mount + +echo "Silence is golden" +diff /tmp/foo $upperdir/foo_dir/foo +
NACK.
Absolutely no reason for us to guarantee that file is copied up if the user did not request explicit sync on the file or the directory.
Really, what is driving you to make this change and test? If it is a real world use case, then please encode the real use case in the form of a test.
Thanks,
Amir.