[LTP] [PATCH 12/13] Hugetlb: Migrating libhugetlbfs shm-fork

Petr Vorel pvorel@suse.cz
Tue Jan 3 19:23:03 CET 2023


Hi,

> Migrating the libhugetlbfs/testcases/shm-fork.c test
NOTE: if you're talking about libhugetlbfs [1], the test path is
tests/shm-fork.c (not testcases).


> Test Description: Test shared memory behavior when multiple threads are
> Test shared memory behavior when multiple threads are attached
> to a segment.  A segment is created and then children are
> spawned which attach, write, read (verify), and detach from the
> shared memory segment.

> Signed-off-by: Tarun Sahu <tsahu@linux.ibm.com>
> ---
>  runtest/hugetlb                               |   1 +
>  testcases/kernel/mem/.gitignore               |   1 +
>  .../kernel/mem/hugetlb/hugefork/hugefork02.c  | 104 ++++++++++++++++++
>  3 files changed, 106 insertions(+)
>  create mode 100644 testcases/kernel/mem/hugetlb/hugefork/hugefork02.c

> diff --git a/runtest/hugetlb b/runtest/hugetlb
> index 33fd384b4..348a7dc5f 100644
> --- a/runtest/hugetlb
> +++ b/runtest/hugetlb
> @@ -2,6 +2,7 @@ hugefallocate01 hugefallocate01
>  hugefallocate02 hugefallocate02

>  hugefork01 hugefork01
> +hugefork02 hugefork02 -P 3 -s 5

You're not define tst_option [2] (you don't even have any code which would hold
these options), therefore passing any of these 2 options will quit the test:
hugefork02: invalid option -- 'P'

Please fix it in next version.

Kind regards,
Petr

[1] https://github.com/libhugetlbfs/libhugetlbfs
[2] https://github.com/linux-test-project/ltp/wiki/C-Test-API#15-test-specific-command-line-options


More information about the ltp mailing list