[LTP] [PATCH v4 00/12] Fix tests failing with setsid

Andrea Cervesato andrea.cervesato@suse.com
Fri Jan 17 09:42:07 CET 2025


Pushed with suggested changes, thanks!

Andrea

On 1/16/25 12:35, Andrea Cervesato wrote:
> Following tests are failing when running on a new session started with
> setsid command/syscall: pty01, ptem01, setpgid01.
>
> Tihs patch-set refactor them in order to fix this issue. Some tests like
> pty01 and ptem01 have been split into multiple files due to their
> complexity.
>
> Fixes: https://github.com/linux-test-project/kirk/issues/28
> Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
> ---
> Changes in v4:
> - TST_EXP_EQ_STRN: copy input strings inside a buffer in order to handle
>    end of the string
> - Link to v3: https://lore.kernel.org/r/20250109-fix_setsid_tests-v3-0-2ce60c904019@suse.com
>
> Changes in v3:
> - move slave/master opening in common.h
> - check if master device exists inside open_master()
> - check if slave device has right permissions inside open_slave()
> - add TST_EXP_EQ_STRN macro
> - fix SAFE_PTSNAME macro
> - move master handling inside setup/cleanup in most of the test
> - Link to v2: https://lore.kernel.org/r/20250106-fix_setsid_tests-v2-0-c43f57a2bab6@suse.com
>
> Changes in v2:
> - add SAFE_PTSNAME macro
> - ptem01: check ptsname() with TBROK
> - Link to v1: https://lore.kernel.org/r/20241211-fix_setsid_tests-v1-0-e103f36c6462@suse.com
>
> ---
> Andrea Cervesato (12):
>        Refactor setpgid01 test
>        Add SAFE_PTSNAME macro
>        Refactor ptem01 test
>        Add ptem02 test
>        Add ptem03 test
>        Add ptem04 test
>        Add ptem05 test
>        Add ptem06 test
>        Add TST_EXP_EQ_STRN macro
>        Refactor pty01 test
>        Add pty08 test
>        Add pty09 test
>
>   include/tst_safe_macros.h                     |   4 +
>   include/tst_test_macros.h                     |  31 ++
>   lib/tst_safe_macros.c                         |  14 +
>   runtest/pty                                   |   7 +
>   testcases/kernel/pty/.gitignore               |   7 +
>   testcases/kernel/pty/common.h                 |  68 ++++
>   testcases/kernel/pty/ptem01.c                 | 456 +++-----------------------
>   testcases/kernel/pty/ptem02.c                 |  71 ++++
>   testcases/kernel/pty/ptem03.c                 |  49 +++
>   testcases/kernel/pty/ptem04.c                 |  49 +++
>   testcases/kernel/pty/ptem05.c                 |  55 ++++
>   testcases/kernel/pty/ptem06.c                 |  52 +++
>   testcases/kernel/pty/pty01.c                  | 409 +++--------------------
>   testcases/kernel/pty/pty08.c                  |  38 +++
>   testcases/kernel/pty/pty09.c                  |  74 +++++
>   testcases/kernel/syscalls/setpgid/setpgid01.c | 152 ++-------
>   16 files changed, 620 insertions(+), 916 deletions(-)
> ---
> base-commit: 578ba63ab115cfbc2374c6b7a4d1fae5fffd18ee
> change-id: 20241204-fix_setsid_tests-876a46267285
>
> Best regards,


More information about the ltp mailing list