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
This commit is contained in:
Li-Wen Hsu 2020-10-06 04:18:42 +00:00
parent f165a1df9a
commit 7862a433e9

View File

@ -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"))