]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Write TEST-START and TEST-STOP into kernel logs with timestamps
authorJouni Malinen <j@w1.fi>
Sat, 27 May 2017 08:08:16 +0000 (11:08 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 27 May 2017 08:08:16 +0000 (11:08 +0300)
This makes it easier to synchronize log entries in the kernel log
(seconds from boot) and wpa_supplicant/hostapd (UNIX timestamp).

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/run-tests.py

index 80981ba06c7d1812cce9b4d168933e328af1323e..fb33a37f1954d8f23226639929a4e84c79aa6694 100755 (executable)
@@ -424,6 +424,7 @@ def main():
             if t.__doc__:
                 logger.info("Test: " + t.__doc__)
             start = datetime.now()
+            open('/dev/kmsg', 'w').write('TEST-START %s @%.6f\n' % (name, time.time()))
             for d in dev:
                 try:
                     d.dump_monitor()
@@ -468,6 +469,7 @@ def main():
                 if args.loglevel == logging.WARNING:
                     print "Exception: " + str(e)
                 result = "FAIL"
+            open('/dev/kmsg', 'w').write('TEST-STOP %s @%.6f\n' % (name, time.time()))
             for d in dev:
                 try:
                     d.dump_monitor()