[igt-dev] [PATCH i-g-t 1/1] runner: Fix results when there's warns and dmesg-warns

Martin Peres martin.peres at linux.intel.com
Fri Oct 12 13:29:43 UTC 2018


On 12/10/2018 16:06, Daniel Vetter wrote:
> On Fri, Oct 12, 2018 at 01:29:47PM +0300, Petri Latvala wrote:
>> After setting the result object text, the string retrieved from the
>> old object is invalid.
>>
>> Signed-off-by: Petri Latvala <petri.latvala at intel.com>
>> Cc: Martin Peres <martin.peres at linux.intel.com>
>> Cc: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
>> ---
>>  runner/resultgen.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/runner/resultgen.c b/runner/resultgen.c
>> index 9fc54cdc..ed8c9266 100644
>> --- a/runner/resultgen.c
>> +++ b/runner/resultgen.c
>> @@ -828,6 +828,7 @@ static void override_result_single(struct json_object *obj)
>>  	if (!strcmp(result, "pass") &&
>>  	    count_lines(errtext, errtext + strlen(errtext)) > 2) {
>>  		set_result(obj, "warn");
>> +		result = "warn";
> 
> Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> 
> Do we have unit tests for the runner that are checked when you do make
> check/ninja test?

Yes, there are already tests that are executed by make check / ninja
test. Here they are:
https://cgit.freedesktop.org/drm/igt-gpu-tools/tree/runner/runner_tests.c

However, Petri said today he does not have tests for this particular
piece of code. More work needed I guess :)

> 
> Would be really nice to have that, since on the piglit side Dylan made
> that happen. And if we have that already, we definitely want a unit test
> for this stuff here.
> -Daniel
> 
>>  	}
>>  
>>  	if (dmesgwarns) {
>> -- 
>> 2.18.0
>>
>> _______________________________________________
>> igt-dev mailing list
>> igt-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/igt-dev
> 


More information about the igt-dev mailing list