Re: [PATCH v2 5/5] Add support for Intel PKRU register to GDB and GDBserver.

Pedro Alves
2016-12-09T17:16:00Z

On 12/02/2016 01:59 AM, Luis Machado wrote:

>> +set comp_flags "-I${srcdir}/../nat/"
>> +
>> +if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \
>> + [list debug additional_flags=${comp_flags}]] } {
>
> Add 'untested "failed to compile"'

Nope, that's already handled by prepare_for_testing itself.
The test message used is the first argument to prepare_for_testing
above. Unfortunately, many tests blindly pass "${testfile}.exp"...

From build_executable_from_specs (called by prepare_for_testing):

[....]
# TESTNAME is the name of the test; this is passed to 'untested' if
# something fails.
[....]

I had started using:

prepare_for_testing "failed to prepare" ....

a while ago. See:

grep "prepare_for_testing \"[A-Za-z0-9_ ]\+" -rn

Thanks,
Pedro Alves