[LTP] [PATCH v6] Refactor fork14 using new LTP API

Andrea Cervesato andrea.cervesato@suse.com
Tue May 7 09:24:19 CEST 2024


Hi!

On 5/6/24 22:26, Petr Vorel wrote:
> Hi Andrea, Martin,
>
>> Hi,
>> Reviewed-by: Martin Doucha <mdoucha@suse.cz>
> +1
>
> ...
>
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
>>> +
>>> +static struct tst_test test = {
>>> +	.test_all = run,
>>> +	.setup = setup,
>>> +	.cleanup = cleanup,
>>> +	.forks_child = 1,
>>> +	.skip_in_compat = 1,
> BTW test on x86 (i.e. true 64 bit) behaves exactly the same as on compat mode:
>
> tst_test.c:1614: TINFO: Timeout per run is 0h 00m 30s
> fork14.c:46: TINFO: mmap() failed
> fork14.c:46: TINFO: mmap() failed
> fork14.c:46: TINFO: mmap() failed
> fork14.c:46: TINFO: mmap() failed
> fork14.c:46: TINFO: mmap() failed
> fork14.c:46: TINFO: mmap() failed
> fork14.c:46: TINFO: mmap() failed
> fork14.c:46: TINFO: mmap() failed
> fork14.c:46: TINFO: mmap() failed
> fork14.c:46: TINFO: mmap() failed
> fork14.c:46: TINFO: mmap() failed
> fork14.c:49: TCONF: mmap() fails too many times, so it's almost impossible to get a vm_area_struct sized 16TB.
>
> IMHO we should whitelist it as well, I can change before merge with diff below.
>
> (More elegant way would be to add .skip_in_32bit.)
>
> Kind regards,
> Petr
>
> +++ testcases/kernel/syscalls/fork/fork14.c
> @@ -18,6 +18,8 @@
>   #include <stdlib.h>
>   #include <sys/wait.h>
>   
> +#ifndef __i386__
TST_ABI32 is not enough? What about ".skip_in_compat"?
> +
>   #define LARGE		(16 * 1024)
>   #define EXTENT		(16 * 1024 + 10)
>   
> @@ -121,3 +123,6 @@ static struct tst_test test = {
>   		{}
>   	}
>   };
> +#else
> +TST_TEST_TCONF("Not supported on x86 in 32-bit");
> +#endif

Andrea



More information about the ltp mailing list