From 7862a433e947a78b44bce80bb7e00eeb44d752cd Mon Sep 17 00:00:00 2001 From: Li-Wen Hsu Date: Tue, 6 Oct 2020 04:18:42 +0000 Subject: [PATCH] Clear the dmesg buffer to prevent rotating causes issues This is a workaround for the current continuously failing test case sys.kern.sonewconn_overflow.sonewconn_overflow_01 The side effect is the dmesg buffer got cleared and may effect other tests depends on dmesg output running in parallel. The better solution would be tailing the log file like /var/log/debug.log Sponsored by: The FreeBSD Foundation --- tests/sys/kern/sonewconn_overflow.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/sys/kern/sonewconn_overflow.py b/tests/sys/kern/sonewconn_overflow.py index c7eb983fb98..d94ebc63482 100644 --- a/tests/sys/kern/sonewconn_overflow.py +++ b/tests/sys/kern/sonewconn_overflow.py @@ -85,6 +85,8 @@ def __del__(self): class LogChecker(): def __init__(self): + # Clear the dmesg buffer to prevent rotating causes issues + os.system('/sbin/dmesg -c > /dev/null') # Figure out how big the dmesg buffer is. self.dmesgOff = len(check_output("/sbin/dmesg"))