[LTP] [PATCH v4 2/3] testcase: make use of .supported_archs

Richard Palethorpe rpalethorpe@suse.de
Tue Nov 16 11:27:00 CET 2021


Hello,

Cyril Hrubis <chrubis@suse.cz> writes:

> Hi!
>>  static void run(void)
>> @@ -58,6 +50,11 @@ static void run(void)
>>  	register long mode __asm__("r3");
>>  	register long node_mask_ptr __asm__("r4");
>>  	register long node_mask_sz __asm__("r5");
>> +#else
>> +	static const int sys_num = 276;
>> +	static const int mode;
>> +	static const int node_mask_ptr = UINT_MAX;
>> +	static const int node_mask_sz = UINT_MAX;
>
> These shouldn't be static anymore.
>
>>  #endif
>>  	char stack_pattern[0x400];
>>  
>> @@ -78,7 +75,8 @@ static void run(void)
>>  		:
>>  		"memory", "cr0", "r6", "r7", "r8", "r9", "r10", "r11", "r12");
>>  	sys_ret = mode;
>> -#else /* __i386__ */
>> +#endif
>> +#ifdef __i386__
>>  	asm volatile (
>>  		"add $0x400, %%esp\n\t"
>>  		"int $0x80\n\t"
>> @@ -114,15 +112,14 @@ static void run(void)
>>  
>>  static struct tst_test test = {
>>  	.test_all = run,
>> +	.supported_archs = (const char *const []) {
>> +		"i386",
>> +		"ppc",
>
> And we should add "ppc64" here as well, right?

Nope, I think this is only 32-bit

>
>> +		NULL
>> +	},
>>  	.tags = (const struct tst_tag[]) {
>>  		{"linux-git", "cf01fb9985e8"},
>>  		{"CVE", "CVE-2017-7616"},
>>  		{}
>>  	}
>>  };
>
> Other than these two:
>
> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
>
> -- 
> Cyril Hrubis
> chrubis@suse.cz


-- 
Thank you,
Richard.


More information about the ltp mailing list