"gdb.arch/i386-pkru.exp: probe PKRU support" shouldn't FAIL if not supported
authorPedro Alves <palves@redhat.com>
Wed, 8 Mar 2017 13:09:45 +0000 (13:09 +0000)
committerPedro Alves <palves@redhat.com>
Wed, 8 Mar 2017 13:09:45 +0000 (13:09 +0000)
Currently I get:

 (gdb) print have_pkru()
 $1 = 0
 (gdb) FAIL: gdb.arch/i386-pkru.exp: probe PKRU support
 UNSUPPORTED: gdb.arch/i386-pkru.exp: processor does not support protection key feature.

Probing suceeded, so that should be a PASS -> UNSUPPORTED.

gdb/testsuite/ChangeLog:
2017-03-08  Pedro Alves  <palves@redhat.com>

* gdb.arch/i386-pkru.exp (probe PKRU support): Handle detecting
PKRU as not supported as a PASS.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.arch/i386-pkru.exp

index b2b14db75e4ce59c401293e8c11f1f982b51c56c..26135e52ce9e0a1e8ae72c728f8ed34e57c844e4 100644 (file)
@@ -1,3 +1,8 @@
+2017-03-08  Pedro Alves  <palves@redhat.com>
+
+       * gdb.arch/i386-pkru.exp (probe PKRU support): Handle detecting
+       PKRU as not supported as a PASS.
+
 2017-03-08  Pedro Alves  <palves@redhat.com>
 
        * gdb.base/break-fun-addr.exp: Use $testfile1/$testfile2 for test
index 5f243f1be5a4aaecec0ea3f24b0e27ae01229bf2..eb77037276af5496631e765d8b59c8cdcfe4a5dd 100644 (file)
@@ -40,6 +40,9 @@ gdb_test_multiple "print have_pkru()" $test {
         pass $test
         set supports_pkru 1
     }
+    -re ".. = 0\r\n$gdb_prompt $" {
+        pass $test
+    }
 }
 
 if { !$supports_pkru } {