]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/testsuite] Test more values in gdb.base/parse_numbers.exp
authorTom de Vries <tdevries@suse.de>
Sat, 4 Jun 2022 11:17:32 +0000 (13:17 +0200)
committerTom de Vries <tdevries@suse.de>
Sat, 4 Jun 2022 11:17:32 +0000 (13:17 +0200)
commit1b4633f812b329863a523c4d798c2b55417b5144
treecc8deec30d5018f3594d713857ca15155cea3373
parent0c05610450e5f19f03245ac646587e35cab53e7b
[gdb/testsuite] Test more values in gdb.base/parse_numbers.exp

Currently we only test value 0xffffffffffffffff in test-case
gdb.base/parse_numbers.exp.

Test more interesting values, both in decimal and hex format, as well as
negative decimals for language modula-2.

This results in an increase in total tests from 15572 to 847448 (55 times
more tests).

Balance out the increase in runtime by reducing the number of architectures
tested: only test one architecture per sizeof longlong/long/int/short
combination, while keeping the possibility intact to run with all
architectures (through setting a variable in the test-case)

Results in slight reduction of total tests: 15572 -> 13853.

Document interesting cases in the expected results:
- wrapping from unsigned to signed
- truncation
- PR16377: using unsigned types to represent decimal constants in C

Running the test-case with a gdb build with -fsanitize=undefined, we trigger
two UB errors in the modula-2 parser, filed as PR29163.

Tested on x86_64-linux with --enable-targets=all.
gdb/testsuite/gdb.base/parse_number.exp