From: Sebastian Mitterle <smitterl@redhat.com>
To: peter.maydell@linaro.org
Cc: thuth@redhat.com, qemu-s390x@nongnu.org, qemu-devel@nongnu.org
Subject: [PATCH] risu: Add test summary
Date: Wed, 8 Nov 2023 11:23:56 -0500 [thread overview]
Message-ID: <20231108162356.36670-1-smitterl@redhat.com> (raw)
Currently, a successful test run finishes silently with exit code 0.
The last message on the console is "starting image" which can leave
the user wondering if they executed the commands correctly.
Now add a summary of the number of executed instructions in case
of success. Don't add that message when printing the trace to
stdout (`-t -`).
Tested:
a) master/apprentice mode
b) trace mode to file
c) trace mode to stdout
Suggested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Sebastian Mitterle <smitterl@redhat.com>
---
risu.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/risu.c b/risu.c
index 36fc82a..740663a 100644
--- a/risu.c
+++ b/risu.c
@@ -551,6 +551,7 @@ int main(int argc, char **argv)
struct option *longopts;
char *shortopts;
stack_t ss;
+ int ret;
longopts = setup_options(&shortopts);
@@ -635,8 +636,15 @@ int main(int argc, char **argv)
arch_init();
if (ismaster) {
- return master();
+ ret = master();
} else {
- return apprentice();
+ ret = apprentice();
}
+
+ if (ret == EXIT_SUCCESS && (!trace || (trace && strcmp(trace_fn, "-") != 0))) {
+ fprintf(stderr, "No mismatches found. Executed %zd checkpoints.\n",
+ signal_count);
+ }
+
+ return ret;
}
--
2.41.0
next reply other threads:[~2023-11-08 16:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-08 16:23 Sebastian Mitterle [this message]
2023-11-13 17:04 ` [PATCH] risu: Add test summary Thomas Huth
2023-11-13 17:14 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231108162356.36670-1-smitterl@redhat.com \
--to=smitterl@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).