From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id 7A90F3858281 for ; Tue, 12 Dec 2023 09:49:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7A90F3858281 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7A90F3858281 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=45.83.234.184 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702374592; cv=none; b=pIN1wTBCQUjOzjgj1lH2UBqmooT21izdHMfbMfdj59K233WcoFcGcZBu7AZIjL0f88j9d9KgUambaCStl2u0b+QuXUDHwzg7HB3ln1Bo1EXaxVw8B3orohcgfsZn5H+SSktXYOnwHbt+PxDTU6kRH7M4DD7yzhUJBSBB7XfNFss= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702374592; c=relaxed/simple; bh=YqoT6N+Z9EoqBm/88KJ1pw1tPloFLKwb23S0MIOFRaI=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=xWIRd/c5i+6MK3BBeZ63+XxCS0GegibYdbF4cwyHBOIpHUe+vNUQh/pQlziwDVzIyYIX3zjzNa6oHuOaS3EOHCcWwJZKIHMG/Hf9zcIy1W2WaK3GihPHmgM6YpulAQK9chgWGzbPM26qPQNFKALVuYOGXw/nvu/EUZ/7rx/hSt4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from csb.redhat.com (deer0x03.wildebeest.org [172.31.17.133]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id B0B08302FDCD; Tue, 12 Dec 2023 10:49:48 +0100 (CET) Received: by csb.redhat.com (Postfix, from userid 10916) id 82CFED0A87; Tue, 12 Dec 2023 10:49:48 +0100 (CET) From: Mark Wielaard To: elfutils-devel@sourceware.org Cc: David Abdurachmanov , Mark Wielaard Subject: [PATCH] tests: Don't redirect output to /dev/null in run-native-test.sh Date: Tue, 12 Dec 2023 10:49:33 +0100 Message-Id: <20231212094933.392565-1-mark@klomp.org> X-Mailer: git-send-email 2.39.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.7 required=5.0 tests=BAYES_00,GIT_PATCH_0,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: By redirecting all output to /dev/null in run-native-test.sh the run-native-test.sh.log file will be empty on failures. This makes it hard to figure out what went wrong. * tests/run-native-test.sh: Remove /dev/null redirects. Signed-off-by: Mark Wielaard --- tests/run-native-test.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/run-native-test.sh b/tests/run-native-test.sh index 042a51c6..01a52e82 100755 --- a/tests/run-native-test.sh +++ b/tests/run-native-test.sh @@ -57,10 +57,10 @@ trap native_exit 0 for cc in "$HOSTCC" "$HOST_CC" cc gcc "$CC"; do test "x$cc" != x || continue - $cc -o native -g native.c > /dev/null 2>&1 && + $cc -o native -g native.c && # Some shell versions don't do this right without the braces. - { ./native > /dev/null 2>&1 & native=$! ; } && - sleep 1 && kill -0 $native 2> /dev/null && + { ./native & native=$! ; } && + sleep 1 && kill -0 $native && break || native=0 done @@ -68,14 +68,17 @@ done native_test() { # Try the build against itself, i.e. $config_host. - testrun "$@" -e $1 > /dev/null + echo "Try the build against itself: $@ -e $1" + testrun "$@" -e $1 # Try the build against a presumed native process, running this sh. # For tests requiring debug information, this may not test anything. - testrun "$@" -p $$ > /dev/null + echo "Try the build against a presumed native process: $@ -p $$" + testrun "$@" -p $$ # Try the build against the trivial native program we just built with -g. - test $native -eq 0 || testrun "$@" -p $native > /dev/null + echo "Try the build against the trivial native program: $@ -p $native" + test $native -eq 0 || testrun "$@" -p $native } native_test ${abs_builddir}/allregs -- 2.39.3