From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id F0A5A385840D for ; Tue, 29 Aug 2023 15:27:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F0A5A385840D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 2ACCD1F45F for ; Tue, 29 Aug 2023 15:27:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1693322835; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RSSKbiS4fyAJHmBkb/M2XL0APd2RZ6wm4p1Ws7N9SnY=; b=rAyo5Lnh+ihJQWZv0NXJspsGznj4Mlo8cGvhIaxFH9oY8p1cGG8RHRH/R5EcM0/PvuCppz KWmhkWqdYTc1Y8O1EZ+FrkRVyql/kp/3I+MHWzGHL4ip2Uw15xPXYW4CD3OhTC3PenVfS0 b3CqDDEbW3rro0qRB3RMVSArn+GP02U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1693322835; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RSSKbiS4fyAJHmBkb/M2XL0APd2RZ6wm4p1Ws7N9SnY=; b=trHRGTV1Pi8BHwJ0i0PtpO4yu2HAULer0q9BzOnBkeHAjkPug2cGms6W9wBuyBnOm+MUbc IXFJ++rgBSA/dbBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 180B513909 for ; Tue, 29 Aug 2023 15:27:15 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 4GvDBFMO7mQ3IgAAMHmgww (envelope-from ) for ; Tue, 29 Aug 2023 15:27:15 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [pushed 2/4] [gdb/testsuite] Handle some test-cases with older compiler Date: Tue, 29 Aug 2023 17:27:40 +0200 Message-Id: <20230829152742.7695-2-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230829152742.7695-1-tdevries@suse.de> References: <20230829152742.7695-1-tdevries@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: When running test-case gdb.mi/print-simple-values.exp with gcc 4.8.4, I run into a compilation failure due to the test-case requiring c++11 and the compiler defaulting to less than that. Fix this by compiling with -std=c++11. Likewise in a few other test-cases. Tested on x86_64-linux. --- gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp | 6 +++++- gdb/testsuite/gdb.dwarf2/nullptr_t.exp | 7 ++++++- gdb/testsuite/gdb.fortran/mixed-lang-stack.exp | 2 +- gdb/testsuite/gdb.linespec/cpcompletion.exp | 6 +++++- gdb/testsuite/gdb.mi/print-simple-values.exp | 7 ++++++- 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp b/gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp index 6fffc982722..f2b0b7204c3 100644 --- a/gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp +++ b/gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp @@ -17,8 +17,12 @@ load_lib dwarf.exp standard_testfile index.cc +set opts {} +lappend opts debug +lappend opts additional_flags=-std=c++11 + if {[prepare_for_testing "failed to prepare" "${testfile}" \ - [list ${srcfile}]]} { + [list ${srcfile}] $opts]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/nullptr_t.exp b/gdb/testsuite/gdb.dwarf2/nullptr_t.exp index c40c7677f7f..df2f163af38 100644 --- a/gdb/testsuite/gdb.dwarf2/nullptr_t.exp +++ b/gdb/testsuite/gdb.dwarf2/nullptr_t.exp @@ -17,7 +17,12 @@ require allow_cplus_tests standard_testfile .cc -if [prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}] { +set opts {} +lappend opts debug +lappend opts c++ +lappend opts additional_flags=-std=c++11 + +if [prepare_for_testing "failed to prepare" $testfile $srcfile $opts] { return -1 } diff --git a/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp b/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp index 5fc36f7b95b..3973f68c666 100644 --- a/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp +++ b/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp @@ -30,7 +30,7 @@ standard_testfile mixed-lang-stack.c mixed-lang-stack.cpp mixed-lang-stack.f90 if {[prepare_for_testing_full "failed to prepare" \ [list ${binfile} {debug f90 additional_flags=-lstdc++} \ $srcfile {debug} \ - $srcfile2 {debug c++} \ + $srcfile2 {debug c++ additional_flags=-std=c++11} \ $srcfile3 {debug f90}]]} { return -1 } diff --git a/gdb/testsuite/gdb.linespec/cpcompletion.exp b/gdb/testsuite/gdb.linespec/cpcompletion.exp index f005707b9da..23bec063941 100644 --- a/gdb/testsuite/gdb.linespec/cpcompletion.exp +++ b/gdb/testsuite/gdb.linespec/cpcompletion.exp @@ -20,8 +20,12 @@ load_lib data-structures.exp standard_testfile cpls.cc cpls2.cc cpls-hyphen.cc +set opts {} +lappend opts debug +lappend opts additional_flags=-std=c++11 + if {[prepare_for_testing "failed to prepare" $testfile \ - [list $srcfile $srcfile2 $srcfile3] {debug}]} { + [list $srcfile $srcfile2 $srcfile3] $opts]} { return -1 } diff --git a/gdb/testsuite/gdb.mi/print-simple-values.exp b/gdb/testsuite/gdb.mi/print-simple-values.exp index 9436645df84..267cf369567 100644 --- a/gdb/testsuite/gdb.mi/print-simple-values.exp +++ b/gdb/testsuite/gdb.mi/print-simple-values.exp @@ -25,7 +25,12 @@ set MIFLAGS "-i=mi" standard_testfile .cc -if [build_executable "failed to prepare" $testfile $srcfile {debug c++}] { +set opts {} +lappend opts debug +lappend opts c++ +lappend opts additional_flags=-std=c++11 + +if [build_executable "failed to prepare" $testfile $srcfile $opts] { return -1 } -- 2.35.3