[PATCH 1/2] gdb: testsuite: fix failed testcases in gdb.base/charset.exp
Simon Marchi
simon.marchi@polymtl.ca
Wed Jan 12 04:28:17 GMT 2022
On 2022-01-09 22:23, Tiezhu Yang wrote:
>
>
> On 1/10/22 10:42, Simon Marchi wrote:
>>
>>
>> On 2021-12-24 23:03, Tiezhu Yang wrote:
>>> In gdb/testsuite/gdb.base/charset.c, the last argument is greater than 127
>>> when call fill_run() in EBCDIC-US and IBM1047, but the type of string[] is
>>> char, this will change the value due to sign extension.
>>>
>>> For example, ebcdic_us_string[7] will be -63 instead of the original 193 in
>>> EBCDIC-US.
>>>
>>> Make the type of string[] as unsigned char to fix the following six failed
>>> testcases:
>>>
>>> $ grep FAIL gdb/testsuite/gdb.sum
>>> FAIL: gdb.base/charset.exp: check value of parsed character literal in EBCDIC-US
>>> FAIL: gdb.base/charset.exp: check value of parsed string literal in EBCDIC-US
>>> FAIL: gdb.base/charset.exp: check value of escape that doesn't exist in EBCDIC-US
>>> FAIL: gdb.base/charset.exp: check value of parsed character literal in IBM1047
>>> FAIL: gdb.base/charset.exp: check value of parsed string literal in IBM1047
>>> FAIL: gdb.base/charset.exp: check value of escape that doesn't exist in IBM1047
>>
>> Out of curiosity, on which configuration do you see these failures?
Hmm, I now see these failures on an x86-64 Linux (Ubuntu 20.04) machine:
FAIL: gdb.base/charset.exp: check value of parsed character literal in EBCDIC-US
FAIL: gdb.base/charset.exp: check value of parsed string literal in EBCDIC-US
FAIL: gdb.base/charset.exp: check value of escape that doesn't exist in EBCDIC-US
FAIL: gdb.base/charset.exp: check value of parsed character literal in IBM1047
FAIL: gdb.base/charset.exp: check value of parsed string literal in IBM1047
FAIL: gdb.base/charset.exp: check value of escape that doesn't exist in IBM1047
The first FAIL looks like:
444 print /d 'A' == ebcdic_us_string[7]^M
445 $63 = 0^M
446 (gdb) FAIL: gdb.base/charset.exp: check value of parsed character literal in EBCDIC-US
Could you give it a test on x86-64?
Simon
More information about the Gdb-patches
mailing list