qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: qemu-devel@nongnu.org
Cc: "Thomas Huth" <thuth@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Laurent Vivier" <laurent@vivier.eu>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [RFC PATCH-for-5.1?] tests/tcg/multiarch/linux-test: Skip test if nanosleep missing (Travis)
Date: Tue, 21 Jul 2020 10:57:57 +0200	[thread overview]
Message-ID: <20200721085757.14358-1-f4bug@amsat.org> (raw)

The time test sometimes fails on Travis-CI [*]:

    TEST    linux-test on aarch64
  tests/tcg/multiarch/linux-test.c:237: nanosleep
  make[2]: *** [run-linux-test] Error 1
  make: *** [run-tcg-tests-aarch64-linux-user] Error 2

As this seems due to a container limitation on Travis-CI,
simply skip the test there.

[*] https://travis-ci.org/github/qemu/qemu/jobs/710005078#L3706

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
RFC because per Laurent Vivier we are not using the correct libc
    while cross-linking the test (maybe change in the container
    packages?)
---
 tests/tcg/multiarch/linux-test.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tests/tcg/multiarch/linux-test.c b/tests/tcg/multiarch/linux-test.c
index 8a7c15cd31..c7dfdec9ec 100644
--- a/tests/tcg/multiarch/linux-test.c
+++ b/tests/tcg/multiarch/linux-test.c
@@ -233,8 +233,13 @@ static void test_time(void)
     ts.tv_sec = 0;
     ts.tv_nsec = 20 * 1000000;
     chk_error(nanosleep(&ts, &rem));
-    if (rem.tv_sec != 1)
+    if (rem.tv_sec != 1) {
+        if (getenv("TRAVIS_ARCH")) {
+            printf("nanosleep missing? skipping 'time' test\n");
+            return;
+        }
         error("nanosleep");
+    }
     chk_error(gettimeofday(&tv2, NULL));
     ti = tv2.tv_sec - tv.tv_sec;
     if (ti >= 2)
-- 
2.21.3



             reply	other threads:[~2020-07-21  8:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-21  8:57 Philippe Mathieu-Daudé [this message]
2020-07-21 11:38 ` [RFC PATCH-for-5.1?] tests/tcg/multiarch/linux-test: Skip test if nanosleep missing (Travis) Laurent Vivier
2020-07-21 12:24   ` Laurent Vivier
2020-07-21 15:26     ` Philippe Mathieu-Daudé
2020-07-21 12:32   ` Alex Bennée

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200721085757.14358-1-f4bug@amsat.org \
    --to=f4bug@amsat.org \
    --cc=alex.bennee@linaro.org \
    --cc=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).