I think I was wrong on the last point about tst-namespace.so - by default 
each test is executed under brand new QEMU instance so the tests cannot 
impact each other.

On Sunday, December 17, 2017 at 11:53:14 AM UTC-5, Waldek Kozaczuk wrote:
>
> As I have been working on unit tests around read-only filesystem I noticed 
> that some of the unit tests (look for 'debug\(.*PASS' under tests) report 
> success even though I know for sure (got it through printf/cout) that many 
> assertions fail (as an example look at tst-readdir.cc). It turns out that 
> some unit tests use debug method when reporting successes/failures like so 
> which does not normally output anything to the console:
>
> static void report(bool ok, const char* msg)
> {
> ++tests;
> fails += !ok;
> debug("%s: %s\n", (ok ? "PASS" : "FAIL"), msg);
> }
>
> Now scripts/tests/testing.py looks for "FAIL" to detect failures (it looks 
> like the unit tests system does not look at the exit code of a unit test 
> app -> maybe it does not get propagated all the way to QEMU process). So I 
> wonder if there is a better way to detect unit tests failures - maybe add 
> assert(fails == 0) before unit test exist.
>
> Meanwhile the simple fix is to change debug to prints/cout. 
>
> Here is how I run them:
>
> ./scripts/test.py --name tst-readdir.so
>
> Waldek
>
> PS. I am worried that maybe other cases in unit tests where failures are 
> masked and maybe lead to the error we see in Jenkins runs sometimes - 
> tst-namespace.so.
>

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to