From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27484 invoked by alias); 26 Oct 2009 08:36:52 -0000 Received: (qmail 27475 invoked by uid 22791); 26 Oct 2009 08:36:51 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-pz0-f192.google.com (HELO mail-pz0-f192.google.com) (209.85.222.192) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 26 Oct 2009 08:36:44 +0000 Received: by pzk30 with SMTP id 30so7802400pzk.24 for ; Mon, 26 Oct 2009 01:36:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.143.21.33 with SMTP id y33mr1045107wfi.174.1256546203126; Mon, 26 Oct 2009 01:36:43 -0700 (PDT) In-Reply-To: <4AE0B4BD.5050408@vmware.com> References: <4ADD0105.6080000@vmware.com> <4AE0B4BD.5050408@vmware.com> From: Hui Zhu Date: Mon, 26 Oct 2009 08:36:00 -0000 Message-ID: Subject: Re: [RFC] testing specifically for process record To: Michael Snyder Cc: "gdb-patches@sourceware.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2009-10/txt/msg00641.txt.bz2 Thanks for your test, Michael. I try it in i386 ubuntu. =3D=3D=3D gdb tests =3D=3D=3D Schedule of variations: precord Running target precord Using /usr/share/dejagnu/baseboards/precord.exp as board description file for target. Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for targ= et. Using ../src/gdb/testsuite/config/unix.exp as tool-and-target-specific interface file. Running ../src/gdb/testsuite/gdb.reverse/precord.exp ... =3D=3D=3D gdb Summary =3D=3D=3D # of expected passes 30 /usr/local/bin/gdb version 7.0.50.20091026-cvs -nw -nx I am OK with it. Thanks, hui On Fri, Oct 23, 2009 at 03:38, Michael Snyder wrote: > Michael Snyder wrote: >> >> There are a number of commands specific to process record, >> as opposed to reverse debugging, which we don't have tests >> for yet. =A0For instance, >> >> =A0set/show insn-number-max >> =A0set/show stop-at-limit >> =A0info record >> =A0record delete >> =A0record stop >> >> Plus, there is the behavior of the execution log that should >> be tested under various combinations of those settings. >> >> Here is an attempt that I've started on. =A0I'd appreciate any >> suggestions, especially with respect to other tests that you >> think should be added. =A0The more things we test, the more >> corner cases we can find and fix. =A0(there are a couple of >> failures already in there due to corner cases and spellings). >> >> And Hui -- I'd be delighted if you would take over the >> ownership of this test! =A0 ;-) > > Updated versions. > > > > # Copyright 2009 Free Software Foundation, Inc. > > # This program is free software; you can redistribute it and/or modify > # it under the terms of the GNU General Public License as published by > # the Free Software Foundation; either version 3 of the License, or > # (at your option) any later version. > # > # This program is distributed in the hope that it will be useful, > # but WITHOUT ANY WARRANTY; without even the implied warranty of > # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. =A0See the > # GNU General Public License for more details. > # > # You should have received a copy of the GNU General Public License > # along with this program. =A0If not, see .= =A0*/ > > # This file is part of the GDB testsuite. > > # Test precord commands. > > set testfile "precord" > set srcfile =A0${testfile}.c > > if { [prepare_for_testing $testfile.exp $testfile $srcfile] } { > =A0 =A0return -1 > } > > # > # Test "show record insn-number-max" > # > > gdb_test "show record insn-number-max" \ > =A0 =A0"Record/replay buffer limit is .*" "Show record insn-number-max" > > gdb_test "set record insn-number-max 0" \ > =A0 =A0"" "Set insn-number-max to unlimited" > > gdb_test "show record insn-number-max" \ > =A0 =A0"Record/replay buffer limit is unlimited\." \ > =A0 =A0"Show insn-number-max unlimited" > > gdb_test "set record insn-number-max 100000" \ > =A0 =A0"" "Set insn-number-max to 100000" > > gdb_test "show record insn-number-max" \ > =A0 =A0"Record/replay buffer limit is 100000\." "Show insn-number-max 100= 000" > > # > # Test "show record stop-at-limit" > # > > gdb_test "show record stop-at-limit" \ > =A0 =A0"Whether record/replay stops when record/replay buffer becomes ful= l is.*" > \ > =A0 =A0"Show record stop-at-limit" > > > set main_location [gdb_get_line_number "break in main"] > > runto main > > gdb_test "record" "" "Turn on process record" > # FIXME: command ought to acknowledge, so we can test if it succeeded. > > # > # Test "Do you want to auto delete previous execution log entries" > # > > gdb_test "continue" "" "Continue until buffer full" \ > =A0 =A0"Do you want to auto delete .* or n. " \ > =A0 =A0"n" > > gdb_test "info record" "Log contains 100000 instructions.*" \ > =A0 =A0"verify buffer is full" > > gdb_test "set record insn-number-max 200000" \ > =A0 =A0"" "increase insn-number-max to 200000" > > gdb_test "continue" "" "Continue until buffer full again" \ > =A0 =A0"Do you want to auto delete .* or n. " \ > =A0 =A0"n" > > gdb_test "info record" "Log contains 200000 instructions.*" \ > =A0 =A0"verify buffer full again" > > gdb_test "set record insn-number-max 100000" \ > =A0 =A0"" \ > =A0 =A0"decrease insn-number-max to 100000" > > gdb_test "set record stop-at-limit off" "" "set stop-at-limit off" > > gdb_test "info record" "Log contains 100000 instructions.*" \ > =A0 =A0"info record before stepi" > > gdb_test "stepi" > > gdb_test "info record" "Log contains 100000 instructions.*" \ > =A0 =A0"info record after stepi" > > gdb_test "set record insn-number-max 200000" \ > =A0 =A0"" "Increase insn-number-max again" > > gdb_test "reverse-continue" "No more reverse-execution history.*" \ > =A0 =A0"reverse-continue to start of log" > > gdb_test "info record" "Current instruction number is 0\..*" \ > =A0 =A0"verify back at beginning of log" > > gdb_test "continue" "No more reverse-execution history.*" \ > =A0 =A0"continue to end of log" > > gdb_test "info record" \ > =A0 =A0"Lowest recorded .*\[\r\n\]+Highest recorded .* 200000\..*" \ > =A0 =A0"info record at end of log" > > gdb_test "stepi" "" "stepi past end of log in record mode" > > gdb_test "info record" \ > =A0 =A0"Lowest recorded .*\[\r\n\]+Highest recorded .* 200002\..*" \ > =A0 =A0"info record past end of log" > > gdb_test "reverse-stepi 50000" "" "Back up 50000 instructions" > > gdb_test "info record" \ > =A0 =A0"Current instruction number is 150002\..*" \ > =A0 =A0"info record in middle of execution log" > > gdb_test "record delete" "" "record delete test" \ > =A0 =A0"Delete the log from this point forward .*..y or n. " "yes" > > gdb_test "info record" \ > =A0 =A0"Highest recorded .* is 150002.*Log contains 50001 instructions.*"= \ > =A0 =A0"info record after delete" > > gdb_test "record stop" \ > =A0 =A0"Process record is stopped and all execution logs are deleted." \ > =A0 =A0"record stop" > > gdb_test "info record" \ > =A0 =A0"target record is not active.*" \ > =A0 =A0"info record after stop" > > gdb_test "frame" "" "" > > > > >