From 4c37c133e4bf703d023995535f1e264d8658e08e Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 25 Feb 2021 15:20:44 +0100 Subject: executor: improve SYZFAIL message Print details and errno after SYZFAIL line. pkg/report captures output after SYZFAIL line, so it's better to have details after that line so that they are captured in report. --- executor/executor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'executor/executor.cc') diff --git a/executor/executor.cc b/executor/executor.cc index 80fdc49cc..0dec5e166 100644 --- a/executor/executor.cc +++ b/executor/executor.cc @@ -1511,6 +1511,7 @@ void setup_features(char** enable, int n) void failmsg(const char* err, const char* msg, ...) { int e = errno; + fprintf(stderr, "SYZFAIL: %s\n", err); if (msg) { va_list args; va_start(args, msg); @@ -1518,7 +1519,6 @@ void failmsg(const char* err, const char* msg, ...) va_end(args); } fprintf(stderr, " (errno %d: %s)\n", e, strerror(e)); - fprintf(stderr, "SYZFAIL: %s\n", err); // fail()'s are often used during the validation of kernel reactions to queries // that were issued by pseudo syscalls implementations. As fault injection may -- cgit mrf-deployment