app/test: prevent exiting after skipped test
Checks
Commit Message
When processing a list of tests to run, the loop termination condition
was a test returning a value != 0. This means that if one of a series of
tests was skipped, i.e. returned TEST_SKIPPED, the whole execution run
was stopped. Since a test being skipped is not an error condition, we
put in an explicit check for that to keep executing any remaining tests.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
app/test/test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Thu, Dec 14, 2023 at 11:38:13AM +0000, Bruce Richardson wrote:
> When processing a list of tests to run, the loop termination condition
> was a test returning a value != 0. This means that if one of a series of
> tests was skipped, i.e. returned TEST_SKIPPED, the whole execution run
> was stopped. Since a test being skipped is not an error condition, we
> put in an explicit check for that to keep executing any remaining tests.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
On Thu, Dec 14, 2023 at 6:04 PM Tyler Retzlaff
<roretzla@linux.microsoft.com> wrote:
>
> On Thu, Dec 14, 2023 at 11:38:13AM +0000, Bruce Richardson wrote:
> > When processing a list of tests to run, the loop termination condition
> > was a test returning a value != 0. This means that if one of a series of
> > tests was skipped, i.e. returned TEST_SKIPPED, the whole execution run
> > was stopped. Since a test being skipped is not an error condition, we
> > put in an explicit check for that to keep executing any remaining tests.
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Applied, thanks.
@@ -235,7 +235,7 @@ main(int argc, char **argv)
ret = last_test_result;
end_of_cmd:
- if (ret != 0)
+ if (ret != 0 && ret != TEST_SKIPPED)
break;
}
if (n_skip_tests > 0)