all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* core-updates: coreutils: FAIL: tests/misc/nohup
@ 2014-03-04  9:35 Nikita Karetnikov
  2014-03-04 13:36 ` Cyril Roelandt
  0 siblings, 1 reply; 7+ messages in thread
From: Nikita Karetnikov @ 2014-03-04  9:35 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 347 bytes --]

Cyril reported this on IRC.  Indeed, one of the tests fails (I tested on
i686).  Is there a need to report upstream?

================================================
   GNU coreutils 8.22: ./tests/test-suite.log
================================================

# TOTAL: 551
# PASS:  412
# SKIP:  138
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0


[-- Attachment #1.2: nohup.log --]
[-- Type: text/plain, Size: 4401 bytes --]

++ initial_cwd_=/tmp/nix-build-coreutils-8.22.drv-0/coreutils-8.22
++ fail=0
+++ testdir_prefix_
+++ printf gt
++ pfx_=gt
+++ mktempd_ /tmp/nix-build-coreutils-8.22.drv-0/coreutils-8.22 gt-nohup.sh.XXXX
+++ case $# in
+++ destdir_=/tmp/nix-build-coreutils-8.22.drv-0/coreutils-8.22
+++ template_=gt-nohup.sh.XXXX
+++ MAX_TRIES_=4
+++ case $destdir_ in
+++ case $template_ in
++++ unset TMPDIR
+++ d=/tmp/nix-build-coreutils-8.22.drv-0/coreutils-8.22/gt-nohup.sh.tnSY
+++ case $d in
+++ test -d /tmp/nix-build-coreutils-8.22.drv-0/coreutils-8.22/gt-nohup.sh.tnSY
++++ ls -dgo /tmp/nix-build-coreutils-8.22.drv-0/coreutils-8.22/gt-nohup.sh.tnSY
++++ tr S -
+++ perms='drwx------ 2 4096 Mar  4 09:21 /tmp/nix-build-coreutils-8.22.drv-0/coreutils-8.22/gt-nohup.sh.tn-Y'
+++ case $perms in
+++ test 0 = 0
+++ echo /tmp/nix-build-coreutils-8.22.drv-0/coreutils-8.22/gt-nohup.sh.tnSY
+++ return
++ test_dir_=/tmp/nix-build-coreutils-8.22.drv-0/coreutils-8.22/gt-nohup.sh.tnSY
++ cd /tmp/nix-build-coreutils-8.22.drv-0/coreutils-8.22/gt-nohup.sh.tnSY
++ gl_init_sh_nl_='
'
++ IFS=' 	
'
++ for sig_ in 1 2 3 13 15
+++ expr 1 + 128
++ eval 'trap '\''Exit 129'\'' 1'
+++ trap 'Exit 129' 1
++ for sig_ in 1 2 3 13 15
+++ expr 2 + 128
++ eval 'trap '\''Exit 130'\'' 2'
+++ trap 'Exit 130' 2
++ for sig_ in 1 2 3 13 15
+++ expr 3 + 128
++ eval 'trap '\''Exit 131'\'' 3'
+++ trap 'Exit 131' 3
++ for sig_ in 1 2 3 13 15
+++ expr 13 + 128
++ eval 'trap '\''Exit 141'\'' 13'
+++ trap 'Exit 141' 13
++ for sig_ in 1 2 3 13 15
+++ expr 15 + 128
++ eval 'trap '\''Exit 143'\'' 15'
+++ trap 'Exit 143' 15
++ trap remove_tmp_ 0
+ path_prepend_ ./src
+ test 1 '!=' 0
+ path_dir_=./src
+ case $path_dir_ in
+ abs_path_dir_=/tmp/nix-build-coreutils-8.22.drv-0/coreutils-8.22/./src
+ case $abs_path_dir_ in
+ PATH=/tmp/nix-build-coreutils-8.22.drv-0/coreutils-8.22/./src:/tmp/nix-build-coreutils-8.22.drv-0/coreutils-8.22/src:/nix/store/fzs99arrgyc87spxp64jkhl7g44d4c2x-perl-5.16.1/bin:/nix/store/nbqm528nqlpsr0m8lbfslna6amkfxwq8-bash-4.3/bin:/nix/store/ckpkg84qq02xkc0adp1xjpzipx70ag0g-gcc-4.8.2/bin:/nix/store/zx7qgk5fz7z2lyr3q8hwrngrm7amsvws-ld-wrapper-boot3-0/bin:/nix/store/h2a8jr9swsi40n5dz059silcgwyc0n6n-glibc-2.19/bin:/nix/store/h2a8jr9swsi40n5dz059silcgwyc0n6n-glibc-2.19/sbin:/nix/store/x6f1wq0zmzka7rsryg1cpldi1h6k234v-binutils-cross-boot0-2.24/bin:/nix/store/alwd5d5h7zn1fcs0g4slfrqnp3ra2bzq-make-boot0-4.0/bin:/nix/store/6pn78dk4fzi7qlyy4n0r5znyyhbib8m5-diffutils-3.3/bin:/nix/store/qfb2r36i5514qnnhhf1wqsp7lfsqw4na-findutils-4.4.2/bin:/nix/store/3796gfkqgq82jcmg6ksf5awbn4qrknwr-binutils-boot
 strap-0/bin:/nix/store/c1nlcrvh3pwzak3xs8kyga42pflk4gms-bootstrap-binaries-0/bin:/nix/store/93x14705j28fpy9dbkbl452fiadkshfz-acl-2.2.51/bin:/sbin:/usr/sbin
+ create_exe_shims_ /tmp/nix-build-coreutils-8.22.drv-0/coreutils-8.22/./src
+ case $EXEEXT in
+ return 0
+ shift
+ test 0 '!=' 0
+ export PATH
+ print_ver_ nohup
+ test yes = yes
+ local i
+ for i in '$*'
+ env nohup --version
nohup (GNU coreutils) 8.22
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Jim Meyering.
+ nohup sh -c 'echo stdout; echo stderr 1>&2'
stdout
+ test -t 1
+ test -f nohup.out
+ test -t 0
+ rm -f exp
+ echo stderr
+ compare exp err
+ compare_dev_null_ exp err
+ test 2 = 2
+ test xexp = x/dev/null
+ test xerr = x/dev/null
+ return 2
+ case $? in
+ compare_ exp err
+ diff -u exp err
+ rm -f nohup.out err exp
+ nohup sh -c 'echo stdout; echo stderr 1>&2'
stderr
+ test -t 2
++ tr '\n' -
++ cat out
+ test stdout- = stdout-
+ test -f nohup.out
+ rm -f nohup.out err
+ test -w /dev/full
+ test -c /dev/full
+ exec
./tests/misc/nohup.sh: line 66: /dev/tty: No such device or address
+ fail=1
+ nohup no-such-command
+ errno=127
+ test -t 1
+ cat
+ rm -f nohup.out err exp
+ touch k
+ chmod 0 k
+ nohup ./k
+ errno=126
+ test 126 = 126
+ test -t 1
+ cat
+ nohup
+ test 125 = 125
+ POSIXLY_CORRECT=1
+ nohup
+ test 127 = 127
+ Exit 1
+ set +e
+ exit 1
+ exit 1
+ remove_tmp_
+ __st=1
+ cleanup_
+ :
+ cd /tmp/nix-build-coreutils-8.22.drv-0/coreutils-8.22
+ chmod -R u+rwx /tmp/nix-build-coreutils-8.22.drv-0/coreutils-8.22/gt-nohup.sh.tnSY
+ rm -rf /tmp/nix-build-coreutils-8.22.drv-0/coreutils-8.22/gt-nohup.sh.tnSY
+ exit 1

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: core-updates: coreutils: FAIL: tests/misc/nohup
  2014-03-04  9:35 core-updates: coreutils: FAIL: tests/misc/nohup Nikita Karetnikov
@ 2014-03-04 13:36 ` Cyril Roelandt
  2014-03-04 17:10   ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Cyril Roelandt @ 2014-03-04 13:36 UTC (permalink / raw)
  To: Nikita Karetnikov, guix-devel

On 03/04/2014 10:35 AM, Nikita Karetnikov wrote:
> ./tests/misc/nohup.sh: line 66: /dev/tty: No such device or address
> + fail=1

./tests/misc/nohup.sh: line 66: /dev/tty: No such device or address
+ fail=1

Hum, this should probably be disabled :) I don't think we can access 
/dev/tty inside the chroot... Or maybe we could run 'mknod' before the 
'check' phase ? WDYT ?


Cyril.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: core-updates: coreutils: FAIL: tests/misc/nohup
  2014-03-04 13:36 ` Cyril Roelandt
@ 2014-03-04 17:10   ` Ludovic Courtès
  2014-03-05 21:24     ` Cyril Roelandt
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2014-03-04 17:10 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: guix-devel

Cyril Roelandt <tipecaml@gmail.com> skribis:

> On 03/04/2014 10:35 AM, Nikita Karetnikov wrote:
>> ./tests/misc/nohup.sh: line 66: /dev/tty: No such device or address
>> + fail=1
>
> ./tests/misc/nohup.sh: line 66: /dev/tty: No such device or address
> + fail=1
>
> Hum, this should probably be disabled :) I don't think we can access
> /dev/tty inside the chroot... Or maybe we could run 'mknod' before the
> check' phase ? WDYT ?

I’ve seen it on Hydra before.  Could you come up with a patch that does
‘test -f /dev/tty || exit 77’ in that test, and also submit it to
bug-coreutils@gnu.org?

TIA,
Ludo’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: core-updates: coreutils: FAIL: tests/misc/nohup
  2014-03-04 17:10   ` Ludovic Courtès
@ 2014-03-05 21:24     ` Cyril Roelandt
  2014-03-05 22:33       ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Cyril Roelandt @ 2014-03-05 21:24 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

On 03/04/2014 06:10 PM, Ludovic Courtès wrote:
> Cyril Roelandt <tipecaml@gmail.com> skribis:
>
>> On 03/04/2014 10:35 AM, Nikita Karetnikov wrote:
>>> ./tests/misc/nohup.sh: line 66: /dev/tty: No such device or address
>>> + fail=1
>>
>> ./tests/misc/nohup.sh: line 66: /dev/tty: No such device or address
>> + fail=1
>>
>> Hum, this should probably be disabled :) I don't think we can access
>> /dev/tty inside the chroot... Or maybe we could run 'mknod' before the
>> check' phase ? WDYT ?
>
> I’ve seen it on Hydra before.  Could you come up with a patch that does
> ‘test -f /dev/tty || exit 77’ in that test, and also submit it to
> bug-coreutils@gnu.org?
>

It is currently discussed here: 
http://lists.gnu.org/archive/html/bug-coreutils/2014-03/msg00017.html. 
I'll push their patch to core-udpates when it lands in coreutils.

Cyril.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: core-updates: coreutils: FAIL: tests/misc/nohup
  2014-03-05 21:24     ` Cyril Roelandt
@ 2014-03-05 22:33       ` Ludovic Courtès
  2014-03-06 23:49         ` [PATCH] coreutils: fix test suite Cyril Roelandt
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2014-03-05 22:33 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: guix-devel

Cyril Roelandt <tipecaml@gmail.com> skribis:

> On 03/04/2014 06:10 PM, Ludovic Courtès wrote:
>> Cyril Roelandt <tipecaml@gmail.com> skribis:
>>
>>> On 03/04/2014 10:35 AM, Nikita Karetnikov wrote:
>>>> ./tests/misc/nohup.sh: line 66: /dev/tty: No such device or address
>>>> + fail=1
>>>
>>> ./tests/misc/nohup.sh: line 66: /dev/tty: No such device or address
>>> + fail=1
>>>
>>> Hum, this should probably be disabled :) I don't think we can access
>>> /dev/tty inside the chroot... Or maybe we could run 'mknod' before the
>>> check' phase ? WDYT ?
>>
>> I’ve seen it on Hydra before.  Could you come up with a patch that does
>> ‘test -f /dev/tty || exit 77’ in that test, and also submit it to
>> bug-coreutils@gnu.org?
>>
>
> It is currently discussed here:
> http://lists.gnu.org/archive/html/bug-coreutils/2014-03/msg00017.html. I'll
> push their patch to core-udpates when it lands in coreutils.

Perfect, thank you!

Ludo’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] coreutils: fix test suite
  2014-03-05 22:33       ` Ludovic Courtès
@ 2014-03-06 23:49         ` Cyril Roelandt
  2014-03-07  8:50           ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Cyril Roelandt @ 2014-03-06 23:49 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/patches/coreutils-skip-nohup.patch: patch taken from the git
  repository of coreutils, that makes sure tests/misc/nohup.sh does not fail
  when /dev/tty does not exist.
* gnu/packages/base.scm (coreutils): use it.
* gnu-system.am (dist_patch_DATA): add it.
---
 gnu-system.am                                   |  1 +
 gnu/packages/base.scm                           |  4 +++-
 gnu/packages/patches/coreutils-skip-nohup.patch | 28 +++++++++++++++++++++++++
 3 files changed, 32 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/coreutils-skip-nohup.patch

