From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14351 invoked by alias); 19 Sep 2018 10:32:37 -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 14160 invoked by uid 48); 19 Sep 2018 10:32:34 -0000 From: "ldv at sourceware dot org" To: elfutils-devel@sourceware.org Subject: [Bug tools/23673] TEST ./tests/backtrace-dwarf fails on s390x in at least 0.173 Date: Wed, 19 Sep 2018 10:32:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: tools X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ldv at sourceware dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2018-q3/txt/msg00130.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D23673 Dmitry V. Levin changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ldv at sourceware dot org --- Comment #10 from Dmitry V. Levin --- I'd suggest the following change to enhance error diagnostics: diff --git a/tests/backtrace-dwarf.c b/tests/backtrace-dwarf.c index 35f25ed6..3a22db31 100644 --- a/tests/backtrace-dwarf.c +++ b/tests/backtrace-dwarf.c @@ -143,9 +143,8 @@ main (int argc __attribute__ ((unused)), char **argv) case -1: abort (); case 0:; - long l =3D ptrace (PTRACE_TRACEME, 0, NULL, NULL); - assert (errno =3D=3D 0); - assert (l =3D=3D 0); + if (ptrace (PTRACE_TRACEME, 0, NULL, NULL)) + _exit(errno ?: -1); cleanup_13_main (); abort (); default: @@ -155,10 +154,12 @@ main (int argc __attribute__ ((unused)), char **argv) errno =3D 0; int status; pid_t got =3D waitpid (pid, &status, 0); - assert (errno =3D=3D 0); - assert (got =3D=3D pid); - assert (WIFSTOPPED (status)); - assert (WSTOPSIG (status) =3D=3D SIGABRT); + if (got !=3D pid) + error (1, errno, "waitpid returned %d", got); + if (!WIFSTOPPED (status)) + error (1, 0, "unexpected wait status %u", status); + if (WSTOPSIG (status) !=3D SIGABRT) + error (1, 0, "unexpected signal %u", WSTOPSIG (status)); Dwfl *dwfl =3D pid_to_dwfl (pid); dwfl_getthreads (dwfl, thread_callback, NULL); --=20 You are receiving this mail because: You are on the CC list for the bug.