From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31842 invoked by alias); 16 Feb 2018 19:37:12 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 31825 invoked by uid 89); 16 Feb 2018 19:37:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.2 spammy=our X-Spam-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: gnu.wildebeest.org Received: from wildebeest.demon.nl (HELO gnu.wildebeest.org) (212.238.236.112) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 16 Feb 2018 19:37:10 +0000 Received: from tarox.wildebeest.org (tarox.wildebeest.org [172.31.17.39]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 05B3932C3723; Fri, 16 Feb 2018 20:37:06 +0100 (CET) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id B46C44133198; Fri, 16 Feb 2018 20:37:06 +0100 (CET) From: Mark Wielaard To: elfutils-devel@sourceware.org Cc: Mark Wielaard Subject: [PATCH] tests: Accept any core if no core with the "correct" pid can be found. Date: Fri, 16 Feb 2018 19:37:00 -0000 Message-Id: <1518809824-20616-1-git-send-email-mark@klomp.org> X-Mailer: git-send-email 1.8.3.1 X-Spam-Flag: NO X-IsSubscribed: yes X-SW-Source: 2018-q1/txt/msg00038.txt.bz2 In some containers our view of pids is confused. We see the container pid namespace, but the core is generated using the host pid namespace. Since tests are run in a new fresh directory any core here is most like is ours. Signed-off-by: Mark Wielaard --- tests/ChangeLog | 5 +++++ tests/backtrace-subr.sh | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/tests/ChangeLog b/tests/ChangeLog index cfdd7f9..9a89676 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2018-02-16 Mark Wielaard + + * backtrace-subr.sh (check_native_core): Check if there is any core, + if so, use it. + 2018-02-15 Mark Wielaard * backtrace-child.c: Include signal.h after sys/ptrace.h. diff --git a/tests/backtrace-subr.sh b/tests/backtrace-subr.sh index e04a7ea..ff42c6f 100644 --- a/tests/backtrace-subr.sh +++ b/tests/backtrace-subr.sh @@ -174,6 +174,13 @@ check_native_core() fi fi if [ ! -f "$core" ]; then + # In some containers our view of pids is confused. Since tests are + # run in a new fresh directory any core here is most like is ours. + if ls core.[0-9]* 1> /dev/null 2>&1; then + mv core.[0-9]* "$core" + fi + fi + if [ ! -f "$core" ]; then echo "No $core file generated"; exit 77; fi -- 1.8.3.1