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

Cyril Hrubis chrubis@suse.cz
Tue Nov 9 17:23:33 CET 2021


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? 

> +		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


More information about the ltp mailing list