Message ID | 20180204222356.14546-3-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show |
Series | hppa-softmmu update | expand |
On 02/04/2018 07:23 PM, Richard Henderson wrote: > Reviewed-by: Thomas Huth <thuth@redhat.com> > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > tests/boot-serial-test.c | 1 + > tests/Makefile.include | 2 ++ > 2 files changed, 3 insertions(+) > > diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c > index 418c5b92dc..ea87a80be7 100644 > --- a/tests/boot-serial-test.c > +++ b/tests/boot-serial-test.c > @@ -87,6 +87,7 @@ static testdef_t tests[] = { > sizeof(kernel_plml605), kernel_plml605 }, > { "moxie", "moxiesim", "", "TT", sizeof(bios_moxiesim), 0, bios_moxiesim }, > { "arm", "raspi2", "", "TT", sizeof(bios_raspi2), 0, bios_raspi2 }, > + { "hppa", "hppa", "", "SeaBIOS wants SYSTEM HALT" }, > > { NULL } > }; > diff --git a/tests/Makefile.include b/tests/Makefile.include > index ca82e0c0cc..83def6994c 100644 > --- a/tests/Makefile.include > +++ b/tests/Makefile.include > @@ -299,6 +299,8 @@ gcov-files-x86_64-y = $(subst i386-softmmu/,x86_64-softmmu/,$(gcov-files-i386-y) > > check-qtest-alpha-y = tests/boot-serial-test$(EXESUF) > > +check-qtest-hppa-y = tests/boot-serial-test$(EXESUF) > + > check-qtest-m68k-y = tests/boot-serial-test$(EXESUF) > > check-qtest-microblaze-y = tests/boot-serial-test$(EXESUF) > I got this failure in 2 different branches: GTESTER check-qtest-hppa ** ERROR:tests/boot-serial-test.c:137:check_guest_output: assertion failed: (output_ok) GTester: last random seed: R02S55e7df877597841c1b3b62962e410123 make: *** [check-qtest-hppa] Error 1 make: *** Waiting for unfinished jobs.... https://travis-ci.org/philmd/qemu/jobs/341959060 "compiler": "gcc", "env": "CONFIG=\"--disable-linux-user\"", "dist": "trusty", "os": "linux" https://travis-ci.org/philmd/qemu/jobs/341979253 "compiler": "gcc", "env": "CONFIG=\"--with-coroutine=ucontext --disable-linux-user\"", "dist": "trusty", "os": "linux"
On Thu, Feb 15, 2018 at 8:55 PM, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote: > On 02/04/2018 07:23 PM, Richard Henderson wrote: >> Reviewed-by: Thomas Huth <thuth@redhat.com> >> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> >> --- >> tests/boot-serial-test.c | 1 + >> tests/Makefile.include | 2 ++ >> 2 files changed, 3 insertions(+) >> >> diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c >> index 418c5b92dc..ea87a80be7 100644 >> --- a/tests/boot-serial-test.c >> +++ b/tests/boot-serial-test.c >> @@ -87,6 +87,7 @@ static testdef_t tests[] = { >> sizeof(kernel_plml605), kernel_plml605 }, >> { "moxie", "moxiesim", "", "TT", sizeof(bios_moxiesim), 0, bios_moxiesim }, >> { "arm", "raspi2", "", "TT", sizeof(bios_raspi2), 0, bios_raspi2 }, >> + { "hppa", "hppa", "", "SeaBIOS wants SYSTEM HALT" }, >> >> { NULL } >> }; >> diff --git a/tests/Makefile.include b/tests/Makefile.include >> index ca82e0c0cc..83def6994c 100644 >> --- a/tests/Makefile.include >> +++ b/tests/Makefile.include >> @@ -299,6 +299,8 @@ gcov-files-x86_64-y = $(subst i386-softmmu/,x86_64-softmmu/,$(gcov-files-i386-y) >> >> check-qtest-alpha-y = tests/boot-serial-test$(EXESUF) >> >> +check-qtest-hppa-y = tests/boot-serial-test$(EXESUF) >> + >> check-qtest-m68k-y = tests/boot-serial-test$(EXESUF) >> >> check-qtest-microblaze-y = tests/boot-serial-test$(EXESUF) >> > > I got this failure in 2 different branches: > > GTESTER check-qtest-hppa > ** > ERROR:tests/boot-serial-test.c:137:check_guest_output: assertion failed: > (output_ok) > GTester: last random seed: R02S55e7df877597841c1b3b62962e410123 > make: *** [check-qtest-hppa] Error 1 > make: *** Waiting for unfinished jobs.... > > https://travis-ci.org/philmd/qemu/jobs/341959060 which is not always reproducible... rebuilding this job worked. > "compiler": "gcc", > "env": "CONFIG=\"--disable-linux-user\"", > "dist": "trusty", > "os": "linux" > > https://travis-ci.org/philmd/qemu/jobs/341979253 > "compiler": "gcc", > "env": "CONFIG=\"--with-coroutine=ucontext --disable-linux-user\"", > "dist": "trusty", > "os": "linux"
On 16.02.2018 00:55, Philippe Mathieu-Daudé wrote: > On 02/04/2018 07:23 PM, Richard Henderson wrote: >> Reviewed-by: Thomas Huth <thuth@redhat.com> >> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> >> --- >> tests/boot-serial-test.c | 1 + >> tests/Makefile.include | 2 ++ >> 2 files changed, 3 insertions(+) >> >> diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c >> index 418c5b92dc..ea87a80be7 100644 >> --- a/tests/boot-serial-test.c >> +++ b/tests/boot-serial-test.c >> @@ -87,6 +87,7 @@ static testdef_t tests[] = { >> sizeof(kernel_plml605), kernel_plml605 }, >> { "moxie", "moxiesim", "", "TT", sizeof(bios_moxiesim), 0, bios_moxiesim }, >> { "arm", "raspi2", "", "TT", sizeof(bios_raspi2), 0, bios_raspi2 }, >> + { "hppa", "hppa", "", "SeaBIOS wants SYSTEM HALT" }, >> >> { NULL } >> }; >> diff --git a/tests/Makefile.include b/tests/Makefile.include >> index ca82e0c0cc..83def6994c 100644 >> --- a/tests/Makefile.include >> +++ b/tests/Makefile.include >> @@ -299,6 +299,8 @@ gcov-files-x86_64-y = $(subst i386-softmmu/,x86_64-softmmu/,$(gcov-files-i386-y) >> >> check-qtest-alpha-y = tests/boot-serial-test$(EXESUF) >> >> +check-qtest-hppa-y = tests/boot-serial-test$(EXESUF) >> + >> check-qtest-m68k-y = tests/boot-serial-test$(EXESUF) >> >> check-qtest-microblaze-y = tests/boot-serial-test$(EXESUF) >> > > I got this failure in 2 different branches: > > GTESTER check-qtest-hppa > ** > ERROR:tests/boot-serial-test.c:137:check_guest_output: assertion failed: > (output_ok) > GTester: last random seed: R02S55e7df877597841c1b3b62962e410123 > make: *** [check-qtest-hppa] Error 1 > make: *** Waiting for unfinished jobs.... Uh, oh, I actually can also reproduce this on my laptop when putting a lot of load on the system (make -j10 in another window). I think I know what the problem is: I've introduced a counter in commit 92b540dac9fc3a5 to handle the timeouts in a better way. But in case ccnt reaches 512, the current read character is ignored - and if that character is part of the string that we are looking for, the test fails to match the string. Almost all of the tests look for a string within the first 512 bytes of firmware output, so the problem never triggered there. But the hppa test looks for a string at the very end of a long output, so that's likely the reason that the problem triggered here. The fix is pretty simple: diff a/tests/boot-serial-test.c b/tests/boot-serial-test.c --- a/tests/boot-serial-test.c +++ b/tests/boot-serial-test.c @@ -117,7 +117,7 @@ static void check_guest_output(const testdef_t *test, int fd) /* Poll serial output... Wait at most 60 seconds */ for (i = 0; i < 6000; ++i) { ccnt = 0; - while ((nbr = read(fd, &ch, 1)) == 1 && ccnt++ < 512) { + while (ccnt++ < 512 && (nbr = read(fd, &ch, 1)) == 1) { if (ch == test->expect[pos]) { pos += 1; if (test->expect[pos] == '\0') { I'll submit this as a proper patch... Thomas
diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c index 418c5b92dc..ea87a80be7 100644 --- a/tests/boot-serial-test.c +++ b/tests/boot-serial-test.c @@ -87,6 +87,7 @@ static testdef_t tests[] = { sizeof(kernel_plml605), kernel_plml605 }, { "moxie", "moxiesim", "", "TT", sizeof(bios_moxiesim), 0, bios_moxiesim }, { "arm", "raspi2", "", "TT", sizeof(bios_raspi2), 0, bios_raspi2 }, + { "hppa", "hppa", "", "SeaBIOS wants SYSTEM HALT" }, { NULL } }; diff --git a/tests/Makefile.include b/tests/Makefile.include index ca82e0c0cc..83def6994c 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -299,6 +299,8 @@ gcov-files-x86_64-y = $(subst i386-softmmu/,x86_64-softmmu/,$(gcov-files-i386-y) check-qtest-alpha-y = tests/boot-serial-test$(EXESUF) +check-qtest-hppa-y = tests/boot-serial-test$(EXESUF) + check-qtest-m68k-y = tests/boot-serial-test$(EXESUF) check-qtest-microblaze-y = tests/boot-serial-test$(EXESUF)