Re: [PATCH 3/4] generic: cleanup test files

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Thu, Sep 22, 2022 at 03:48:21PM +0200, Pavel Reichl wrote:
> There seems to be some seek_sanity_testfile files that are not
> cleaned up and take up space.
> 
> -rwxr-xr-x. 1 root root 8.0G Sep 22 13:39 seek_sanity_testfile10
> 
> Signed-off-by: Pavel Reichl <preichl@xxxxxxxxxx>
> ---
>  tests/generic/285 | 2 +-
>  tests/generic/436 | 2 +-
>  tests/generic/445 | 2 +-
>  tests/generic/448 | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/generic/285 b/tests/generic/285
> index 6c755b5f..d1850021 100755
> --- a/tests/generic/285
> +++ b/tests/generic/285
> @@ -28,7 +28,7 @@ _require_test_program "seek_sanity_test"
>  # Override the default cleanup function.
>  _cleanup()
>  {
> -	eval "rm -f $BASE_TEST_FILE.*"
> +	rm -f $BASE_TEST_FILE*

OK, this eval looks not reasonable.

>  }
>  
>  _run_seek_sanity_test $BASE_TEST_FILE > $seqres.full 2>&1 ||
> diff --git a/tests/generic/436 b/tests/generic/436
> index 7fb24b41..d54af436 100755
> --- a/tests/generic/436
> +++ b/tests/generic/436
> @@ -16,7 +16,7 @@ BASE_TEST_FILE=$TEST_DIR/seek_sanity_testfile

I'm wondering two questions:
1) If these cases all use $TEST_DIR/seek_sanity_testfile, and don't really
   remove these seek_sanity_testfile* files, will them affect each testing
   result? Can we set BASE_TEST_FILE=$TEST_DIR/seek_sanity_testfile_$seq
   at least, to avoid they use same files?

2) If these $BASE_TEST_FILE* files won't take too much space, and won't affect
   later testing, how about keeping them in $TEST_DIR, then remove these
   specific _cleanup(). From my testing, after running g/285, g/436, g/445 and
   g/448, I got [1]. Looks like they only takes ~25M space.

Thanks,
Zorro

[1]
# du -h /mnt/test/
25M     /mnt/test/
# du -h /mnt/test/seek_sanity_testfile*
4.0K    /mnt/test/seek_sanity_testfile
0       /mnt/test/seek_sanity_testfile01
4.0K    /mnt/test/seek_sanity_testfile02
12K     /mnt/test/seek_sanity_testfile03
4.0K    /mnt/test/seek_sanity_testfile04
4.0K    /mnt/test/seek_sanity_testfile05
8.0K    /mnt/test/seek_sanity_testfile06
44K     /mnt/test/seek_sanity_testfile07
44K     /mnt/test/seek_sanity_testfile08
404K    /mnt/test/seek_sanity_testfile09
128K    /mnt/test/seek_sanity_testfile10
128K    /mnt/test/seek_sanity_testfile11
128K    /mnt/test/seek_sanity_testfile12
4.0M    /mnt/test/seek_sanity_testfile13
4.0M    /mnt/test/seek_sanity_testfile14
12M     /mnt/test/seek_sanity_testfile15
4.0M    /mnt/test/seek_sanity_testfile16
0       /mnt/test/seek_sanity_testfile17
0       /mnt/test/seek_sanity_testfile_44818


>  # Override the default cleanup function.
>  _cleanup()
>  {
> -	rm -f $tmp.* $BASE_TEST_FILE.*
> +	rm -f $tmp.* $BASE_TEST_FILE*
>  }
>  
>  # Import common functions.
> diff --git a/tests/generic/445 b/tests/generic/445
> index 05d1c5b3..d9e9f84b 100755
> --- a/tests/generic/445
> +++ b/tests/generic/445
> @@ -16,7 +16,7 @@ BASE_TEST_FILE=$TEST_DIR/seek_sanity_testfile
>  # Override the default cleanup function.
>  _cleanup()
>  {
> -	rm -f $tmp.* $BASE_TEST_FILE.*
> +	rm -f $tmp.* $BASE_TEST_FILE*
>  }
>  
>  # Import common functions.
> diff --git a/tests/generic/448 b/tests/generic/448
> index d66967bc..11945549 100755
> --- a/tests/generic/448
> +++ b/tests/generic/448
> @@ -15,7 +15,7 @@ BASE_TEST_FILE=$TEST_DIR/seek_sanity_testfile_$seq
>  _cleanup()
>  {
>  	cd /
> -	rm -f $tmp.* $BASE_TEST_FILE
> +	rm -f $tmp.* $BASE_TEST_FILE*



>  }
>  
>  # Import common functions.
> -- 
> 2.37.3
> 




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux