From patchwork Wed Mar 8 13:14:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 19478 Received: (qmail 54987 invoked by alias); 8 Mar 2017 13:14:46 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 54569 invoked by uid 89); 8 Mar 2017 13:14:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1549 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 08 Mar 2017 13:14:44 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 34A5F3D942 for ; Wed, 8 Mar 2017 13:14:44 +0000 (UTC) Received: from cascais.lan (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v28DEe0s008413 for ; Wed, 8 Mar 2017 08:14:43 -0500 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [pushed] "gdb.arch/i386-pkru.exp: probe PKRU support" shouldn't FAIL if not supported Date: Wed, 8 Mar 2017 13:14:39 +0000 Message-Id: <1488978879-6559-1-git-send-email-palves@redhat.com> 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 * gdb.arch/i386-pkru.exp (probe PKRU support): Handle detecting PKRU as not supported as a PASS. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.arch/i386-pkru.exp | 3 +++ 2 files changed, 8 insertions(+) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index b2b14db..26135e5 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2017-03-08 Pedro Alves + * gdb.arch/i386-pkru.exp (probe PKRU support): Handle detecting + PKRU as not supported as a PASS. + +2017-03-08 Pedro Alves + * gdb.base/break-fun-addr.exp: Use $testfile1/$testfile2 for test prefix instead of $binfile1/$binfile2. * gdb.btrace/gcore.exp: Use "core" instead of unstable path name diff --git a/gdb/testsuite/gdb.arch/i386-pkru.exp b/gdb/testsuite/gdb.arch/i386-pkru.exp index 5f243f1..eb77037 100644 --- a/gdb/testsuite/gdb.arch/i386-pkru.exp +++ b/gdb/testsuite/gdb.arch/i386-pkru.exp @@ -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 } {