linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] overlay/038: Miscellaneous fixes
@ 2017-10-08 11:25 Chandan Rajendra
  2017-10-08 18:39 ` Amir Goldstein
  0 siblings, 1 reply; 3+ messages in thread
From: Chandan Rajendra @ 2017-10-08 11:25 UTC (permalink / raw)
  To: fstests, amir73il; +Cc: Chandan Rajendra, linux-unionfs, eguan

This commit removes the redundant chown operation which was supposed to
cause the test file to be copied up. Also, _overlay_scratch_unmount() is
used to unmount the overlay filesystem rather than invoking $UMOUNT_PROG.

Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
---
 tests/overlay/038 | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/tests/overlay/038 b/tests/overlay/038
index 57281fa..148995b 100755
--- a/tests/overlay/038
+++ b/tests/overlay/038
@@ -1,7 +1,7 @@
 #! /bin/bash
 # FSQA Test No. 038
 #
-# Test constant d_ino numbers
+# Test consistent d_ino numbers for samefs setup.
 #
 #-----------------------------------------------------------------------
 #
@@ -102,10 +102,8 @@ current_d=$($here/src/t_dir_type $impure_dir $impure_dir_st_ino)
 [[ $current_d == ". d" ]] || \
     echo "Before dir becomes impure: Invalid d_ino reported for ."
 
-chown -h 100 $SCRATCH_MNT/test_file
-test_file_st_ino=$(stat -c '%i' $SCRATCH_MNT/test_file)
-
 mv $SCRATCH_MNT/test_file $impure_dir
+test_file_st_ino=$(stat -c '%i' $impure_dir/test_file)
 
 impure=$($GETFATTR_PROG --absolute-names --only-values -n 'trusted.overlay.impure' \
 			$upperdir/test_dir/impure_dir)
@@ -187,7 +185,7 @@ parent_d=$($here/src/t_dir_type $SCRATCH_MNT/test_dir/pure_lower_dir $test_dir_s
 [[ $parent_d == ".. d" ]] || \
 	echo "Pure lower in dir which has another lower layer: Invalid d_ino reported for .."
 
-$UMOUNT_PROG $SCRATCH_MNT
+_overlay_scratch_unmount
 
 echo "Silence is golden"
 status=0
-- 
2.9.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] overlay/038: Miscellaneous fixes
  2017-10-08 11:25 [PATCH] overlay/038: Miscellaneous fixes Chandan Rajendra
@ 2017-10-08 18:39 ` Amir Goldstein
  2017-10-15 13:10   ` Amir Goldstein
  0 siblings, 1 reply; 3+ messages in thread
From: Amir Goldstein @ 2017-10-08 18:39 UTC (permalink / raw)
  To: Chandan Rajendra; +Cc: fstests, overlayfs, Eryu Guan

On Sun, Oct 8, 2017 at 2:25 PM, Chandan Rajendra
<chandan@linux.vnet.ibm.com> wrote:
> This commit removes the redundant chown operation which was supposed to
> cause the test file to be copied up. Also, _overlay_scratch_unmount() is
> used to unmount the overlay filesystem rather than invoking $UMOUNT_PROG.
>
> Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
> ---
>  tests/overlay/038 | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/tests/overlay/038 b/tests/overlay/038
> index 57281fa..148995b 100755
> --- a/tests/overlay/038
> +++ b/tests/overlay/038
> @@ -1,7 +1,7 @@
>  #! /bin/bash
>  # FSQA Test No. 038
>  #
> -# Test constant d_ino numbers
> +# Test consistent d_ino numbers for samefs setup.
>  #
>  #-----------------------------------------------------------------------
>  #
> @@ -102,10 +102,8 @@ current_d=$($here/src/t_dir_type $impure_dir $impure_dir_st_ino)
>  [[ $current_d == ". d" ]] || \
>      echo "Before dir becomes impure: Invalid d_ino reported for ."
>
> -chown -h 100 $SCRATCH_MNT/test_file
> -test_file_st_ino=$(stat -c '%i' $SCRATCH_MNT/test_file)
> -
>  mv $SCRATCH_MNT/test_file $impure_dir
> +test_file_st_ino=$(stat -c '%i' $impure_dir/test_file)
>
>  impure=$($GETFATTR_PROG --absolute-names --only-values -n 'trusted.overlay.impure' \
>                         $upperdir/test_dir/impure_dir)
> @@ -187,7 +185,7 @@ parent_d=$($here/src/t_dir_type $SCRATCH_MNT/test_dir/pure_lower_dir $test_dir_s
>  [[ $parent_d == ".. d" ]] || \
>         echo "Pure lower in dir which has another lower layer: Invalid d_ino reported for .."
>
> -$UMOUNT_PROG $SCRATCH_MNT
> +_overlay_scratch_unmount
>

Neither variant is really needed at end of test but fine.

>  echo "Silence is golden"
>  status=0
> --
> 2.9.5
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] overlay/038: Miscellaneous fixes
  2017-10-08 18:39 ` Amir Goldstein
