With this patch we can now XFAIL tests that are expected to fail at runtime. This is how it's used:

/* { dg-final { memmodel-gdb-test { xfail x86*-*-* } } } */

Note, that the test will still run.

This is needed for an upcoming known-to-fail test Andrew will contribute shortly.

Committed to branch.

       * lib/gcc-memmodel-gdb-test.exp (memmmodel-gdb-test): Handle

Index: lib/gcc-memmodel-gdb-test.exp
===================================================================
--- lib/gcc-memmodel-gdb-test.exp       (revision 177836)
+++ lib/gcc-memmodel-gdb-test.exp       (working copy)
@@ -21,9 +21,15 @@
 #
 # Call 'fail' if a given test printed "FAIL:", otherwise call 'pass'.

-proc memmodel-gdb-test { } {
+proc memmodel-gdb-test { args } {
     if { ![isnative] || [is_remote target] } { return }

+    if { [llength $args] == 1 } {
+       switch [dg-process-target [lindex $args 0]] {
+               "F" { setup_xfail "*-*-*" }
+       }
+    }
+
     # This assumes that we are three frames down from dg-test, and that
# it still stores the filename of the testcase in a local variable "name".
     # A cleaner solution would require a new DejaGnu release.

Reply via email to