From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16343 invoked by alias); 22 Feb 2011 16:43:17 -0000 Received: (qmail 16258 invoked by uid 22791); 22 Feb 2011 16:43:15 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 Feb 2011 16:43:09 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 478A42BAB39; Tue, 22 Feb 2011 11:43:07 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id de0rJc2RYZFS; Tue, 22 Feb 2011 11:43:07 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id C10372BAABB; Tue, 22 Feb 2011 11:43:06 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 2D8501459B0; Tue, 22 Feb 2011 20:42:59 +0400 (RET) From: Joel Brobecker To: gdb-patches@sourceware.org Cc: Joel Brobecker Subject: [commit/testsuite] small py-breakpoint.exp cleanups Date: Tue, 22 Feb 2011 16:43:00 -0000 Message-Id: <1298392978-29062-1-git-send-email-brobecker@adacore.com> 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: 2011-02/txt/msg00596.txt.bz2 I looked a bit at this testcase, and notice a few things that were easy to fix: - prepare_for_testing already does a clean_restart, so calling prepare_for_testing just after it was useless. Removed. - We have a "print result" test whose expected output was "545". I thought that we could make it safer by integrating the equal sign in the expected output: " = 545". - Just a tiny typo in one of the comments. I also noticed that the test comments are not unique, which is not a huge issue, but it does make it harder to analyze the results. But there are so many tests, and I didn't have the time today to take care of that. gdb/testsuite/ChangeLog: * gdb.python/py-breakpoint.exp: Remove unnecessary call to clean_restart. Be a little stricter in the expected output for one of the tests. Fix a typo in one of the comments. Tested on x86_64-linux, checked in. --- gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/gdb.python/py-breakpoint.exp | 7 ++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 46225c0..5d524d4 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2011-02-22 Joel Brobecker + * gdb.python/py-breakpoint.exp: Remove unnecessary call to + clean_restart. Be a little stricter in the expected output + for one of the tests. Fix a typo in one of the comments. + +2011-02-22 Joel Brobecker + * gdb.python/py-block.exp: Simplify using prepare_for_testing. Delete variable binfile, no longer use. Add or modify test comments to make them unique. diff --git a/gdb/testsuite/gdb.python/py-breakpoint.exp b/gdb/testsuite/gdb.python/py-breakpoint.exp index 6b33284..b9f8c4a 100644 --- a/gdb/testsuite/gdb.python/py-breakpoint.exp +++ b/gdb/testsuite/gdb.python/py-breakpoint.exp @@ -28,9 +28,6 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } { return -1 } -# Start with a fresh gdb. -clean_restart ${testfile} - # Skip all tests if Python scripting is not enabled. if { [skip_python_tests] } { continue } @@ -64,7 +61,7 @@ gdb_test "python print blist\[1\].hit_count" "1" "Check breakpoint hit count" gdb_py_test_silent_cmd "python blist\[1\].ignore_count = 4" "Set breakpoint hit count" 0 gdb_continue_to_breakpoint "Break at multiply." gdb_test "python print blist\[1\].hit_count" "6" "Check breakpoint hit count" -gdb_test "print result" "545" "Check expected variable result after 6 iterations" +gdb_test "print result" " = 545" "Check expected variable result after 6 iterations" # Test breakpoint is enabled and disabled correctly.. gdb_breakpoint [gdb_get_line_number "Break at add."] @@ -148,7 +145,7 @@ if ![runto_main] then { return 0 } -# Test invisible breakpooints. +# Test invisible breakpoints. delete_breakpoints set ibp_location [gdb_get_line_number "Break at multiply."] gdb_py_test_silent_cmd "python ibp = gdb.Breakpoint(\"$ibp_location\", internal=False)" "Set invisible breakpoint" 0 -- 1.7.1