[LTP] [PATCH 3/3] dio_sparse: Fix child exit code
Cyril Hrubis
chrubis@suse.cz
Wed Sep 14 11:49:43 CEST 2022
Hi!
> > Ah, this is the fix. I would go for tst_res(TFAIL, ""); and return 1;
> > otherwise this looks fine applied over the previous changes.
>
> If I returned from io_read(), I'd have to rewrite the calls in
> dio_sparse.c and aiodio_sparse.c to exit(io_read()). Otherwise testrun()
> in LTP library would always force the exit code to 0. This is less work
> and you won't need to remember LTP library implementation details when
> you reuse io_read() in a new test.
What about tst_res(TFAIL, ""); followed by exit(1). Really this is a
case where the test does fail we and we should report failure properly.
Or even just exit(1) as we do check the exit value after your changes.
> Should I send a v2 for tst_validate_children() or will you delete the
> if(WCOREDUMP()) branch and merge it now?
Is there a good reason why you are trying to avoid tst_strstatus() that
simplifies the whole inner body of the loop to a single if?
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list