From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by sourceware.org (Postfix) with ESMTPS id 27A8D384F01E for ; Wed, 13 Jul 2022 16:00:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 27A8D384F01E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f48.google.com with SMTP id o19-20020a05600c511300b003a2de48b4bbso1465954wms.5 for ; Wed, 13 Jul 2022 09:00:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=8RnUlxReaxVIclKQ4e1kLYu94UTul6LrdNb6LkS1f84=; b=osnxrznozFoolEoivT2VXaDymH+jVmXhINagDcA1EStsNGkP8KLzPvZCo4qosErO1+ CaTfJaIN3CID0t776FeeV8hEzC3qv4+Cz+TcdBqpKU1SctTHd4zvN41NBLL9G4M9ab6G WirZI3SFMYwG773NY7COavrTV2OurIwHQlphpn4ZYkiKx+9E8iqqfQVWBWGRhtzXNLO9 ozquX8IObsGSs8DXOD2UkNnMYsi+ZzOyz/Hjrcjk/NVxYkVcSMKF80OiOFyK6UF7H4RV 8f1YtgSkF3Dzsh19mbgiZUzInF/z3A7uIs77m5WEg0n/ick7W4hyduXthViVKm+bCtgH qZjg== X-Gm-Message-State: AJIora/JcQw1TWV4uFHkw0/ZbLwYPsuGUGXT3TjC/cEib9p8tpTudFVU mxCqrqUu55RuS7vrcY7B0qNbggWQgd8= X-Google-Smtp-Source: AGRyM1vE3XaoVBRmHEkBMlZc7QawHzWAzx3wHDbeDPEPrZeCue3sG8YqxBqvKoVlLGpAMrSdnL2pyQ== X-Received: by 2002:a7b:cbcb:0:b0:3a2:e899:7dc9 with SMTP id n11-20020a7bcbcb000000b003a2e8997dc9mr10720140wmi.82.1657728036700; Wed, 13 Jul 2022 09:00:36 -0700 (PDT) Received: from localhost ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id b4-20020adfe644000000b0021d6e14a9ccsm11093358wrn.16.2022.07.13.09.00.35 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Jul 2022 09:00:35 -0700 (PDT) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH] Put gdb.base/bt-on-fatal-signal.exp GDB cores in output dir Date: Wed, 13 Jul 2022 17:00:34 +0100 Message-Id: <20220713160034.13491-1-pedro@palves.net> X-Mailer: git-send-email 2.36.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.8 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2022 16:00:43 -0000 I noticed that gdb.base/bt-on-fatal-signal.exp was contributing four core files to the count of unexpected core files: $ make check TESTS="gdb.base/bt-on-fatal-signal.exp" === gdb Summary === # of unexpected core files 4 # of expected passes 21 These are GDB core dumps. They are expected, however, because the whole point of the testcase is to crash GDB with a signal. Make GDB change its current directory to the output dir just before crashing, so that the core files end up there. The result is now: === gdb Summary === # of expected passes 25 and: $ find . -name "core.*" ./testsuite/outputs/gdb.base/bt-on-fatal-signal/core.gdb.1676506.nelson.1657727692 ./testsuite/outputs/gdb.base/bt-on-fatal-signal/core.gdb.1672585.nelson.1657727671 ./testsuite/outputs/gdb.base/bt-on-fatal-signal/core.gdb.1674833.nelson.1657727683 ./testsuite/outputs/gdb.base/bt-on-fatal-signal/core.gdb.1673709.nelson.1657727676 (Note the test is skipped at the top if on a remote host.) Change-Id: I79e4fb2e91330279c7a509930b1952194a72e85a --- gdb/testsuite/gdb.base/bt-on-fatal-signal.exp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gdb/testsuite/gdb.base/bt-on-fatal-signal.exp b/gdb/testsuite/gdb.base/bt-on-fatal-signal.exp index 8adf3c4fa45..8f9d857106d 100644 --- a/gdb/testsuite/gdb.base/bt-on-fatal-signal.exp +++ b/gdb/testsuite/gdb.base/bt-on-fatal-signal.exp @@ -80,6 +80,11 @@ foreach test_data {{SEGV "Segmentation fault"} \ set saw_bt_end false set internal_error_msg_count 0 + # Get the GDB core into the output directory, so that it + # doesn't count as unexpected core in gdb.sum. + gdb_test "cd [file dirname $binfile]" "Working directory .*" \ + "cd to test directory" + # Send the fatal signal to GDB. remote_exec host "kill -${sig} ${testpid}" base-commit: 0f443d1b70ff8c338a536b5ce1cd963f8ee8d206 -- 2.36.0