Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: [PATCH] Work around incorrect/broken pathnames in NT_FILE note
Date: Tue, 11 Aug 2020 10:02:10 -0700	[thread overview]
Message-ID: <20200811100210.49acf4c8@f32-m1.lan> (raw)
In-Reply-To: <20200809011943.77cee462@f32-m1.lan>

On Sun, 9 Aug 2020 01:19:43 -0700
Kevin Buettner via Gdb-patches <gdb-patches@sourceware.org> 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 <kevinb@redhat.com>
Date: Tue, 11 Aug 2020 09:36:12 -0700
Subject: [PATCH] corefile.exp: XFAIL warning-free test when testing on docker

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-linux-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:

	* gdb.base/corefile.exp (warning-free): XFAIL test when running
	on 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/corefile.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.
 
 clean_restart ${testfile}
 
 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 $" {
+	xfail $test
+    }
     -re "warning: .*\r\n.*\r\n$gdb_prompt $" {
 	fail $test
     }



  reply	other threads:[~2020-08-11 17:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-07 22:20 Kevin Buettner
2020-08-08 10:19 ` Luis Machado
2020-08-09  8:19   ` Kevin Buettner
2020-08-11 17:02     ` Kevin Buettner [this message]
2020-08-11 17:21       ` Luis Machado
2020-08-11 19:57         ` Kevin Buettner
2020-08-26 18:02           ` Luis Machado
2020-09-01  2:03       ` Kevin Buettner
2020-08-20 14:57 ` Pedro Alves
2020-08-29  3:25   ` Kevin Buettner
2020-08-31 14:50     ` Pedro Alves
2020-09-01  2:04       ` Kevin Buettner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200811100210.49acf4c8@f32-m1.lan \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox