From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by sourceware.org (Postfix) with ESMTP id 0DBC43857039 for ; Tue, 11 Aug 2020 17:02:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0DBC43857039 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-474-cRudaB3oMaaBrj9grm5VsQ-1; Tue, 11 Aug 2020 13:02:11 -0400 X-MC-Unique: cRudaB3oMaaBrj9grm5VsQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D3E418A8E00; Tue, 11 Aug 2020 17:02:10 +0000 (UTC) Received: from f32-m1.lan (ovpn-112-15.phx2.redhat.com [10.3.112.15]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A15B95D9D7; Tue, 11 Aug 2020 17:02:10 +0000 (UTC) Date: Tue, 11 Aug 2020 10:02:10 -0700 From: Kevin Buettner To: gdb-patches@sourceware.org Subject: Re: [PATCH] Work around incorrect/broken pathnames in NT_FILE note Message-ID: <20200811100210.49acf4c8@f32-m1.lan> In-Reply-To: <20200809011943.77cee462@f32-m1.lan> References: <20200807222044.2252664-1-kevinb@redhat.com> <20200809011943.77cee462@f32-m1.lan> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Tue, 11 Aug 2020 17:02:17 -0000 On Sun, 9 Aug 2020 01:19:43 -0700 Kevin Buettner via Gdb-patches wrote: > That new failure is expected in your docker environment. It might > be possible to XFAIL it. We need to be able to detect that we're > running in docker with the AUFS storage driver. Since we know that > the kernel is leaking docker host paths, we should see these when the > "info proc mappings" command is used with a loaded core file. I'll > give it a try... It turned out that there's an even easier way to XFAIL this case. See below... >From 23452e31502820e15c1c72a3935360f7f1932ed9 Mon Sep 17 00:00:00 2001 From: Kevin Buettner Date: Tue, 11 Aug 2020 09:36:12 -0700 Subject: [PATCH] corefile.exp: XFAIL warning-free test when testing on dock= er When testing on docker using the AUFS storage driver, loading a core file will often print a number of warnings. Here's an example (with the pathname shortened somewhat): warning: Can't open file /var/lib/docker/aufs/diff/d07..e21/lib/x86_64-linu= x-gnu/libc-2.27.so during file-backed mapping note processing The "warning-free" test in gdb.base/corefile.exp will fail if any warnings are printed, but this particular warning is unavoidable when running in the docker environment. Fortunately, the path mentions both "docker" and "aufs", making it easy to XFAIL this case. gdb/testsuite/ChangeLog: =09* gdb.base/corefile.exp (warning-free): XFAIL test when running =09on docker w/ AUFS storage driver. --- gdb/testsuite/gdb.base/corefile.exp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/c= orefile.exp index 8abf62b51f..b1022dd16f 100644 --- a/gdb/testsuite/gdb.base/corefile.exp +++ b/gdb/testsuite/gdb.base/corefile.exp @@ -324,11 +324,18 @@ corefile_test_attach # Test warning-free core file load. E.g., a Linux vDSO used to # trigger this warning: # warning: Can't read pathname for load map: Input/output error. +# +# When testing in a docker container using the AUFS storage driver, +# the kernel places host paths in the core file's NT_FILE note. XFAIL +# this case since these paths make no sense in the container. =20 clean_restart ${testfile} =20 set test "core-file warning-free" gdb_test_multiple "core-file $corefile" $test { + -re "warning: Can\'t open file.*\/docker\/aufs\/.*\r\n$gdb_prompt $" { +=09xfail $test + } -re "warning: .*\r\n.*\r\n$gdb_prompt $" { =09fail $test }