diff mbox series

check: clear WARN_ONCE state before each test

Message ID 20200715114219.18353-1-lczerner@redhat.com (mailing list archive)
State New, archived
Headers show
Series check: clear WARN_ONCE state before each test | expand

Commit Message

Lukas Czerner July 15, 2020, 11:42 a.m. UTC
clear WARN_ONCE state before each test to allow a potential problem
to be reported for each test

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
 check | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Zorro Lang July 17, 2020, 6:22 a.m. UTC | #1
On Wed, Jul 15, 2020 at 01:42:19PM +0200, Lukas Czerner wrote:
> clear WARN_ONCE state before each test to allow a potential problem
> to be reported for each test
> 
> Signed-off-by: Lukas Czerner <lczerner@redhat.com>
> ---
>  check | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/check b/check
> index 2e148e57..6ba64d5d 100755
> --- a/check
> +++ b/check
> @@ -756,6 +756,11 @@ for section in $HOST_OPTIONS_SECTIONS; do
>  			touch ${RESULT_DIR}/check_dmesg
>  		fi
>  		_try_wipe_scratch_devs > /dev/null 2>&1
> +
> +		# clear the WARN_ONCE state to allow a potential problem
> +		# to be reported for each test
> +		(echo 1 > /sys/kernel/debug/clear_warn_once) > /dev/null 2>&1

Good to me.

Reviewed-by: Zorro Lang <zlang@redhat.com>

> +
>  		if [ "$DUMP_OUTPUT" = true ]; then
>  			_run_seq 2>&1 | tee $tmp.out
>  			# Because $? would get tee's return code
> -- 
> 2.21.3
>
Eryu Guan July 19, 2020, 5:23 p.m. UTC | #2
On Wed, Jul 15, 2020 at 01:42:19PM +0200, Lukas Czerner wrote:
> clear WARN_ONCE state before each test to allow a potential problem
> to be reported for each test
> 
> Signed-off-by: Lukas Czerner <lczerner@redhat.com>
> ---
>  check | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/check b/check
> index 2e148e57..6ba64d5d 100755
> --- a/check
> +++ b/check
> @@ -756,6 +756,11 @@ for section in $HOST_OPTIONS_SECTIONS; do
>  			touch ${RESULT_DIR}/check_dmesg
>  		fi
>  		_try_wipe_scratch_devs > /dev/null 2>&1
> +
> +		# clear the WARN_ONCE state to allow a potential problem
> +		# to be reported for each test
> +		(echo 1 > /sys/kernel/debug/clear_warn_once) > /dev/null 2>&1

Thanks for the fix! I replaced "/sys/kernel/debug" with $DEBUGFS_MNT on commit.

Thanks,
Eryu

> +
>  		if [ "$DUMP_OUTPUT" = true ]; then
>  			_run_seq 2>&1 | tee $tmp.out
>  			# Because $? would get tee's return code
> -- 
> 2.21.3
diff mbox series

Patch

diff --git a/check b/check
index 2e148e57..6ba64d5d 100755
--- a/check
+++ b/check
@@ -756,6 +756,11 @@  for section in $HOST_OPTIONS_SECTIONS; do
 			touch ${RESULT_DIR}/check_dmesg
 		fi
 		_try_wipe_scratch_devs > /dev/null 2>&1
+
+		# clear the WARN_ONCE state to allow a potential problem
+		# to be reported for each test
+		(echo 1 > /sys/kernel/debug/clear_warn_once) > /dev/null 2>&1
+
 		if [ "$DUMP_OUTPUT" = true ]; then
 			_run_seq 2>&1 | tee $tmp.out
 			# Because $? would get tee's return code