Skip to contentSkip to conversation

ktest: Add logfile to failure directory

PATCH New Steven Rostedt 1 participant 1 message Apr 20 Ktest

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ktest: Add logfile to failure directory

From: Steven Rostedt <[email protected]>

The logfile contains a lot of useful information about the tests being run. Add it to the stored failure directory when the test fails.

---
 tools/testing/ktest/ktest.pl | 6 ++++++
 1 file changed, 6 insertions(+)
tools/testing/ktest/ktest.pl +6 -0
index dd55eea15070..f94ed2e98887 100755
@@ -1878,6 +1878,12 @@ sub save_logs {
 	"testlog" => $testlog,
     );
 
+    if (defined($opt{"LOG_FILE"})) {
+	if (-f $opt{"LOG_FILE"}) {
+	    cp $opt{"LOG_FILE"}, "$dir/logfile";
+	}
+    }
+
     while (my ($name, $source) = each(%files)) {
 	if (-f "$source") {
 	    cp "$source", "$dir/$name" or
Signature · 1 line
2.51.0