bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Subject: spawn-pipe tests: Fix test failure on Android
Date: Wed, 11 Jan 2023 21:39:55 +0100	[thread overview]
Message-ID: <2129949.AB8Y2P6tQ1@nimes> (raw)

On Android 11, I'm seeing this test failure:

FAIL: test-spawn-pipe.sh
========================

../../gltests/test-spawn-pipe-child.c:134: assertion '! is_open (STDERR_FILENO)' failed
test-spawn-pipe.sh: iteration 4 failed
../../gltests/test-spawn-pipe-child.c:134: assertion '! is_open (STDERR_FILENO)' failed
test-spawn-pipe.sh: iteration 5 failed
../../gltests/test-spawn-pipe-child.c:134: assertion '! is_open (STDERR_FILENO)' failed
test-spawn-pipe.sh: iteration 6 failed
../../gltests/test-spawn-pipe-child.c:134: assertion '! is_open (STDERR_FILENO)' failed
test-spawn-pipe.sh: iteration 7 failed
FAIL test-spawn-pipe.sh (exit status: 1)

This patch fixes it.


2023-01-11  Bruno Haible  <bruno@clisp.org>

	spawn-pipe tests: Fix test failure on Android.
	* tests/test-spawn-pipe-child.c (main): Skip the is_open (STDERR_FILENO)
	check on Android.

diff --git a/tests/test-spawn-pipe-child.c b/tests/test-spawn-pipe-child.c
index 071beb320f..1d8a27ffd4 100644
--- a/tests/test-spawn-pipe-child.c
+++ b/tests/test-spawn-pipe-child.c
@@ -127,9 +127,9 @@ main (int argc, char *argv[])
     case 1:
       /* Expect fd 2 is closed.
          But on HP-UX 11, fd 2 gets automatically re-opened to /dev/null if it
-         was closed.  Similarly on native Windows.  Future POSIX will allow
-         this, see <http://austingroupbugs.net/view.php?id=173>.  */
-#if !(defined __hpux || (defined _WIN32 && ! defined __CYGWIN__))
+         was closed.  Similarly on Android and on native Windows.  Future POSIX
+         will allow this, see <http://austingroupbugs.net/view.php?id=173>.  */
+#if !(defined __hpux || defined __ANDROID__ || (defined _WIN32 && ! defined __CYGWIN__))
       if (!is_qemu)
         ASSERT (! is_open (STDERR_FILENO));
 #endif





                 reply	other threads:[~2023-01-11 20:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

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

  git send-email \
    --in-reply-to=2129949.AB8Y2P6tQ1@nimes \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).