From patchwork Tue Apr 21 18:08:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 6355 Received: (qmail 93256 invoked by alias); 21 Apr 2015 18:08: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 93188 invoked by uid 89); 21 Apr 2015 18:08:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 21 Apr 2015 18:08:44 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t3LI8gTU017266 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 21 Apr 2015 14:08:43 -0400 Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3LI8WKw028722 for ; Tue, 21 Apr 2015 14:08:42 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 09/24] Make gdb.base/call-strs.exp use gdb_test_stdio Date: Tue, 21 Apr 2015 19:08:16 +0100 Message-Id: <1429639711-16459-10-git-send-email-palves@redhat.com> In-Reply-To: <1429639711-16459-1-git-send-email-palves@redhat.com> References: <1429639711-16459-1-git-send-email-palves@redhat.com> gdb/testsuite/ChangeLog: 2015-04-21 Pedro Alves * gdb.base/call-strs.exp: Use gdb_test_stdio instead of gdb_test. --- gdb/testsuite/gdb.base/call-strs.exp | 50 +++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/gdb/testsuite/gdb.base/call-strs.exp b/gdb/testsuite/gdb.base/call-strs.exp index 5aab943..e11296f 100644 --- a/gdb/testsuite/gdb.base/call-strs.exp +++ b/gdb/testsuite/gdb.base/call-strs.exp @@ -77,62 +77,72 @@ gdb_test "print s" \ #print str_func1(s) if ![gdb_skip_stdio_test "print str_func1(s)"] { - gdb_test "print str_func1(s)" \ - "first string arg is: test string.*\"test string\".*" + gdb_test_stdio "print str_func1(s)" \ + "first string arg is: test string" \ + "\"test string\".*" } #print str_func1("test string") if ![gdb_skip_stdio_test "print str_func1(teststring)"] { - gdb_test "print str_func1(\"test string\")" \ - "first string arg is: test string.*\"test string\".*" + gdb_test_stdio "print str_func1(\"test string\")" \ + "first string arg is: test string" \ + "\"test string\".*" } #call str_func1(s) if ![gdb_skip_stdio_test "call str_func1(s)"] { - gdb_test "call str_func1(s)" \ - "first string arg is: test string.*\"test string\".*" + gdb_test_stdio "call str_func1(s)" \ + "first string arg is: test string" \ + "\"test string\".*" } #call str_func1("test string") if ![gdb_skip_stdio_test "call str_func1 (...)"] { - gdb_test "call str_func1(\"test string\")" \ - "first string arg is: test string.*\"test string\".*" + gdb_test_stdio "call str_func1(\"test string\")" \ + "first string arg is: test string" \ + "\"test string\".*" } #print str_func1(buf) if ![gdb_skip_stdio_test "print str_func1(buf)"] { - gdb_test "print str_func1(buf)" \ - "first string arg is: test string.*\"test string\".*" + gdb_test_stdio "print str_func1(buf)" \ + "first string arg is: test string" \ + "\"test string\".*" } #call str_func1(buf) if ![gdb_skip_stdio_test "call str_func1(buf)"] { - gdb_test "call str_func1(buf)" \ - "first string arg is: test string.*\"test string\".*" + gdb_test_stdio "call str_func1(buf)" \ + "first string arg is: test string" \ + "\"test string\".*" } #print str_func("a","b","c","d","e","f","g") if ![gdb_skip_stdio_test "print str_func(a,b,c,d,e,f,g)"] { - gdb_test "print str_func(\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\")" \ - "first string arg is: a\[ \t\r\n\]+second string arg is: b\[ \t\r\n\]+third string arg is: c\[ \t\r\n\]+fourth string arg is: d\[ \t\r\n\]+fifth string arg is: e\[ \t\r\n\]+sixth string arg is: f\[ \t\r\n\]+seventh string arg is: g\[ \t\r\n\]+.*= \"abcdefg\".*" + gdb_test_stdio "print str_func(\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\")" \ + "first string arg is: a\[ \t\r\n\]+second string arg is: b\[ \t\r\n\]+third string arg is: c\[ \t\r\n\]+fourth string arg is: d\[ \t\r\n\]+fifth string arg is: e\[ \t\r\n\]+sixth string arg is: f\[ \t\r\n\]+seventh string arg is: g\[ \t\r\n\]+" \ + "= \"abcdefg\".*" } #call str_func("a","b","c","d","e","f","g") if ![gdb_skip_stdio_test "call str_func(a,b,c,d,e,f,g)"] { - gdb_test "call str_func(\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\")" \ - "first string arg is: a\[ \t\r\n\]+second string arg is: b\[ \t\r\n\]+third string arg is: c\[ \t\r\n\]+fourth string arg is: d\[ \t\r\n\]+fifth string arg is: e\[ \t\r\n\]+sixth string arg is: f\[ \t\r\n\]+seventh string arg is: g\[ \t\r\n\]+.*= \"abcdefg\".*" + gdb_test_stdio "call str_func(\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\")" \ + "first string arg is: a\[ \t\r\n\]+second string arg is: b\[ \t\r\n\]+third string arg is: c\[ \t\r\n\]+fourth string arg is: d\[ \t\r\n\]+fifth string arg is: e\[ \t\r\n\]+sixth string arg is: f\[ \t\r\n\]+seventh string arg is: g\[ \t\r\n\]+" \ + "= \"abcdefg\".*" } #print str_func(s,s,s,s,s,s,s) if ![gdb_skip_stdio_test "print str_func(s,s,s,s,s,s,s,s)"] { - gdb_test "print str_func(s,s,s,s,s,s,s)" \ - "first string arg is: test string\[ \t\r\n\]+second string arg is: test string\[ \t\r\n\]+third string arg is: test string\[ \t\r\n\]+fourth string arg is: test string\[ \t\r\n\]+fifth string arg is: test string\[ \t\r\n\]+sixth string arg is: test string\[ \t\r\n\]+seventh string arg is: test string\[ \t\r\n\]+.*\"test stringtest stringtest stringtest stringtest stringtest stringtest string\".*" + gdb_test_stdio "print str_func(s,s,s,s,s,s,s)" \ + "first string arg is: test string\[ \t\r\n\]+second string arg is: test string\[ \t\r\n\]+third string arg is: test string\[ \t\r\n\]+fourth string arg is: test string\[ \t\r\n\]+fifth string arg is: test string\[ \t\r\n\]+sixth string arg is: test string\[ \t\r\n\]+seventh string arg is: test string\[ \t\r\n\]+" \ + "\"test stringtest stringtest stringtest stringtest stringtest stringtest string\".*" } #call str_func(s,s,s,s,s,s,s) if ![gdb_skip_stdio_test "call str_func(s,s,s,s,s,s,s,s)"] { - gdb_test "call str_func(s,s,s,s,s,s,s)" \ - "first string arg is: test string\[ \t\r\n\]+second string arg is: test string\[ \t\r\n\]+third string arg is: test string\[ \t\r\n\]+fourth string arg is: test string\[ \t\r\n\]+fifth string arg is: test string\[ \t\r\n\]+sixth string arg is: test string\[ \t\r\n\]+seventh string arg is: test string\[ \t\r\n\]+.*\"test stringtest stringtest stringtest stringtest stringtest stringtest string\".*" + gdb_test_stdio "call str_func(s,s,s,s,s,s,s)" \ + "first string arg is: test string\[ \t\r\n\]+second string arg is: test string\[ \t\r\n\]+third string arg is: test string\[ \t\r\n\]+fourth string arg is: test string\[ \t\r\n\]+fifth string arg is: test string\[ \t\r\n\]+sixth string arg is: test string\[ \t\r\n\]+seventh string arg is: test string\[ \t\r\n\]+" \ + "\"test stringtest stringtest stringtest stringtest stringtest stringtest string\".*" } gdb_exit