[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] tools/tests: Make E2BIG non-fatal to xenstore unit test
On 13.10.21 11:35, Kevin Stefanov wrote: Xenstore's unit test fails on read and write of big numbers if quota-maxsize is set to a lower number than those test cases use. Output a special warning instead of a failure message in such cases and make the error non-fatal to the unit test. Signed-off-by: Kevin Stefanov <kevin.stefanov@xxxxxxxxxx> --- CC: Ian Jackson <iwj@xxxxxxxxxxxxxx> CC: Wei Liu <wl@xxxxxxx> CC: Juergen Gross <jgross@xxxxxxxx> CC: Julien Grall <julien@xxxxxxx> CC: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- tools/tests/xenstore/test-xenstore.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/tests/xenstore/test-xenstore.c b/tools/tests/xenstore/test-xenstore.c index d3574b3fa2..ec8c63a65d 100644 --- a/tools/tests/xenstore/test-xenstore.c +++ b/tools/tests/xenstore/test-xenstore.c @@ -110,8 +110,13 @@ static int call_test(struct test *tst, int iters, bool no_clock) break; }- if ( ret )- printf("%-10s: failed (ret = %d, stage %s)\n", tst->name, ret, stage); + /* Make E2BIG non-fatal to the test */ + if ( ret ){ + if( ret == 7 ) Why not use E2BIG instead of the literal 7 here? And please adhere to the coding style! There are some blanks missing and the '{' wants to go into a separate line. + printf("%-10s: Not run - argument list too long\n", tst->name); Not setting ret to 0 here will result in Xenstore not being cleaned up after the test. + else + printf("%-10s: failed (ret = %d, stage %s)\n", tst->name, ret, stage); + } else if ( !no_clock ) { printf("%-10s:", tst->name); Juergen Attachment:
OpenPGP_0xB0DE9DD628BF132F.asc Attachment:
OpenPGP_signature
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |