Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sandbox:master commit in: tests/
Date: Thu, 27 Jun 2019 21:41:40
Message-Id: 1561626596.604927f331829f971d3a32c2e67e0ad5ce3d8ee4.slyfox@gentoo
1 commit: 604927f331829f971d3a32c2e67e0ad5ce3d8ee4
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jun 27 09:09:56 2019 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 27 09:09:56 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=604927f3
7
8 tests: disable utimensat-3 on *-linux-musl
9
10 x86_64-gentoo-linux-musl fails a single test:
11 83: utimensat/3 FAILED (utimensat.at:3)
12
13 The test checks if sandbox does not crash when
14 utimensat(<filefd>, NULL, NULL, 0)
15 is called. The behaviour is not specified by POSIX
16 but glibc returns EINVAL for such a case. Thus the
17 test behaves differently on varius libs.
18
19 https://www.openwall.com/lists/musl/2019/06/25/1 has
20 a conversation with musl upstream.
21
22 The change restricts test down to glibc targets.
23
24 Bug: https://bugs.gentoo.org/549108
25 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
26
27 tests/atlocal.in | 1 +
28 tests/utimensat-3.sh | 11 +++++++++++
29 2 files changed, 12 insertions(+)
30
31 diff --git a/tests/atlocal.in b/tests/atlocal.in
32 index b9a631b..91b41b2 100644
33 --- a/tests/atlocal.in
34 +++ b/tests/atlocal.in
35 @@ -2,6 +2,7 @@
36
37 export abs_top_srcdir abs_top_builddir abs_srcdir abs_builddir
38 export AWK="@AWK@"
39 +export HOST="@host@"
40
41 if ! ${at_clean} ; then
42 export SB_UID=$(./get-user)
43
44 diff --git a/tests/utimensat-3.sh b/tests/utimensat-3.sh
45 index 4ecd4b3..a7b9843 100755
46 --- a/tests/utimensat-3.sh
47 +++ b/tests/utimensat-3.sh
48 @@ -1,6 +1,17 @@
49 #!/bin/sh
50 # make sure NULL filename is handled correctly
51
52 +# Note: this test is dependent on glibc internals
53 +# other libcs chose not to validate invalid parameters:
54 +# https://bugs.gentoo.org/549108#c28
55 +# https://www.openwall.com/lists/musl/2019/06/25/1
56 +# Run this test only on glibc systems.
57 +
58 +case $HOST in
59 + *-linux-gnu);;
60 + *) exit 77;;
61 +esac
62 +
63 addwrite $PWD
64
65 exec utimensat-0 -1:22 'f:O_WRONLY|O_CREAT:0666' NULL NULL 0