From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 666203894E7C for ; Thu, 30 Apr 2020 06:43:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 666203894E7C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7B675AB76; Thu, 30 Apr 2020 06:43:21 +0000 (UTC) Date: Thu, 30 Apr 2020 08:43:20 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFC][gdb/testsuite] Add gdbfail/envfail aliases for kfail/xfail Message-ID: <20200430064319.GA24688@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-28.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2020 06:43:24 -0000 Hi, The difference between an xfail and a kfail (in the context of gdb testing) is that: - a kfail marks a problem in gdb - an xfail marks a problem in the environment (compiler, libc, kernel) However, this difference is not immediately obvious from the contrast between "known" and "expected". Add aliases gdbfail for kfail, and envfail for xfail, that are more intuitive to use. Tested on x86_64-linux. Any comments? Thanks, - Tom [gdb/testsuite] Add gdbfail/envfail aliases for kfail/xfail gdb/testsuite/ChangeLog: 2020-04-30 Tom de Vries * lib/gdb.exp (gdbfail, envfail, setup_gdbfail, setup_envfail): New proc. * gdb.ada/packed_tagged.exp: Fix incorrectly marked kfails, by using envfail. --- gdb/testsuite/gdb.ada/packed_tagged.exp | 12 ++++++------ gdb/testsuite/lib/gdb.exp | 26 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/gdb/testsuite/gdb.ada/packed_tagged.exp b/gdb/testsuite/gdb.ada/packed_tagged.exp index d6ee8454c5a..1e965cffda1 100644 --- a/gdb/testsuite/gdb.ada/packed_tagged.exp +++ b/gdb/testsuite/gdb.ada/packed_tagged.exp @@ -38,16 +38,16 @@ foreach_with_prefix scenario {all minimal} { set pass_re \ "= \\(exists => true, value => 10\\)" # There is a compiler bug that causes this output. - set kfail_re \ + set envfail_re \ "= \\(exists => true\\)" gdb_test_multiple "print x" "" { -re -wrap $pass_re { pass $gdb_test_name } - -re -wrap $kfail_re { + -re -wrap $envfail_re { if {$scenario == "minimal"} { - setup_kfail "gnat compiler bug" *-*-* + setup_envfail "gnat compiler bug" *-*-* } fail $gdb_test_name } @@ -63,7 +63,7 @@ foreach_with_prefix scenario {all minimal} { " end case;" \ "end record" ] # There is a compiler bug that causes this output. - set kfail_re \ + set envfail_re \ [multi_line "type = record" \ " exists: (boolean|range false \\.\\. true);" \ " case \\? is" \ @@ -77,9 +77,9 @@ foreach_with_prefix scenario {all minimal} { -re -wrap $pass_re { pass $gdb_test_name } - -re -wrap $kfail_re { + -re -wrap $envfail_re { if {$scenario == "minimal"} { - setup_kfail "gnat compiler bug" *-*-* + setup_envfail "gnat compiler bug" *-*-* } fail $gdb_test_name } diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index b72ce0cda7f..00efe280a43 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -7124,5 +7124,31 @@ proc debug_types { } { return 0 } +# Alias for kfail, to make the distinction between kfail and xfail clearer. + +proc gdbfail { args } { + kfail {*}$args +} + +# Alias for xfail, to make the distinction between kfail and xfail clearer. + +proc envfail { args } { + xfail {*}$args +} + +# Alias for setup_kfail, to make the distinction between kfail and xfail +# clearer. + +proc setup_gdbfail { args } { + setup_kfail {*}$args +} + +# Alias for setup_xfail, to make the distinction between kfail and xfail +# clearer. + +proc setup_envfail { args } { + setup_xfail {*}$args +} + # Always load compatibility stuff. load_lib future.exp