* [PATCH 0/3] fstests: -I <n> CLI option and some random fixes
@ 2021-02-11 3:31 Ritesh Harjani
2021-02-11 3:31 ` [PATCHv2 1/3] check: add CLI option to repeat and stop tests in case of failure Ritesh Harjani
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Ritesh Harjani @ 2021-02-11 3:31 UTC (permalink / raw)
To: fstests; +Cc: guan, anju, Ritesh Harjani
Patch-1: is a v2 with comments addressed from Eryu.
Patch-{2,3}: are random fixes found during testing.
Ritesh Harjani (3):
check: add CLI option to repeat and stop tests in case of failure
common/rc: Add _require_get_hugepagesize and fix
_require_label_get_max
generic/{413/605}: Add _require_get_hugepagesize check
check | 8 ++++++++
common/rc | 8 +++++++-
tests/generic/413 | 1 +
tests/generic/605 | 1 +
4 files changed, 17 insertions(+), 1 deletion(-)
--
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCHv2 1/3] check: add CLI option to repeat and stop tests in case of failure
2021-02-11 3:31 [PATCH 0/3] fstests: -I <n> CLI option and some random fixes Ritesh Harjani
@ 2021-02-11 3:31 ` Ritesh Harjani
2021-02-11 3:31 ` [PATCH 2/3] common/rc: Add _require_get_hugepagesize and fix _require_label_get_max Ritesh Harjani
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Ritesh Harjani @ 2021-02-11 3:31 UTC (permalink / raw)
To: fstests; +Cc: guan, anju, Ritesh Harjani
Currently with -i <n> option the test can run for many iterations,
but in case if we want to stop the iteration in case of a failure,
it is much easier to have such an option which could check the failed
status and stop the test from further proceeding.
This patch adds such an option (-I <n>) thereby extending the -i <n> option
functionality.
Signed-off-by: Ritesh Harjani <riteshh@linux.ibm.com>
---
check | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/check b/check
index c6ad1d6c0733..6760d066955d 100755
--- a/check
+++ b/check
@@ -27,6 +27,7 @@ brief_test_summary=false
do_report=false
DUMP_OUTPUT=false
iterations=1
+istop=false
# This is a global variable used to pass test failure text to reporting gunk
_err_msg=""
@@ -68,6 +69,7 @@ check options
-T output timestamps
-r randomize test order
-i <n> iterate the test list <n> times
+ -I <n> iterate the test list <n> times, but stops iterating further in case of any test failure
-d dump test output to stdout
-b brief test summary
-R fmt[,fmt] generate report in formats specified. Supported format: [xunit]
@@ -300,6 +302,7 @@ while [ $# -gt 0 ]; do
-n) showme=true ;;
-r) randomize=true ;;
-i) iterations=$2; shift ;;
+ -I) iterations=$2; istop=true; shift ;;
-T) timestamp=true ;;
-d) DUMP_OUTPUT=true ;;
-b) brief_test_summary=true;;
@@ -926,6 +929,11 @@ function run_section()
for ((iters = 0; iters < $iterations; iters++)) do
for section in $HOST_OPTIONS_SECTIONS; do
run_section $section
+ if [ "$sum_bad" != 0 ] && [ "$istop" = true ]; then
+ interrupt=false
+ status=`expr $sum_bad != 0`
+ exit
+ fi
done
done
--
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] common/rc: Add _require_get_hugepagesize and fix _require_label_get_max
2021-02-11 3:31 [PATCH 0/3] fstests: -I <n> CLI option and some random fixes Ritesh Harjani
2021-02-11 3:31 ` [PATCHv2 1/3] check: add CLI option to repeat and stop tests in case of failure Ritesh Harjani
@ 2021-02-11 3:31 ` Ritesh Harjani
2021-03-07 16:00 ` Eryu Guan
2021-02-11 3:31 ` [PATCH 3/3] generic/{413/605}: Add _require_get_hugepagesize check Ritesh Harjani
2021-03-01 6:01 ` [PATCH 0/3] fstests: -I <n> CLI option and some random fixes Ritesh Harjani
3 siblings, 1 reply; 6+ messages in thread
From: Ritesh Harjani @ 2021-02-11 3:31 UTC (permalink / raw)
To: fstests; +Cc: guan, anju, Ritesh Harjani
_notrun executed from a subshell $(cmd) won't exit it's parent.
Hence _require_*** functions shouldn't have below statements.
dummy=$(_label_get_max)
Also add a function _require_get_hugepagesize(), since it seems the
intention of _get_hugepagesize() is to also '_notrun' when the hugepagesize
is not a valid number.
Signed-off-by: Ritesh Harjani <riteshh@linux.ibm.com>
---
common/rc | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/common/rc b/common/rc
index 649b1cfd884a..1831714198af 100644
--- a/common/rc
+++ b/common/rc
@@ -175,6 +175,12 @@ _get_hugepagesize()
echo $((hugepgsz * 1024))
}
+_require_get_hugepagesize()
+{
+ # Just a dummy for _notrun if hugepagesize is not supported
+ _get_hugepagesize
+}
+
_mount()
{
$MOUNT_PROG `_mount_ops_filter $*`
@@ -4250,7 +4256,7 @@ _label_get_max()
_require_label_get_max()
{
# Just call _label_get_max which will notrun if appropriate
- dummy=$(_label_get_max)
+ _label_get_max
}
_dmsetup_remove()
--
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] generic/{413/605}: Add _require_get_hugepagesize check
2021-02-11 3:31 [PATCH 0/3] fstests: -I <n> CLI option and some random fixes Ritesh Harjani
2021-02-11 3:31 ` [PATCHv2 1/3] check: add CLI option to repeat and stop tests in case of failure Ritesh Harjani
2021-02-11 3:31 ` [PATCH 2/3] common/rc: Add _require_get_hugepagesize and fix _require_label_get_max Ritesh Harjani
@ 2021-02-11 3:31 ` Ritesh Harjani
2021-03-01 6:01 ` [PATCH 0/3] fstests: -I <n> CLI option and some random fixes Ritesh Harjani
3 siblings, 0 replies; 6+ messages in thread
From: Ritesh Harjani @ 2021-02-11 3:31 UTC (permalink / raw)
To: fstests; +Cc: guan, anju, Ritesh Harjani
This adds _require_get_hugepagesize() check at the beginning,
which seems like was the intention earlier behind function
_get_hugepagesize().
Signed-off-by: Ritesh Harjani <riteshh@linux.ibm.com>
---
tests/generic/413 | 1 +
tests/generic/605 | 1 +
2 files changed, 2 insertions(+)
diff --git a/tests/generic/413 b/tests/generic/413
index 503c7c999d4f..7db8d756abc7 100755
--- a/tests/generic/413
+++ b/tests/generic/413
@@ -34,6 +34,7 @@ _require_scratch_dax_mountopt "dax"
_require_test_program "feature"
_require_test_program "t_mmap_dio"
_require_xfs_io_command "falloc"
+_require_get_hugepagesize
prep_files()
{
diff --git a/tests/generic/605 b/tests/generic/605
index 1e2d71882dd0..7620e148e4b3 100755
--- a/tests/generic/605
+++ b/tests/generic/605
@@ -34,6 +34,7 @@ _require_test_program "feature"
_require_test_program "t_mmap_dio"
_require_dax_iflag
_require_xfs_io_command "falloc"
+_require_get_hugepagesize
SRC_DIR=$SCRATCH_MNT/src
SRC_FILE=$SRC_DIR/tf_s
--
Ritesh Harjani (signature)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] fstests: -I <n> CLI option and some random fixes
2021-02-11 3:31 [PATCH 0/3] fstests: -I <n> CLI option and some random fixes Ritesh Harjani
` (2 preceding siblings ...)
2021-02-11 3:31 ` [PATCH 3/3] generic/{413/605}: Add _require_get_hugepagesize check Ritesh Harjani
@ 2021-03-01 6:01 ` Ritesh Harjani
3 siblings, 0 replies; 6+ messages in thread
From: Ritesh Harjani @ 2021-03-01 6:01 UTC (permalink / raw)
To: fstests; +Cc: guan, anju
On 2/11/21 9:01 AM, Ritesh Harjani wrote:
> Patch-1: is a v2 with comments addressed from Eryu.
> Patch-{2,3}: are random fixes found during testing.
>
> Ritesh Harjani (3):
> check: add CLI option to repeat and stop tests in case of failure
> common/rc: Add _require_get_hugepagesize and fix
> _require_label_get_max
> generic/{413/605}: Add _require_get_hugepagesize check
>
> check | 8 ++++++++
> common/rc | 8 +++++++-
> tests/generic/413 | 1 +
> tests/generic/605 | 1 +
> 4 files changed, 17 insertions(+), 1 deletion(-)
>
Ping.
-ritesh
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/3] common/rc: Add _require_get_hugepagesize and fix _require_label_get_max
2021-02-11 3:31 ` [PATCH 2/3] common/rc: Add _require_get_hugepagesize and fix _require_label_get_max Ritesh Harjani
@ 2021-03-07 16:00 ` Eryu Guan
0 siblings, 0 replies; 6+ messages in thread
From: Eryu Guan @ 2021-03-07 16:00 UTC (permalink / raw)
To: Ritesh Harjani; +Cc: fstests, anju
On Thu, Feb 11, 2021 at 09:01:45AM +0530, Ritesh Harjani wrote:
> _notrun executed from a subshell $(cmd) won't exit it's parent.
> Hence _require_*** functions shouldn't have below statements.
> dummy=$(_label_get_max)
> Also add a function _require_get_hugepagesize(), since it seems the
> intention of _get_hugepagesize() is to also '_notrun' when the hugepagesize
> is not a valid number.
>
> Signed-off-by: Ritesh Harjani <riteshh@linux.ibm.com>
> ---
> common/rc | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/common/rc b/common/rc
> index 649b1cfd884a..1831714198af 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -175,6 +175,12 @@ _get_hugepagesize()
> echo $((hugepgsz * 1024))
> }
>
> +_require_get_hugepagesize()
> +{
> + # Just a dummy for _notrun if hugepagesize is not supported
> + _get_hugepagesize
> +}
> +
I think this hunk should be moved to patch 3.
Otherwise patch looks fine to me. And I applied patch 1 for next update,
thanks!
Eryu
> _mount()
> {
> $MOUNT_PROG `_mount_ops_filter $*`
> @@ -4250,7 +4256,7 @@ _label_get_max()
> _require_label_get_max()
> {
> # Just call _label_get_max which will notrun if appropriate
> - dummy=$(_label_get_max)
> + _label_get_max
> }
>
> _dmsetup_remove()
> --
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-03-07 16:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-11 3:31 [PATCH 0/3] fstests: -I <n> CLI option and some random fixes Ritesh Harjani
2021-02-11 3:31 ` [PATCHv2 1/3] check: add CLI option to repeat and stop tests in case of failure Ritesh Harjani
2021-02-11 3:31 ` [PATCH 2/3] common/rc: Add _require_get_hugepagesize and fix _require_label_get_max Ritesh Harjani
2021-03-07 16:00 ` Eryu Guan
2021-02-11 3:31 ` [PATCH 3/3] generic/{413/605}: Add _require_get_hugepagesize check Ritesh Harjani
2021-03-01 6:01 ` [PATCH 0/3] fstests: -I <n> CLI option and some random fixes Ritesh Harjani
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.