Re: [PATCH 1/2] fstests: use _require_symlinks on all necessary tests

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



On Thu, Apr 09, 2020 at 02:09:04PM -0500, Eric Sandeen wrote:
> Consistently use _require_symlinks on all generic tests which
> create a symlink.
> 
> Rename an old require function, "_require_test_symlinks" to simply

Wait, we're adding and renaming at the same time?

One thing per patch, please...

> "_require_symlinks" because it's reasonable to assume that if the
> test device doesn't support it, neither does the scratch device
> and vice versa.
> 
> Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
> ---
> 
> diff --git a/common/rc b/common/rc
> index 24a8f145..476d3d07 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -3481,14 +3481,14 @@ run_check()
>  	"$@" >> $seqres.full 2>&1 || _fail "failed: '$@'"
>  }
>  
> -_require_test_symlinks()
> +_require_symlinks()
>  {
>  	local target=`mktemp -p $TEST_DIR`
>  	local link=`mktemp -p $TEST_DIR -u`
>  	ln -s `basename $target` $link
>  	if [ "$?" -ne 0 ]; then
>  		rm -f $target
> -		_notrun "Require symlinks support"
> +		_notrun "No symlink support"
>  	fi
>  	rm -f $target $link
>  }
> diff --git a/tests/generic/005 b/tests/generic/005
> index 118fca20..c49109e9 100755
> --- a/tests/generic/005
> +++ b/tests/generic/005
> @@ -48,7 +48,7 @@ _touch()
>  # real QA test starts here
>  _supported_fs generic
>  _require_test
> -_require_test_symlinks
> +_require_symlinks
>  
>  _supported_os Linux
>  
> diff --git a/tests/generic/023 b/tests/generic/023
> index ea40f3d2..1cfa25cd 100755
> --- a/tests/generic/023
> +++ b/tests/generic/023
> @@ -30,7 +30,7 @@ _supported_os Linux
>  
>  _require_test
>  _require_renameat2
> -_require_test_symlinks
> +_require_symlinks
>  
>  # real QA test starts here
>  
> diff --git a/tests/generic/024 b/tests/generic/024
> index 531a515f..b6ac4182 100755
> --- a/tests/generic/024
> +++ b/tests/generic/024
> @@ -30,7 +30,7 @@ _supported_os Linux
>  
>  _require_test
>  _require_renameat2 noreplace
> -_require_test_symlinks
> +_require_symlinks
>  
>  # real QA test starts here
>  
> diff --git a/tests/generic/025 b/tests/generic/025
> index e69d655f..e0f71375 100755
> --- a/tests/generic/025
> +++ b/tests/generic/025
> @@ -30,7 +30,6 @@ _supported_os Linux
>  
>  _require_test
>  _require_renameat2 exchange
> -_require_test_symlinks

This drops _require_symlinks, in a add/renaming patch...

/me confused.

--D

>  
>  # real QA test starts here
>  
> diff --git a/tests/generic/062 b/tests/generic/062
> index 3fef02e8..ba744885 100755
> --- a/tests/generic/062
> +++ b/tests/generic/062
> @@ -59,6 +59,7 @@ _supported_os Linux
>  
>  _require_scratch
>  _require_attrs
> +_require_symlinks
>  
>  rm -f $tmp.backup1 $tmp.backup2 $seqres.full
>  
> diff --git a/tests/generic/067 b/tests/generic/067
> index bd72dc85..d4c710d2 100755
> --- a/tests/generic/067
> +++ b/tests/generic/067
> @@ -37,7 +37,7 @@ _cleanup()
>  # Modify as appropriate.
>  _supported_fs generic
>  _supported_os Linux
> -_require_test_symlinks
> +_require_symlinks
>  _require_test
>  _require_scratch
>  _require_loop
> diff --git a/tests/generic/078 b/tests/generic/078
> index a421a8ab..ccc5c8d5 100755
> --- a/tests/generic/078
> +++ b/tests/generic/078
> @@ -30,7 +30,6 @@ _supported_os Linux
>  
>  _require_test
>  _require_renameat2 whiteout
> -_require_test_symlinks
>  
>  # real QA test starts here
>  
> diff --git a/tests/generic/109 b/tests/generic/109
> index 8be70c23..549a95b1 100755
> --- a/tests/generic/109
> +++ b/tests/generic/109
> @@ -29,6 +29,7 @@ _cleanup()
>  _supported_fs generic
>  _supported_os Linux
>  _require_scratch
> +_require_symlinks
>  
>  rm -f $seqres.full
>  
> diff --git a/tests/generic/294 b/tests/generic/294
> index b74579ac..32c89b03 100755
> --- a/tests/generic/294
> +++ b/tests/generic/294
> @@ -32,6 +32,7 @@ _cleanup()
>  _supported_fs generic
>  _supported_os Linux
>  _require_scratch
> +_require_symlinks
>  
>  rm -f $seqres.full
>  _scratch_mkfs > $seqres.full 2>&1 || _fail "Could not mkfs scratch device"
> diff --git a/tests/generic/306 b/tests/generic/306
> index 081d1a89..046f4516 100755
> --- a/tests/generic/306
> +++ b/tests/generic/306
> @@ -33,6 +33,7 @@ _supported_fs generic
>  _supported_os Linux
>  _require_scratch
>  _require_test
> +_require_symlinks
>  
>  DEVNULL=$SCRATCH_MNT/devnull
>  DEVZERO=$SCRATCH_MNT/devzero
> diff --git a/tests/generic/348 b/tests/generic/348
> index 630ff160..e0139d9a 100755
> --- a/tests/generic/348
> +++ b/tests/generic/348
> @@ -32,6 +32,7 @@ _cleanup()
>  _supported_fs generic
>  _supported_os Linux
>  _require_scratch
> +_require_symlinks
>  _require_dm_target flakey
>  
>  rm -f $seqres.full
> diff --git a/tests/generic/360 b/tests/generic/360
> index a9a4f2f9..f15548e2 100755
> --- a/tests/generic/360
> +++ b/tests/generic/360
> @@ -31,6 +31,7 @@ rm -f $seqres.full
>  _supported_fs generic
>  _supported_os Linux
>  _require_test
> +_require_symlinks
>  
>  linkfile=$TEST_DIR/$seq.symlink
>  rm -f $linkfile
> diff --git a/tests/generic/397 b/tests/generic/397
> index f2e22950..c2245bd5 100755
> --- a/tests/generic/397
> +++ b/tests/generic/397
> @@ -36,6 +36,7 @@ rm -f $seqres.full
>  # real QA test starts here
>  _supported_fs generic
>  _supported_os Linux
> +_require_symlinks
>  _require_scratch_encryption
>  _require_command "$KEYCTL_PROG" keyctl
>  
> diff --git a/tests/generic/399 b/tests/generic/399
> index a9b3997a..a4013720 100755
> --- a/tests/generic/399
> +++ b/tests/generic/399
> @@ -43,6 +43,7 @@ rm -f $seqres.full
>  _supported_fs generic
>  _supported_os Linux
>  _require_scratch_encryption
> +_require_symlinks
>  _require_command "$XZ_PROG" xz
>  _require_command "$KEYCTL_PROG" keyctl
>  
> diff --git a/tests/generic/401 b/tests/generic/401
> index 9d45fbcd..00e9bbe0 100755
> --- a/tests/generic/401
> +++ b/tests/generic/401
> @@ -37,6 +37,7 @@ _cleanup()
>  _supported_fs generic
>  _supported_os Linux
>  _require_scratch
> +_require_symlinks
>  _require_test_program "t_dir_type"
>  
>  rm -f $seqres.full
> diff --git a/tests/generic/423 b/tests/generic/423
> index b61d5de0..6db55fd6 100755
> --- a/tests/generic/423
> +++ b/tests/generic/423
> @@ -38,6 +38,7 @@ _require_test
>  _require_test_program "stat_test"
>  _require_test_program "af_unix"
>  _require_statx
> +_require_symlinks
>  
>  function check_stat () {
>  	$here/src/stat_test $* || echo stat_test failed
> diff --git a/tests/generic/440 b/tests/generic/440
> index 1ec1ed48..3446c147 100755
> --- a/tests/generic/440
> +++ b/tests/generic/440
> @@ -38,6 +38,7 @@ rm -f $seqres.full
>  _supported_fs generic
>  _supported_os Linux
>  _require_scratch_encryption
> +_require_symlinks
>  _require_command "$KEYCTL_PROG" keyctl
>  
>  # Set up an encryption-capable filesystem and an encryption key.
> diff --git a/tests/generic/479 b/tests/generic/479
> index ad20aaee..aaf864a4 100755
> --- a/tests/generic/479
> +++ b/tests/generic/479
> @@ -32,6 +32,7 @@ _cleanup()
>  _supported_fs generic
>  _supported_os Linux
>  _require_scratch
> +_require_symlinks
>  _require_dm_target flakey
>  
>  rm -f $seqres.full
> diff --git a/tests/generic/556 b/tests/generic/556
> index b7239e34..4899b403 100755
> --- a/tests/generic/556
> +++ b/tests/generic/556
> @@ -19,6 +19,7 @@ _supported_os Linux
>  _supported_fs generic
>  _require_scratch_nocheck
>  _require_scratch_casefold
> +_require_symlinks
>  _require_check_dmesg
>  _require_attrs
>  
> 



[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