This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 5/6] list.exp: Remove "list line 1 with unlimited listsize" xfail.


So the previous patch actually made the whole old
"set listsize -1; list 1" test pass.

  XPASS: gdb.base/list.exp: list line 1 with unlimited listsize

This setup_xfail can be traced all the way back to GDB 4.10 (1993!),
which had:

    # Try listsize of 0 which suppresses printing.

    send "set listsize 0\n"
    expect {
        -re "set listsize 0\r\n$prompt $" {
            setup_xfail "*-*-*"
            send "show listsize\n"
            expect {
                -re "Number of source lines .* is 0.\r\n.*$prompt $" {
                    pass "listsize of 0 displays as 0"
                }
                -re "Number of source lines .* is unlimited.\r\n.*$prompt $" {
                    fail "listsize of 0 displays as unlimited"
                }
 	       ...
            }
        }
	...
    }

    # Try listsize of -1 which is special, and means unlimited.

    send "set listsize -1\n"
    expect {
        -re "set listsize -1\r\n$prompt $" {
...
            setup_xfail "*-*-*"
            send "list 1\n"
            expect {
                -re "1\[ \t\]+#include .*\r\n39\[ \t\]+\}\r\n$prompt $" {
                    pass "list line 1 with unlimited listsize"
                }
                -re "list 1\r\n$prompt $" {
                    fail "listsize of -1 (unlimited) suppresses output"
                }
                timeout {
                    fail "list line 1 with unlimited listsize"
                }
            }
        }


IOW, the test was written expecting -1 to mean unlimited, but GDB
didn't work that way back then, so the tests were xfailed.

GDB does now work as the tests expect, so we can finaly remove the
xfail.

gdb/testsuite/
2013-03-21  Pedro Alves  <palves@redhat.com>

	* gdb.base/list.exp (test_listsize): Don't xfail.
---
 gdb/testsuite/gdb.base/list.exp |    1 -
 1 file changed, 1 deletion(-)

diff --git a/gdb/testsuite/gdb.base/list.exp b/gdb/testsuite/gdb.base/list.exp
index 915b255..c907b96 100644
--- a/gdb/testsuite/gdb.base/list.exp
+++ b/gdb/testsuite/gdb.base/list.exp
@@ -144,7 +144,6 @@ proc test_listsize {} {
     # Try listsize of -1 which is special, and means unlimited.
 
     set_listsize -1
-    setup_xfail "*-*-*"
     gdb_test "list 1" "1\[ \t\]+#include .*\r\n${last_line_re}" "list line 1 with unlimited listsize"
 }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]