From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7692 invoked by alias); 19 May 2010 18:23:22 -0000 Received: (qmail 7674 invoked by uid 22791); 19 May 2010 18:23:20 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 19 May 2010 18:23:13 +0000 Received: from mailhost4.vmware.com (mailhost4.vmware.com [10.16.67.124]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 051BB34009 for ; Wed, 19 May 2010 11:23:10 -0700 (PDT) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost4.vmware.com (Postfix) with ESMTP id 86AB2C9D20 for ; Wed, 19 May 2010 11:23:09 -0700 (PDT) Message-ID: <4BF42C8D.2070002@vmware.com> Date: Wed, 19 May 2010 18:56:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.22 (X11/20090609) MIME-Version: 1.0 To: "gdb-patches@sourceware.org" Subject: [RFA] gdb.base/whatis-exp.exp: replace send_gdb with gdb_test Content-Type: multipart/mixed; boundary="------------090402030903020503040406" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-05/txt/msg00392.txt.bz2 This is a multi-part message in MIME format. --------------090402030903020503040406 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 78 Some clean-up by replacing old-style "send_gdb / gdb_expect" with gdb_test. --------------090402030903020503040406 Content-Type: text/plain; name="whatis-exp.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="whatis-exp.txt" Content-length: 5498 2010-05-19 Michael Snyder * gdb.base/whatis.exp: Replace send_gdb with gdb_test. Index: gdb.base/whatis-exp.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/whatis-exp.exp,v retrieving revision 1.13 diff -u -p -r1.13 whatis-exp.exp --- gdb.base/whatis-exp.exp 5 May 2010 18:06:58 -0000 1.13 +++ gdb.base/whatis-exp.exp 19 May 2010 18:20:55 -0000 @@ -51,151 +51,27 @@ if ![runto_main] then { # gdb_test "set variable x=14" "" "set variable x=14" -gdb_test "set variable y=2" "" "set variable y=2" -gdb_test "set variable z=2" "" "set variable z=2" -gdb_test "set variable w=3" "" "set variable w=3" - -send_gdb "print x\n" -gdb_expect { - -re ".*14.*$gdb_prompt $" { - pass "print value of x" - } - -re ".*$gdb_prompt $" { fail "print value of x" } - timeout { fail "(timeout) print value of x" } - } - - -send_gdb "print y\n" -gdb_expect { - -re ".*2.*$gdb_prompt $" { - pass "print value of y" - } - -re ".*$gdb_prompt $" { fail "print value of y" } - timeout { fail "(timeout) print value of y" } - } - -send_gdb "print z\n" -gdb_expect { - -re ".*2.*$gdb_prompt $" { - pass "print value of z" - } - -re ".*$gdb_prompt $" { fail "print value of z" } - timeout { fail "(timeout) print value of z" } - } - -send_gdb "print w\n" -gdb_expect { - -re ".*3.*$gdb_prompt $" { - pass "print value of w" - } - -re ".*$gdb_prompt $" { fail "print value of w" } - timeout { fail "(timeout) print value of w" } - } - - - -send_gdb "whatis x+y\n" -gdb_expect { - -re ".*type = int.*$gdb_prompt $" { - pass "whatis value of x+y" - } - -re ".*$gdb_prompt $" { fail "whatis value of x+y" } - timeout { fail "(timeout) whatis value of x+y" } - } - -send_gdb "whatis x-y\n" -gdb_expect { - -re ".*type = int.*$gdb_prompt $" { - pass "whatis value of x-y" - } - -re ".*$gdb_prompt $" { fail "whatis value of x-y" } - timeout { fail "(timeout) whatis value of x-y" } - } - -send_gdb "whatis x*y\n" -gdb_expect { - -re ".*type = int.*$gdb_prompt $" { - pass "whatis value of x*y" - } - -re ".*$gdb_prompt $" { fail "whatis value of x*y" } - timeout { fail "(timeout) whatis value of x*y" } - } - -send_gdb "whatis x/y\n" -gdb_expect { - -re ".*type = int.*$gdb_prompt $" { - pass "whatis value of x/y" - } - -re ".*$gdb_prompt $" { fail "whatis value of x/y" } - timeout { fail "(timeout) whatis value of x/y" } - } - -send_gdb "whatis x%y\n" -gdb_expect { - -re ".*type = int.*$gdb_prompt $" { - pass "whatis value of x%y" - } - -re ".*$gdb_prompt $" { fail "whatis value of x%y" } - timeout { fail "(timeout) whatis value of x%y" } - } - - - -send_gdb "whatis x=y\n" -gdb_expect { - -re ".*type = int.*$gdb_prompt $" { - pass "whatis value of x=y" - } - -re ".*$gdb_prompt $" { fail "whatis value of x=y" } - timeout { fail "(timeout) whatis value of x=y" } - } - - -send_gdb "whatis x+=2\n" -gdb_expect { - -re ".*type = int.*$gdb_prompt $" { - pass "whatis value of x+=2" - } - -re ".*$gdb_prompt $" { fail "whatis value of x+=2" } - timeout { fail "(timeout) whatis value of x+=2" } - } - - -send_gdb "whatis ++x\n" -gdb_expect { - -re ".*type = int.*$gdb_prompt $" { - pass "whatis value of ++x" - } - -re ".*$gdb_prompt $" { fail "whatis value of ++x" } - timeout { fail "(timeout) whatis value of ++x" } - } - -send_gdb "whatis --x\n" -gdb_expect { - -re ".*type = int.*$gdb_prompt $" { - pass "whatis value of --x" - } - -re ".*$gdb_prompt $" { fail "whatis value of --x" } - timeout { fail "(timeout) whatis value of --x" } - } - -send_gdb "whatis x++\n" -gdb_expect { - -re ".*type = int.*$gdb_prompt $" { - pass "whatis value of x++" - } - -re ".*$gdb_prompt $" { fail "whatis value of x++" } - timeout { fail "(timeout) whatis value of x++" } - } - -send_gdb "whatis x--\n" -gdb_expect { - -re ".*type = int.*$gdb_prompt $" { - pass "whatis value of x--" - } - -re ".*$gdb_prompt $" { fail "whatis value of x--" } - timeout { fail "(timeout) whatis value of x--" } - } +gdb_test "set variable y=2" "" "set variable y=2" +gdb_test "set variable z=2" "" "set variable z=2" +gdb_test "set variable w=3" "" "set variable w=3" + +gdb_test "print x" " = 14" "print value of x" +gdb_test "print y" " = 2" "print value of y" +gdb_test "print z" " = 2" "print value of z" +gdb_test "print w" " = 3" "print value of w" + +gdb_test "whatis x+y" "type = int" "whatis value of x+y" +gdb_test "whatis x-y" "type = int" "whatis value of x-y" +gdb_test "whatis x*y" "type = int" "whatis value of x*y" +gdb_test "whatis x/y" "type = int" "whatis value of x/y" +gdb_test "whatis x%y" "type = int" "whatis value of x%y" +gdb_test "whatis x=y" "type = int" "whatis value of x=y" + +gdb_test "whatis x+=2" "type = int" "whatis value of x+=2" +gdb_test "whatis ++x" "type = int" "whatis value of ++x" +gdb_test "whatis --x" "type = int" "whatis value of --x" +gdb_test "whatis x++" "type = int" "whatis value of x++" +gdb_test "whatis x--" "type = int" "whatis value of x--" gdb_exit return 0 --------------090402030903020503040406--