Skip to contentSkip to conversation

tests/boot-serial-test: Bump timeout to 6 minutes

PATCH In review Peter Maydell 3 participants 7 messages Aug 17, 2018 – Aug 20, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/boot-serial-test: Bump timeout to 6 minutes

On a SPARC host that I'm using as a build test machine, the boot-serial-test for the SPARC guest machines takes about 65 seconds to execute. This means that it hits the current 60 second timer on these tests. Push the timeout up so that it doesn't trigger spuriously on slow hosts like this one.

---
 tests/boot-serial-test.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/boot-serial-test.c +2 -2
index 1355df924dd..fca5f2f5da9 100644
@@ -116,8 +116,8 @@ static bool check_guest_output(const testdef_t *test, int fd)
     int i, nbr = 0, pos = 0, ccnt;
     char ch;
 
-    /* Poll serial output... Wait at most 60 seconds */
-    for (i = 0; i < 6000; ++i) {
+    /* Poll serial output... Wait at most 360 seconds */
+    for (i = 0; i < 36000; ++i) {
         ccnt = 0;
         while (ccnt++ < 512 && (nbr = read(fd, &ch, 1)) == 1) {
             if (ch == test->expect[pos]) {
Signature · 1 line
2.18.0
Acked-by on v1 1/1
#1 lore raw
Quoted 16 lines · Peter Maydell

On a SPARC host that I'm using as a build test machine, the boot-serial-test for the SPARC guest machines takes about 65 seconds to execute. This means that it hits the current 60 second timer on these tests. Push the timeout up so that it doesn't trigger spuriously on slow hosts like this one.

---
 tests/boot-serial-test.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/boot-serial-test.c +0 -0
index 1355df924dd..fca5f2f5da9 100644

tests/boot-serial-test.c static bool check_guest_output(const testdef_t *test, int fd) · line 123

Quoted 10 lines
tests/boot-serial-test.c +2 -2
@@ -116,8 +116,8 @@ static bool check_guest_output(const testdef_t *test, int fd)
     int i, nbr = 0, pos = 0, ccnt;
     char ch;
 
-    /* Poll serial output... Wait at most 60 seconds */
-    for (i = 0; i < 6000; ++i) {
+    /* Poll serial output... Wait at most 360 seconds */
+    for (i = 0; i < 36000; ++i) {
         ccnt = 0;
         while (ccnt++ < 512 && (nbr = read(fd, &ch, 1)) == 1) {
             if (ch == test->expect[pos]) {

Wow that is amazingly slow... however I guess it's not completely unreasonable to increase the timeout accordingly.

ATB,

Mark.

#2 lore raw
In reply to Peter Maydell
Quoted 16 lines · Peter Maydell

On a SPARC host that I'm using as a build test machine, the boot-serial-test for the SPARC guest machines takes about 65 seconds to execute. This means that it hits the current 60 second timer on these tests. Push the timeout up so that it doesn't trigger spuriously on slow hosts like this one.

---
 tests/boot-serial-test.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/boot-serial-test.c +0 -0
index 1355df924dd..fca5f2f5da9 100644

tests/boot-serial-test.c static bool check_guest_output(const testdef_t *test, int fd) · line 120

Quoted 7 lines
tests/boot-serial-test.c +2 -2
@@ -116,8 +116,8 @@ static bool check_guest_output(const testdef_t *test, int fd)
     int i, nbr = 0, pos = 0, ccnt;
     char ch;
 
-    /* Poll serial output... Wait at most 60 seconds */
-    for (i = 0; i < 6000; ++i) {
+    /* Poll serial output... Wait at most 360 seconds */
+    for (i = 0; i < 36000; ++i) {

6 minutes is really a lot already. I guess most users will hit CTRL-C before waiting so long if there is a realy problem here ... If the current tests just takes a little bit more than 1 minute on the Sparc machine, maybe 2 or 3 minutes would sufficient, too?

Thomas

#3 lore raw
Quoted 4 lines · Thomas Huth

6 minutes is really a lot already. I guess most users will hit CTRL-C before waiting so long if there is a realy problem here ... If the current tests just takes a little bit more than 1 minute on the Sparc machine, maybe 2 or 3 minutes would sufficient, too?

Or maybe not. I don't like tests that run close to their timeout limits, because that tends to mean that my automated test runs are flaky when the machine happens to be heavily loaded when a test is running. I think the purpose of a timeout is to prevent the test run hanging indefinitely; as you say, console users can hit ctrl-c if they get bored anyway.

thanks
-- PMM

Reviewed-by
#4 lore raw
Quoted 6 lines · Peter Maydell
Quoted 4 lines · Thomas Huth

6 minutes is really a lot already. I guess most users will hit CTRL-C before waiting so long if there is a realy problem here ... If the current tests just takes a little bit more than 1 minute on the Sparc machine, maybe 2 or 3 minutes would sufficient, too?

Quoted 6 lines

Or maybe not. I don't like tests that run close to their timeout limits, because that tends to mean that my automated test runs are flaky when the machine happens to be heavily loaded when a test is running. I think the purpose of a timeout is to prevent the test run hanging indefinitely; as you say, console users can hit ctrl-c if they get bored anyway.

... or maybe somebody tries to run TCI on a Sparc host one day ... ok, you've convinced me, let's go with the 360 seconds:

Paolo, could you please queue up this patch (since I don't have anything else pending for assembling a PULL request)?

Thomas

#5 lore raw
Quoted 14 lines · Thomas Huth
Quoted 6 lines · Peter Maydell
Quoted 4 lines · Thomas Huth

6 minutes is really a lot already. I guess most users will hit CTRL-C before waiting so long if there is a realy problem here ... If the current tests just takes a little bit more than 1 minute on the Sparc machine, maybe 2 or 3 minutes would sufficient, too?

Quoted 6 lines

Or maybe not. I don't like tests that run close to their timeout limits, because that tends to mean that my automated test runs are flaky when the machine happens to be heavily loaded when a test is running. I think the purpose of a timeout is to prevent the test run hanging indefinitely; as you say, console users can hit ctrl-c if they get bored anyway.

Quoted 7 lines

... or maybe somebody tries to run TCI on a Sparc host one day ... ok, you've convinced me, let's go with the 360 seconds:

Paolo, could you please queue up this patch (since I don't have anything else pending for assembling a PULL request)?

I can just apply it directly, since it's useful for buildtesting.

thanks
-- PMM

#6 lore raw
Quoted 18 lines · Peter Maydell
Quoted 17 lines · Thomas Huth
Quoted 6 lines · Peter Maydell
Quoted 4 lines · Thomas Huth

6 minutes is really a lot already. I guess most users will hit CTRL-C before waiting so long if there is a realy problem here ... If the current tests just takes a little bit more than 1 minute on the Sparc machine, maybe 2 or 3 minutes would sufficient, too?

Quoted 6 lines

Or maybe not. I don't like tests that run close to their timeout limits, because that tends to mean that my automated test runs are flaky when the machine happens to be heavily loaded when a test is running. I think the purpose of a timeout is to prevent the test run hanging indefinitely; as you say, console users can hit ctrl-c if they get bored anyway.

... or maybe somebody tries to run TCI on a Sparc host one day ... ok, you've convinced me, let's go with the 360 seconds:

Quoted 6 lines
Quoted 4 lines

Paolo, could you please queue up this patch (since I don't have anything else pending for assembling a PULL request)?

I can just apply it directly, since it's useful for buildtesting.

Ok, great, that's fine of course, too.

Thomas