Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaces SAFE_CLONE() with tst_clone() in the tst_ns_* helpers. The reason for the replacement is that SAFE_CLONE() uses TST_RETRY_FUNC() which calls tst_multiply_timeout(). The problem with that is that the tst_multiply_timeout() is a test library function that started to print TINFO messages recently and that we rely on parsing the output from the tst_ns_* helpers. The reason SAFE_CLONE() started to call TST_RETRY_FUNC() is that in the case that we create new namespaces with the clone call, we may end up creating them faster than kernel can clean them up which is described in: commit 7d88208 Author: Petr Vorel <[email protected]> Date: Mon Mar 28 22:46:43 2022 +0200 lib: Retry safe_clone() on ENOSPC This combined with the newly introduced changes in the test library that check for kernel debugging options that may need to adjust default timeouts: commit 893ca0a Author: Li Wang <[email protected]> Date: Sun Dec 22 15:22:49 2024 +0800 lib: multiply the timeout if detect slow kconfigs which adds tst_has_slow_kconfig() into the tst_multiply_timeout() causes the TINFO messages to be printed. The reason why we can safely replace the SAFE_CLONE() with tst_clone() here is that we are not creating new namspaces in the tst_ns_* helpers, but rather than that cloning a new process to be executed inside of the namespace, hence we do not need to retry on ENOSPC. Link: https://lore.kernel.org/ltp/[email protected]/ Reviewed-by: Li Wang <[email protected]> Reviewed-by: Petr Vorel <[email protected]> Tested-by: Petr Vorel <[email protected]> Signed-off-by: Cyril Hrubis <[email protected]>
- Loading branch information