[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen, x86: turn the selftests ASSERT into a warning
On 26/01/18 17:19, Stefano Stabellini wrote: > On selftests failure, print a very visible warning instead of crashing > over an ASSERT. > > Signed-off-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> > > diff --git a/xen/arch/x86/extable.c b/xen/arch/x86/extable.c > index 72f30d9..9b834a2 100644 > --- a/xen/arch/x86/extable.c > +++ b/xen/arch/x86/extable.c > @@ -9,6 +9,7 @@ > #include <xen/domain_page.h> > #include <xen/virtual_region.h> > #include <xen/livepatch.h> > +#include <xen/warning.h> > > #define EX_FIELD(ptr, field) ((unsigned long)&(ptr)->field + (ptr)->field) > > @@ -145,6 +146,7 @@ static int __init stub_selftest(void) > }; > unsigned long addr = this_cpu(stubs.addr) + STUB_BUF_SIZE / 2; > unsigned int i; > + bool fail = false; > > printk("Running stub recovery selftests...\n"); > > @@ -168,8 +170,15 @@ static int __init stub_selftest(void) > _ASM_EXTABLE(.Lret%=, .Lfix%=) > : [exn] "+m" (res) > : [stb] "r" (addr), "a" (tests[i].rax)); > - ASSERT(res == tests[i].res.raw); > + if ( res != tests[i].res.raw ) > + { > + printk("Selftest nr=%d failed!\n", i); "Selftest %u failed: insn %*ph, expected %u[%04x], got %u[%04x]\n" With that, Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxx> I can fix this up on commit if there are no objections. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |