From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14326 invoked by alias); 5 Nov 2002 22:54:29 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 14059 invoked from network); 5 Nov 2002 22:54:27 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 5 Nov 2002 22:54:27 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 7258E3EFB; Tue, 5 Nov 2002 17:54:27 -0500 (EST) Message-ID: <3DC84C23.8070801@redhat.com> Date: Tue, 05 Nov 2002 14:54:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020824 X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Carlton Cc: gdb-patches@sources.redhat.com, Fernando Nasser , cagney Subject: Re: [rfa/testsuite] Don't display values in output of pc-fp.exp References: Content-Type: multipart/mixed; boundary="------------000500050803060308070807" X-SW-Source: 2002-11/txt/msg00073.txt.bz2 This is a multi-part message in MIME format. --------------000500050803060308070807 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1317 > The tests in pc-fp.exp display the actual values of $pc and $fp in > their PASS messages. That makes regression testing a bit more > annoying for me: the value of $fp changes with every change I make to > GDB. Is it okay to tweak the PASS messages not to display those > values? As far as I know, anything in trailing paren should be ignored when comparing test results. You might want to tweak your script (I've attached mine) to do this. Also, why is FP/PC changing? Your GDB changes shouldn't affect the behavior of the target program's $fp / $pc. Andrew > 2002-11-05 David Carlton > > * gdb.base/pc-fp.exp (get_valueofx): Don't display 'val' in PASS > message. > > Index: pc-fp.exp > =================================================================== > RCS file: /cvs/src/src/gdb/testsuite/gdb.base/pc-fp.exp,v > retrieving revision 1.1 > diff -u -p -r1.1 pc-fp.exp > --- pc-fp.exp 25 Sep 2002 20:30:38 -0000 1.1 > +++ pc-fp.exp 5 Nov 2002 22:09:51 -0000 > @@ -62,7 +62,7 @@ proc get_valueofx { fmt exp default } { > gdb_expect { > -re "\\$\[0-9\]* = (0x\[0-9a-zA-Z\]+).*$gdb_prompt $" { > set val $expect_out(1,string) > - pass "get value of ${exp} ($val)" > + pass "get value of ${exp}" > } > timeout { > set size ${default} > --------------000500050803060308070807 Content-Type: text/plain; name="do-analize-tests" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="do-analize-tests" Content-length: 6388 #!/bin/sh if awk --version < /dev/null 2>&1 | grep -i gnu > /dev/null then AWK=awk else AWK=gawk fi $AWK ' function trace (msg) { print msg >> "/dev/stderr" } # returns a SUPSEP separated list created by sorting TABLE. function qsort (table, middle, tmp, left, nr_left, right, nr_right, result) { middle = "" for (middle in table) { break; } nr_left = 0; nr_right = 0; for (tmp in table) { if (tmp < middle) { nr_left++ left[tmp] = tmp } else if (tmp > middle) { nr_right++ right[tmp] = tmp } } #print "qsort " nr_left " " middle " " nr_right > "/dev/stderr" result = "" if (nr_left > 0) { result = qsort(left) SUBSEP } result = result middle if (nr_right > 0) { result = result SUBSEP qsort(right) } return result } function print_headings (html_p, file, title, target, i) { if (html_p) { printf "" >> file } printf title >> file if (html_p) { printf "" >> file } for (i = 1; i <= nr_targets; i++) { target = sorted_targets[i] if (html_p) { printf "" i "
" target "" >> file } else { printf "\t" i >> file } } if (html_p) { printf "" >> file } printf "\n" >> file } function print_test (file, test, nr, i) { printf "" >> file printf "%d", nr >> file printf "%s", test >> file for (i = 1; i <= nr_targets; i++) { target = sorted_targets[i]; result = results[target, test] if (result == "FAIL") { printf "%s", result >> file } else { printf "%s", result >> file } } printf "\n" >> file } function print_totals (html_p, file, status, target, i, j) { for (i = 1; i <= nr_statuses; i++) { status = sorted_statuses[i]; if (html_p) { printf "" >> file } printf status >> file if (html_p) { printf "" >> file } for (j = 1; j <= nr_targets; j++) { target = sorted_targets[j]; if (html_p) { printf "" >> file } else { printf "\t" } printf totals[target, status] >> file if (html_p) { printf "" >> file } } if (html_p) { printf "" >> file } printf "\n" >> file } } function print_table_start (file, title, full_title, i, target) { full_title = "Failure Table: " title; trace("Generating " file " (" full_title ")") print "" >> file print "" >> file print "" full_title "" >> file print "" >> file print "" >> file print "

" full_title "

" >> file print "
" >> file print "" >> file for (i = 1; i <= nr_targets; i++) { target = sorted_targets[i] print "" >> file print "" >> file print "" >> file print "" >> file print "" >> file } print "
" i "" target "" target_file[target] "
" >> file print "
" >> file print "" >> file } function print_table_end (file) { print "
" >> file print "" >> file print "" >> file } function print_opening (file, title) { printf "" > file print_table_start(file, title); print_headings(1, file, title); print_totals(1, file); } function print_closing (file, title, nr) { trace(title ": " nr); print_totals(1, file); print_headings(1, file, title); print_table_end(file); } BEGIN { nr_runs = 0 } /Running target/ { nr_runs++ sub (/Running target/, ""); gsub (/ /, ""); gsub (/\//, " "); nr = 1; do { target = $0 " (" nr++ ")"; } while (target in targets) targets[target] = target target_file[target] = FILENAME trace("Parsing " nr_runs ": " target " " (target_file[target])); next } # Collect up sizeof??? # Collect the results /^PASS:/ || /^FAIL:/ || /^XFAIL:/ || /^XPASS:/ { # accumulate statuses status = $0 sub (/:.*$/, "", status) statuses[status] = status # accumulate tests test = $0 sub (/^[A-Z]*: /, "", test) gsub (/ *\([^)]*\)/, "", test) tests[test] = test # accumulate result counts totals[target, status] += 1; results[target, test] = status; totals[test, status] += 1; } END { # sort the test names trace("Sorting results") nr_tests = split (qsort(tests), sorted_tests, SUBSEP); trace("Number of tests " nr_tests) # for (i = 0; i < nr_tests; i++) { # print i " " sorted_tests[i] > "/dev/stderr" # } nr_targets = split (qsort(targets), sorted_targets, SUBSEP); nr_statuses = split (qsort(statuses), sorted_statuses, SUBSEP); print_headings(0, "/dev/stderr", "Summary") print_totals(0, "/dev/stderr") for (i = 1; i <= nr_targets; i++) { target = sorted_targets[i] printf "%3d %s %s\n", i, target, target_file[target] >> "/dev/stderr" } #### # heading file = "diff.html" print_opening(file, "Differences"); # body - differences nr = 0 for (i = 1; i <= nr_tests; i++) { test = sorted_tests[i]; different = 0; fail = 0; result = ""; for (target in targets) { if (result == "") { result = results[target, test]; } else if (result != results[target, test]) { different = 1 } if (results[target, test] == "FAIL") { fail = 1; } # print "TEST=" test, "different=" different, "fail=" fail, "result=" result > "/dev/stderr" } if (different) { print_test(file, test, ++nr); } } print_closing(file, "Differences", nr); #### file = "fail.html" print_opening(file, "Failures"); # body - failures nr = 0 for (i = 1; i <= nr_tests; i++) { test = sorted_tests[i] if (totals[test, "FAIL"] > 0) { print_test(file, test, ++nr); } } print_closing(file, "Failures", nr); #### file = "pass.html" print_opening(file, "Passes"); # body - passes nr = 0 for (i = 1; i <= nr_tests; i++) { test = sorted_tests[i] if (totals[test, "PASS"] > 0) { print_test(file, test, ++nr); } } print_closing(file, "Passes", nr); } ' "$@" --------------000500050803060308070807--