qemu-s390x
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH-for-5.0 v2 2/4] tests/test-util-sockets: Skip test on non-x86


From: Cornelia Huck
Subject: Re: [PATCH-for-5.0 v2 2/4] tests/test-util-sockets: Skip test on non-x86 Travis containers
Date: Fri, 20 Mar 2020 12:39:58 +0100

On Wed, 18 Mar 2020 23:27:15 +0100
Philippe Mathieu-Daudé <address@hidden> wrote:

> Similarly to commit 4f370b1098, test-util-sockets fails in
> restricted non-x86 Travis containers since they apparently
> blacklisted some required system calls there.

Is "they" == "Travis admins"? Can we get them to remove those calls
from the blacklist?

(I'm wondering why x86 allows those calls. Probably just because it has
been around for longer.)

> Let's simply skip the test if we detect such an environment.
> 
> Reviewed-by: Daniel P. Berrangé <address@hidden>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
>  tests/test-util-sockets.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/tests/test-util-sockets.c b/tests/test-util-sockets.c
> index 5fd947c7bf..046ebec8ba 100644
> --- a/tests/test-util-sockets.c
> +++ b/tests/test-util-sockets.c
> @@ -231,11 +231,18 @@ static void test_socket_fd_pass_num_nocli(void)
>  int main(int argc, char **argv)
>  {
>      bool has_ipv4, has_ipv6;
> +    char *travis_arch;
>  
>      socket_init();
>  
>      g_test_init(&argc, &argv, NULL);
>  
> +    travis_arch = getenv("TRAVIS_CPU_ARCH");
> +    if (travis_arch && !g_str_equal(travis_arch, "x86_64")) {
> +        g_printerr("Test does not work on non-x86 Travis containers.");
> +        goto end;
> +    }
> +
>      /* We're creating actual IPv4/6 sockets, so we should
>       * check if the host running tests actually supports
>       * each protocol to avoid breaking tests on machines




reply via email to

[Prev in Thread] Current Thread [Next in Thread]