[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 2/2] tests/tcg/s390x: Test SIGILL and SIGSEGV handling
From: |
Ilya Leoshkevich |
Subject: |
Re: [PATCH v3 2/2] tests/tcg/s390x: Test SIGILL and SIGSEGV handling |
Date: |
Mon, 21 Jun 2021 13:58:55 +0200 |
User-agent: |
Evolution 3.38.4 (3.38.4-1.fc33) |
On Fri, 2021-06-18 at 09:47 -0400, jonathan.albrecht wrote:
> On 2021-06-01 8:22 pm, Ilya Leoshkevich wrote:
> > Verify that s390x-specific uc_mcontext.psw.addr is reported
> > correctly.
> >
> > Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> > ---
> > tests/tcg/s390x/Makefile.target | 1 +
> > tests/tcg/s390x/signal.c | 163
> > ++++++++++++++++++++++++++++++++
> > 2 files changed, 164 insertions(+)
> > create mode 100644 tests/tcg/s390x/signal.c
> >
[...]
> > +static void handle_signal(int sig, siginfo_t *info, void
> > *ucontext)
> > +{
> > + void *page;
> > + int err;
> > +
> > + if (sig != expected.sig) {
> > + safe_puts("[ FAILED ] wrong signal");
> > + _exit(1);
> > + }
> > +
> > + if (info->si_addr != expected.addr) {
> > + safe_puts("[ FAILED ] wrong si_addr");
> > + _exit(1);
> > + }
> > +
> > + if (((ucontext_t *)ucontext)->uc_mcontext.psw.addr !=
> > expected.psw_addr) {
> > + safe_puts("[ FAILED ] wrong psw.addr");
> > + _exit(1);
> > + }
> > +
> > + switch (expected.exception) {
>
> When I try to run 'make test-tcg' gcc 9.3.0 is complaining about a
> missing case:
> /home/jalbrecht/src/qemu/tests/tcg/s390x/signal.c: In function
> 'handle_signal':
> /home/jalbrecht/src/qemu/tests/tcg/s390x/signal.c:70:5: error:
> enumeration value 'exception_operation' not handled in switch
> [-Werror=switch]
> 70 | switch (expected.exception) {
> | ^~~~~~
> cc1: all warnings being treated as errors
I wonder how I didn't catch this, since I'm testing on Ubuntu 20.04
as well. Thank you, I will fix this.
Best regards,
Ilya