Thanks for jumping in, Collin.

> In the file 'modules/test-xfail' there is a few conditionals similar to
> this:
> 
>     gl_CONDITIONAL([OS_IS_NETBSD],
>                    [case "$host_os" in netbsd*) true ;; *) false ;; esac])
> 
> Then in 'cat modules/sigprocmask-tests', for example, we have:
> 
>     Depends-on:
>     [...]
>     test-xfail
> 
>     Makefile.am:
>     # Work around 
> https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=57213
>     if !OS_IS_NETBSD
>     TESTS += test-sigprocmask
>     endif
>     check_PROGRAMS += test-sigprocmask

Yes, this is one of the usage patterns. The more frequent usage pattern is

      Depends-on:
      ...
      test-xfail

      if OS_IS_CYGWIN
      XFAIL_TESTS += test-passfd
      endif

> I think something like this would work:
> 
>     gl_CONDITIONAL([IS_OVERFLOW_GID],
>                    [test `cat /proc/sys/kernel/overflowgid` = `id -G | sed 
> 's/ /\n/g' | awk '{ if (NR == 2) print }'`])

I would prefer some more generic name and test:

      gl_CONDITIONAL([ENV_IS_GUIX_BUILD_DAEMON], [test -n "$<some_variable>"])

so that

  1) the business of understanding the "overflow gids" is entirely on the
     Guix side,

  2) we can accept patch requests from Guix of the form

       +if ENV_IS_GUIX_BUILD_DAEMON
       +XFAIL_TESTS += test-foo
       +endif

     or

       +if !ENV_IS_GUIX_BUILD_DAEMON
       +TESTS += test-foo
       +endif

     without asking questions.

Bruno




Reply via email to