[PATCH] tests: print test name to kernel log buffer

Johannes Berg johannes at sipsolutions.net
Tue Nov 24 04:27:57 PST 2015


From: Johannes Berg <johannes.berg at intel.com>

Print the test name to the kernel log buffer so debugging
cross-test issues becomes easier.

Signed-off-by: Johannes Berg <johannes.berg at intel.com>
---
 tests/hwsim/run-tests.py | 1 +
 tests/hwsim/vm/inside.sh | 1 +
 2 files changed, 2 insertions(+)

diff --git a/tests/hwsim/run-tests.py b/tests/hwsim/run-tests.py
index 13e360b3a2b9..c55ed8323698 100755
--- a/tests/hwsim/run-tests.py
+++ b/tests/hwsim/run-tests.py
@@ -400,6 +400,7 @@ def main():
             t = tests_to_run.pop(0)
 
         name = t.__name__.replace('test_', '', 1)
+        open('/dev/kmsg', 'w').write('running hwsim test case %s\n' % name)
         if log_handler:
             log_handler.stream.close()
             logger.removeHandler(log_handler)
diff --git a/tests/hwsim/vm/inside.sh b/tests/hwsim/vm/inside.sh
index abaaf35c4284..a060bc5dc11e 100755
--- a/tests/hwsim/vm/inside.sh
+++ b/tests/hwsim/vm/inside.sh
@@ -31,6 +31,7 @@ mknod -m 660 /dev/ttyS0 c 4 64
 mknod -m 660 /dev/random c 1 8
 mknod -m 660 /dev/urandom c 1 9
 mknod -m 666 /dev/null c 1 3
+mknod -m 666 /dev/kmsg c 1 11
 test -f /sys/class/misc/rfkill/dev && \
 	mknod -m 660 /dev/rfkill c $(cat /sys/class/misc/rfkill/dev | tr ':' ' ')
 ln -s /proc/self/fd/0 /dev/stdin
-- 
2.6.2




More information about the Hostap mailing list