@ 2017-10-15 13:10   ` Amir Goldstein
  0 siblings, 0 replies; 3+ messages in thread
From: Amir Goldstein @ 2017-10-15 13:10 UTC (permalink / raw)
  To: Chandan Rajendra; +Cc: fstests, overlayfs, Eryu Guan

On Sun, Oct 8, 2017 at 9:39 PM, Amir Goldstein <amir73il@gmail.com> wrote:
> On Sun, Oct 8, 2017 at 2:25 PM, Chandan Rajendra
> <chandan@linux.vnet.ibm.com> wrote:
>> This commit removes the redundant chown operation which was supposed to
>> cause the test file to be copied up. Also, _overlay_scratch_unmount() is
>> used to unmount the overlay filesystem rather than invoking $UMOUNT_PROG.
>>
>> Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
>> ---
>>  tests/overlay/038 | 8 +++-----
>>  1 file changed, 3 insertions(+), 5 deletions(-)
>>
>> diff --git a/tests/overlay/038 b/tests/overlay/038
>> index 57281fa..148995b 100755
>> --- a/tests/overlay/038
>> +++ b/tests/overlay/038
>> @@ -1,7 +1,7 @@
>>  #! /bin/bash
>>  # FSQA Test No. 038
>>  #
>> -# Test constant d_ino numbers
>> +# Test consistent d_ino numbers for samefs setup.
>>  #
>>  #-----------------------------------------------------------------------
>>  #
>> @@ -102,10 +102,8 @@ current_d=$($here/src/t_dir_type $impure_dir $impure_dir_st_ino)
>>  [[ $current_d == ". d" ]] || \
>>      echo "Before dir becomes impure: Invalid d_ino reported for ."
>>
>> -chown -h 100 $SCRATCH_MNT/test_file
>> -test_file_st_ino=$(stat -c '%i' $SCRATCH_MNT/test_file)
>> -
>>  mv $SCRATCH_MNT/test_file $impure_dir
>> +test_file_st_ino=$(stat -c '%i' $impure_dir/test_file)
>>
>>  impure=$($GETFATTR_PROG --absolute-names --only-values -n 'trusted.overlay.impure' \
>>                         $upperdir/test_dir/impure_dir)
>> @@ -187,7 +185,7 @@ parent_d=$($here/src/t_dir_type $SCRATCH_MNT/test_dir/pure_lower_dir $test_dir_s
>>  [[ $parent_d == ".. d" ]] || \
>>         echo "Pure lower in dir which has another lower layer: Invalid d_ino reported for .."
>>
>> -$UMOUNT_PROG $SCRATCH_MNT
>> +_overlay_scratch_unmount
>>
>
> Neither variant is really needed at end of test but fine.
>

This got merged with _overlay_scratch_unmount which is not intended to be used
directly. I overlooked this in review. Not really a problem though.
Should probably remove this final umount from the test in a cleanup patch.

Amir.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-10-15 13:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-08 11:25 [PATCH] overlay/038: Miscellaneous fixes Chandan Rajendra
2017-10-08 18:39 ` Amir Goldstein
2017-10-15 13:10   ` Amir Goldstein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).