From: Bandan Das <bsd@redhat.com>
To: Nadav Amit <namit@cs.technion.ac.il>
Cc: pbonzini@redhat.com, gleb@kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH] x86: realmode: report failures
Date: Mon, 09 Jun 2014 17:43:54 -0400 [thread overview]
Message-ID: <jpglht57o85.fsf@redhat.com> (raw)
In-Reply-To: <1402012828-30006-1-git-send-email-namit@cs.technion.ac.il> (Nadav Amit's message of "Fri, 6 Jun 2014 03:00:28 +0300")
Nadav Amit <namit@cs.technion.ac.il> writes:
> The current realmode tests always report success when done, regardless to
> whether any of the tests failed. Although the log includes the individual test
> results, this behavior complicates the life of the tester.
Please include kvm-unit-tests in the subject line for easier identifiability
where the patch belongs.
> Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
> ---
> x86/realmode.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/x86/realmode.c b/x86/realmode.c
> index 6e74883..dc4a1d3 100644
> --- a/x86/realmode.c
> +++ b/x86/realmode.c
> @@ -103,6 +103,8 @@ static void print_serial_u32(u32 value)
> print_serial(p);
> }
>
> +static int failed;
> +
> static void exit(int code)
> {
> outb(code, 0xf4);
> @@ -222,6 +224,8 @@ static void report(const char *name, u16 regs_ignore, _Bool ok)
> print_serial(ok ? "PASS: " : "FAIL: ");
> print_serial(name);
> print_serial("\n");
> + if (!ok)
> + failed = 1;
> }
I was confused at first since there is also a common "report" function
in lib/report.c We should probably rename this function to something else,
eg- realmode_report() if the common function can't be reused here.
> #define MK_INSN(name, str) \
> @@ -1715,7 +1719,7 @@ void realmode_start(void)
> test_perf_memory_store();
> test_perf_memory_rmw();
>
> - exit(0);
> + exit(failed);
> }
>
> unsigned long long r_gdt[] = { 0, 0x9b000000ffff, 0x93000000ffff };
prev parent reply other threads:[~2014-06-09 21:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-06 0:00 [PATCH] x86: realmode: report failures Nadav Amit
2014-06-09 21:43 ` Bandan Das [this message]
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=jpglht57o85.fsf@redhat.com \
--to=bsd@redhat.com \
--cc=gleb@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=namit@cs.technion.ac.il \
--cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.