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]

Re: [PATCH 1/1] Fix internal warning when "gdb -p xxx" (test)


On 03/19/2014 04:03 AM, Hui Zhu wrote:

> +    eval "spawn $GDB $INTERNAL_GDBFLAGS $GDBFLAGS --pid=$testpid"
> +    expect {
> +	-re "Reading symbols from.*$gdb_prompt $" {
> +            pass "starting with --pid=$testpid"

Don't add the $testpid to the PASS/FAIL line, as it'll change between
testsuite runs, making gdb.sum diffs harder.

> +	}
> +	timeout 	{ fail "(timeout) starting with --pid=$testpid" }

Instead of repeating the text, write:

    set test "starting with --pid"
    expect {
	-re "Reading symbols from.*$gdb_prompt $" {
            pass "$test"
	}
	timeout {
            fail "$test (timeout)"
	}
    }

Otherwise OK.

Thanks!

-- 
Pedro Alves


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