diff --git a/gnu-system.am b/gnu-system.am
index b5be893..97dc92c 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -252,6 +252,7 @@ dist_patch_DATA =						\
   gnu/packages/patches/cdparanoia-fpic.patch			\
   gnu/packages/patches/cmake-fix-tests.patch			\
   gnu/packages/patches/coreutils-dummy-man.patch		\
+  gnu/packages/patches/coreutils-skip-nohup.patch		\
   gnu/packages/patches/cpio-gets-undeclared.patch		\
   gnu/packages/patches/curl-fix-test172.patch			\
   gnu/packages/patches/dbus-localstatedir.patch			\
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index f828f35..89d90c9 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -240,7 +240,9 @@ used to apply commands with arbitrarily long arguments.")
             (sha256
              (base32
               "04hjzzv434fb8ak3hh3dyhdvg3hqjjwvjmjxqzk1gh2jh6cr8gjv"))
-            (patches (list (search-patch "coreutils-dummy-man.patch")))))
+            (patches (list (search-patch "coreutils-dummy-man.patch")
+                           ;; TODO: remove this patch for >= 8.23
+                           (search-patch "coreutils-skip-nohup.patch")))))
    (build-system gnu-build-system)
    (inputs `(("acl"  ,acl)                        ; TODO: add SELinux
              ("gmp"  ,gmp)))
diff --git a/gnu/packages/patches/coreutils-skip-nohup.patch b/gnu/packages/patches/coreutils-skip-nohup.patch
new file mode 100644
index 0000000..f5283a6
--- /dev/null
+++ b/gnu/packages/patches/coreutils-skip-nohup.patch
@@ -0,0 +1,28 @@
+commit 5dce6bdfafc930dfd17d5d16aea7d1add3472066
+Author: Pádraig Brady <P@draigBrady.com>
+Date:   Wed Mar 5 15:14:07 2014 +0000
+
+    tests: fix false failure in nohup.sh in non tty builds
+    
+    * tests/misc/nohup.sh: When running tests without a controlling tty,
+    an exec failure is triggered in a subshell, which causes POSIX
+    shells to immediately exit the subshell.  This was brought
+    to notice by the newly conforming bash 4.3.
+    Fixes http:/bugs.gnu.org/16940
+
+diff --git a/tests/misc/nohup.sh b/tests/misc/nohup.sh
+index 6d2b515..2328b43 100755
+--- a/tests/misc/nohup.sh
++++ b/tests/misc/nohup.sh
+@@ -63,6 +63,11 @@ rm -f nohup.out err
+ # to stderr must be fatal.  Requires stdout to be terminal.
+ if test -w /dev/full && test -c /dev/full; then
+ (
++  # POSIX shells immediately exit the subshell on exec error.
++  # So check we can write to /dev/tty before the exec, which
++  # isn't possible if we've no controlling tty for example.
++  test -c /dev/tty && >/dev/tty || exit 0
++
+   exec >/dev/tty
+   test -t 1 || exit 0
+   nohup echo hi 2> /dev/full
-- 
1.8.4.rc3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] coreutils: fix test suite
  2014-03-06 23:49         ` [PATCH] coreutils: fix test suite Cyril Roelandt
@ 2014-03-07  8:50           ` Ludovic Courtès
  0 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2014-03-07  8:50 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: guix-devel

Cyril Roelandt <tipecaml@gmail.com> skribis:

> * gnu/packages/patches/coreutils-skip-nohup.patch: patch taken from the git
>   repository of coreutils, that makes sure tests/misc/nohup.sh does not fail
>   when /dev/tty does not exist.
> * gnu/packages/base.scm (coreutils): use it.
> * gnu-system.am (dist_patch_DATA): add it.

Excellent, please push to core-updates.  Thank you!

Ludo’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-03-07  8:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-04  9:35 core-updates: coreutils: FAIL: tests/misc/nohup Nikita Karetnikov
2014-03-04 13:36 ` Cyril Roelandt
2014-03-04 17:10   ` Ludovic Courtès
2014-03-05 21:24     ` Cyril Roelandt
2014-03-05 22:33       ` Ludovic Courtès
2014-03-06 23:49         ` [PATCH] coreutils: fix test suite Cyril Roelandt
2014-03-07  8:50           ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.