From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 7F6CF1F47C for ; Tue, 17 Jan 2023 14:22:07 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=clisp.org header.i=@clisp.org header.a=rsa-sha256 header.s=strato-dkim-0002 header.b=XbXURkS9; dkim-atps=neutral Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHmqd-0005m4-I7; Tue, 17 Jan 2023 09:21:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHmqb-0005lf-JS for bug-gnulib@gnu.org; Tue, 17 Jan 2023 09:21:57 -0500 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.217]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHmqZ-0002Fq-Cr for bug-gnulib@gnu.org; Tue, 17 Jan 2023 09:21:57 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1673965312; cv=none; d=strato.com; s=strato-dkim-0002; b=EmLMxIGnxfxtnaGymEtxoX4q4gF8Po8Bhp1FPhAZOvJJcOslsNQ1LsY8fzeAhvjN8n nmsxbfbYq3qq/oSQ5RIrf+MdQq/DykPdUoDuCujjrEFz5hfJ8VroN18V4u0E3qLts1vc Bp4t5NHb4CykkFBUnFDHdvdR5bTXUMiI4umuKgTct6wJjjdj1Snp6wK97WgvhbWt6fNn o6ZKHBxxEs//Wn2MDQ4YF4XQ8DPCitCAKonKmahpVuC1mblFukBtS9Oexmn/k1vpEer+ YrCqs9ZLFG+qGirOBt7g54OoRJwxsDiKMGqfwVTj8WPxLdIrv4SSIAt9NGgczCWsdmxr XK5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1673965312; s=strato-dkim-0002; d=strato.com; h=Message-ID:Date:Subject:To:From:Cc:Date:From:Subject:Sender; bh=rs5XeYVz/9p+LmRnfziPzS37H74QKAK4Lh34jIv6oBU=; b=Fi88v+mPAazmg5CZc/aKEF2MLkXtQTyPTJ/BGJXoGmhbPAQY/MPZhONzQbfeaS+g5E mwr2KRKS19i88jGOBrdtfCn/lXLOEcjrdBi7lBha7HXzoezfrFt9VpRWnqngJP2vxjQj VVyIOH2wO9dljhHjku+uSnCs/NKROHMPtKQRHVuJgCiS24vJU9e6HU9vs/+SHEqmjO7v l+ZHCUlmz51zK9lHqSvt5RcTO3k+F5JmK7yuDGuzVvdcmnRSyke3nosrfr2jW9ZtmpjZ k3ztUz2wf+tObfSpFTYNCPzUivZOP0SOPLNPeQKr+ThhstEXqEyOFI0vr1UTg+QG4744 EOuw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1673965312; s=strato-dkim-0002; d=clisp.org; h=Message-ID:Date:Subject:To:From:Cc:Date:From:Subject:Sender; bh=rs5XeYVz/9p+LmRnfziPzS37H74QKAK4Lh34jIv6oBU=; b=XbXURkS93NBXEu/Yjx1QomUKneEt1lMMpx+BnUcCnuEACH2P70QaDJSdTHGARERSaE FdynPSpGIEnQ0gAVQ3zUm92rP4JzpR39I/56uHpdirXwJhTQhVX7seEB1mleg/Ip9uVP nt1nhnt488QRHg82zihq1pScoALPAK6Aw4QE3hzvodFuoluCZZYdxPNCnlaP2YlpveNE IpBTsZfBI1o4525fqVIm5aGqF6MZF/8ZlJICaZ7ze9dBuLiBjOlGaNW0jVEo5Q/rf6aT 0IuI7/2sPZYOH8q/Jzvz+y/cOF8c9O62ylbFh76cAWdJjLVfxBwO3Z83RHgN2PWWZOym h54A== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH0WWb0LN8XZoH94zq68+3cfpOU36ZlyvfpaYudzZv7Hx1QQv/ySQ==" Received: from nimes.localnet by smtp.strato.de (RZmta 48.6.2 AUTH) with ESMTPSA id I8f358z0HELqTnZ (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 17 Jan 2023 15:21:52 +0100 (CET) From: Bruno Haible To: bug-gnulib@gnu.org Subject: execute tests: Avoid test failure on Android Date: Tue, 17 Jan 2023 15:21:52 +0100 Message-ID: <4520176.VQJxnDRnGh@nimes> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: none client-ip=81.169.146.217; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org On Android 11, I'm seeing a test failure: FAIL: test-execute.sh ===================== test-execute-main: test-execute-child subprocess failed ../../gltests/test-execute-main.c:138: assertion 'ret == 127' failed Aborted test-execute.sh: test case 3 failed ../../gltests/test-execute-main.c:151: assertion 'ret == 0' failed Aborted test-execute.sh: test case 4 failed FAIL test-execute.sh (exit status: 1) When I run make check TESTS=test-execute.sh or rm -f test-execute.sh.log; make test-execute.sh.log I see the test cases 3 and 4 fail, because the child program has exited with exit code 71. Whereas when I run ../../gltests/test-execute.sh directly, all the tests pass. Apparently the SIGPIPE handler gets set to SIG_IGN, either by 'make' or by the test-driver. This patch implements a workaround. 2023-01-17 Bruno Haible execute tests: Avoid test failure on Android. * tests/test-execute-main.c (main): Reset the SIGPIPE handler to default. diff --git a/tests/test-execute-main.c b/tests/test-execute-main.c index d89b34465b..fbaa9c9d2e 100644 --- a/tests/test-execute-main.c +++ b/tests/test-execute-main.c @@ -58,6 +58,18 @@ main (int argc, char *argv[]) const char *progname = "test-execute-child"; int test = atoi (argv[2]); +#if defined __ANDROID__ + /* On Android 11, when this test is executed through 'make' (GNU make 4.4) and + build-aux/test-driver, i.e. through + make check TESTS=test-execute.sh + or + rm -f test-execute.sh.log; make test-execute.sh.log + the signal handler for SIGPIPE is set to SIG_IGN. This causes the tests + 3 and 4 to fail. Work around it by resetting the signal handler for + SIGPIPE to the default. */ + signal (SIGPIPE, SIG_DFL); +#endif + switch (test) { case 14: