Re: [PATCH 1/2] check: add a -smoketest option

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

 



On Tue, Jul 18, 2023 at 06:10:56PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> Create a "-smoketest" parameter to check that will run generic
> filesystem smoke testing for five minutes apiece.  Since there are only
> five smoke tests, this is effectively a 16min super-quick test.
> 
> With gcov enabled, running these tests yields about ~75% coverage for
> iomap and ~60% for xfs; or ~50% for ext4 and ~75% for ext4; and ~45% for
> btrfs.  Coverage was about ~65% for the pagecache.
> 
> Cc: tytso@xxxxxxx
> Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
> ---
>  check               |    6 +++++-
>  doc/group-names.txt |    1 +
>  tests/generic/475   |    2 +-
>  tests/generic/476   |    2 +-
>  tests/generic/521   |    2 +-
>  tests/generic/522   |    2 +-
>  tests/generic/642   |    2 +-
>  7 files changed, 11 insertions(+), 6 deletions(-)
> 
> 
> diff --git a/check b/check
> index 89e7e7bf20..97c7c4c7d1 100755
> --- a/check
> +++ b/check
> @@ -68,6 +68,7 @@ check options
>      -pvfs2		test PVFS2
>      -tmpfs		test TMPFS
>      -ubifs		test ubifs
> +    -smoketest		run smoke tests for 4min each

We have both "smoketest" and "smoke", that's a bit confused :)

>      -l			line mode diff
>      -udiff		show unified diff (default)
>      -n			show me, do not run tests
> @@ -290,7 +291,10 @@ while [ $# -gt 0 ]; do
>  		FSTYP=overlay
>  		export OVERLAY=true
>  		;;
> -
> +	-smoketest)

Hmm... I'm wondering if it's worth having a specific running option for
someone test group. If each "meaningful" testing way need a specific check
option, the ./check file will be too complicated.

If we need some recommended test ways, how about make some separated wrappers
of ./check? For example:

# mkdir fstests/runtest/
# cat > fstests/runtest/smoketest <<EOF
export SOAK_DURATION="4m"
./check -g smoketest
EOF

Of course you can write more codes in it.

Thanks,
Zorro

> +		SOAK_DURATION="4m"
> +		GROUP_LIST="smoketest"
> +		;;
>  	-g)	group=$2 ; shift ;
>  		GROUP_LIST="$GROUP_LIST ${group//,/ }"
>  		;;
> diff --git a/doc/group-names.txt b/doc/group-names.txt
> index 1c35a39432..c3dcca3755 100644
> --- a/doc/group-names.txt
> +++ b/doc/group-names.txt
> @@ -118,6 +118,7 @@ selftest		tests with fixed results, used to validate testing setup
>  send			btrfs send/receive
>  shrinkfs		decreasing the size of a filesystem
>  shutdown		FS_IOC_SHUTDOWN ioctl
> +smoketest		Simple smoke tests
>  snapshot		btrfs snapshots
>  soak			long running soak tests whose runtime can be controlled
>                          directly by setting the SOAK_DURATION variable
> diff --git a/tests/generic/475 b/tests/generic/475
> index 0cbf5131c2..ce7fe013b1 100755
> --- a/tests/generic/475
> +++ b/tests/generic/475
> @@ -12,7 +12,7 @@
>  # testing efforts.
>  #
>  . ./common/preamble
> -_begin_fstest shutdown auto log metadata eio recoveryloop
> +_begin_fstest shutdown auto log metadata eio recoveryloop smoketest
>  
>  # Override the default cleanup function.
>  _cleanup()
> diff --git a/tests/generic/476 b/tests/generic/476
> index 8e93b73457..b1ae4df4d4 100755
> --- a/tests/generic/476
> +++ b/tests/generic/476
> @@ -8,7 +8,7 @@
>  # bugs in the write path.
>  #
>  . ./common/preamble
> -_begin_fstest auto rw long_rw stress soak
> +_begin_fstest auto rw long_rw stress soak smoketest
>  
>  # Override the default cleanup function.
>  _cleanup()
> diff --git a/tests/generic/521 b/tests/generic/521
> index 22dd31a8ec..0956e50171 100755
> --- a/tests/generic/521
> +++ b/tests/generic/521
> @@ -7,7 +7,7 @@
>  # Long-soak directio fsx test
>  #
>  . ./common/preamble
> -_begin_fstest soak long_rw
> +_begin_fstest soak long_rw smoketest
>  
>  # Import common functions.
>  . ./common/filter
> diff --git a/tests/generic/522 b/tests/generic/522
> index f0cbcb245c..0e4e6009ed 100755
> --- a/tests/generic/522
> +++ b/tests/generic/522
> @@ -7,7 +7,7 @@
>  # Long-soak buffered fsx test
>  #
>  . ./common/preamble
> -_begin_fstest soak long_rw
> +_begin_fstest soak long_rw smoketest
>  
>  # Import common functions.
>  . ./common/filter
> diff --git a/tests/generic/642 b/tests/generic/642
> index eba90903a3..e6a475a8b5 100755
> --- a/tests/generic/642
> +++ b/tests/generic/642
> @@ -8,7 +8,7 @@
>  # bugs in the xattr code.
>  #
>  . ./common/preamble
> -_begin_fstest auto soak attr long_rw stress
> +_begin_fstest auto soak attr long_rw stress smoketest
>  
>  _cleanup()
>  {
> 




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux