This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Move strace -m/explicit location test to strace.exp
- From: Keith Seitz <kseitz at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 17 Aug 2015 19:12:42 -0000
- Subject: [binutils-gdb] Move strace -m/explicit location test to strace.exp
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ad89c2aa677c28c76ffd5a35e2b36eece4d82597
commit ad89c2aa677c28c76ffd5a35e2b36eece4d82597
Author: Keith Seitz <keiths@redhat.com>
Date: Thu Aug 13 11:56:50 2015 -0700
Move strace -m/explicit location test to strace.exp
One of the build slaves shows this error running explicit.exp:
(gdb) strace -m gdbfoobarbaz
Remote failure reply: E.In-process agent library not loaded in process.
Fast and static tracepoints unavailable.
(gdb) FAIL: gdb.linespec/explicit.exp: strace -m gdbfoobarbaz
There are two big problems with this test:
1) The expected output is actually not what the test is meant to test for.
2) This test should really only run where it is supported.
This is most easily fixed by moving the test to gdb.trace/strace.exp.
gdb/testsuite/ChangeLog
* gdb.linespec/explicit.exp: Move strace test from here ...
* gdb.trace/strace.exp: ... to here.
Diff:
---
gdb/testsuite/ChangeLog | 5 +++++
gdb/testsuite/gdb.linespec/explicit.exp | 4 ----
gdb/testsuite/gdb.trace/strace.exp | 5 +++++
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 37ed043..9a7cf88 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-08-17 Keith Seitz <keiths@redhat.com>
+
+ * gdb.linespec/explicit.exp: Move strace test from here ...
+ * gdb.trace/strace.exp: ... to here.
+
2015-08-15 Patrick Palka <patrick@parcs.ath.cx>
* gdb.base/kill-detach-inferiors-cmd.exp: New test file.
diff --git a/gdb/testsuite/gdb.linespec/explicit.exp b/gdb/testsuite/gdb.linespec/explicit.exp
index 344f1b0..a0851cd 100644
--- a/gdb/testsuite/gdb.linespec/explicit.exp
+++ b/gdb/testsuite/gdb.linespec/explicit.exp
@@ -86,10 +86,6 @@ namespace eval $testfile {
add linespecs "-function myfunction -label top -line 3" $location(top)
add linespecs "-line 3" $location(normal)
- # Test that static tracepoints on marker ID are not interpreted
- # as an erroneous explicit option.
- gdb_test "strace -m gdbfoobarbaz" "You can't do that.*"
-
# Fire up gdb.
if {![runto_main]} {
return -1
diff --git a/gdb/testsuite/gdb.trace/strace.exp b/gdb/testsuite/gdb.trace/strace.exp
index 8610fdf..e0a4082 100644
--- a/gdb/testsuite/gdb.trace/strace.exp
+++ b/gdb/testsuite/gdb.trace/strace.exp
@@ -390,6 +390,11 @@ if { ![gdb_target_supports_trace] } then {
return -1
}
+# Double-check that marker ID ("-m") is not mistaken for an explicit location
+# flag.
+gdb_test "strace -m gdbfoobarbaz" \
+ "No known static tracepoint marker named gdbfoobarbaz"
+
strace_probe_marker
strace_trace_on_same_addr "trace"