Skip to contentSkip to conversation

check: clear WARN_ONCE state before each test

PATCH In review Lukas Czerner 3 participants 3 messages Jul 15, 2020 – Jul 19, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 check: clear WARN_ONCE state before each test

clear WARN_ONCE state before each test to allow a potential problem to be reported for each test

---
 check | 5 +++++
 1 file changed, 5 insertions(+)
check +5 -0
index 2e148e57..6ba64d5d 100755
@@ -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
Signature · 1 line
2.21.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Lukas Czerner

clear WARN_ONCE state before each test to allow a potential problem to be reported for each test

---
 check | 5 +++++
 1 file changed, 5 insertions(+)
check +0 -0
index 2e148e57..6ba64d5d 100755

check for section in $HOST_OPTIONS_SECTIONS; do · line 762

Quoted 7 lines
check +4 -0
@@ -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.

Quoted 7 lines
check +1 -0
+
 		if [ "$DUMP_OUTPUT" = true ]; then
 			_run_seq 2>&1 | tee $tmp.out
 			# Because $? would get tee's return code
Signature · 1 line
2.21.3
#2 lore raw
In reply to Lukas Czerner
Quoted 13 lines · Lukas Czerner

clear WARN_ONCE state before each test to allow a potential problem to be reported for each test

---
 check | 5 +++++
 1 file changed, 5 insertions(+)
check +0 -0
index 2e148e57..6ba64d5d 100755

check for section in $HOST_OPTIONS_SECTIONS; do · line 762

Quoted 7 lines
check +4 -0
@@ -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

Quoted 6 lines
check +1 -0
+
 		if [ "$DUMP_OUTPUT" = true ]; then
 			_run_seq 2>&1 | tee $tmp.out
 			# Because $? would get tee's return code
Signature · 1 line
2.21.3