[LTP] Failing test on failing shell commands

Cyril Hrubis chrubis@suse.cz
Tue Jul 13 14:35:40 CEST 2021


Hi!
> > We do have ROD (as a shorthand for "run or die") in the shell test
> > library, so this really should be:
> > 
> > 	ROD mkdir subgroup
> 
> Thanks. This will however fail entire suite (memcg_use_hierarchy_test)
> and other tests won't get executed. The failure could be only local, so
> other tests are still meaningful.

If you want to exit the subtest you really have to handle the return
values yourself, report the error, and return from the test function.

The question is which status to report. The TBROK status means that test
has failed setup phase and there is no point to continue, so this
probably should map to tst_res TWARN "...".

Another solution would be splitting the test into three seprate tests
so that we can use ROD.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list