From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyril Hrubis Date: Tue, 13 Jul 2021 14:35:40 +0200 Subject: [LTP] Failing test on failing shell commands In-Reply-To: References: <9c05b592-e474-6a3e-2dc1-ec075a0bc558@canonical.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it 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