[PATCH][gdb/testsuite] Rewrite catch-follow-exec.exp

Tom de Vries tdevries@suse.de
Tue Oct 16 17:07:00 GMT 2018


On 10/16/18 12:11 AM, Simon Marchi wrote:
> On 2018-10-11 03:47, Tom de Vries wrote:
>> [gdb/testsuite] Rewrite catch-follow-exec.exp
> My build of GDB (and probably some on the buildbot too?) uses
> -fsanitize=address, and on it the test does not pass.  On a build
> without -fsanitize=address, it does pass.  The failing test is:
> 
> FAIL: gdb.base/catch-follow-exec.exp: [lindex $result 3] == 1
> 
> and the value of $result is "17872 exp10 0 23".  This is because ASan
> exits with 23 if it detects leaks.

I had trouble reproducing this, until I tried -fsanitize=leak.

> If there's a way to set
> LSAN_OPTIONS='exitcode=1' in the environment GDB runs in, it would
> probably make it work...
> 

I've fixed this by changing the test from == 1 to != 0.

>> +if { [target_info gdb_protocol] != "" } {
>> +    unsupported "not native"
> 
> Please add a comment here, something like:
>> # Even though the feature under features being tested are supported by
> gdbserver,
> # the way this test is written doesn't make it easy with a remote target.
> 

Done.

>> +    gdb_test_multiple "" "run til exit" {
>> +    "runtime error:" {
>> +        # Error in case of --enable-ubsan
>> +        fail "No runtime error"
>> +    }
> 
> Please use a lower case letter for the test name.
> 

Done.

OK for trunk?

Thanks,
- Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-gdb-testsuite-Rewrite-catch-follow-exec.exp.patch
Type: text/x-patch
Size: 4014 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20181016/3190c602/attachment.bin>


More information about the Gdb-patches mailing list