ltp
ltp copied to clipboard
Improve coverage for open_tree01 testcase
- The test always passes OPEN_TREE_CLONE, bug?
- AT_RECURSIVE is not tested at all
If not pass OPEN_TREE_CLONE flag, then move_mount will return TFAIL: move_mount() failed: EINVAL (22) It seems move_mount need new namespace otherwise will trigger a error.
In following code "attached" will become 1 and move_mount will go out with failure. https://elixir.bootlin.com/linux/v6.12.6/source/fs/namespace.c#L3320
Base following code shows add OPEN_TREE_CLONE will add AT_RECURSIVE automatically: https://elixir.bootlin.com/linux/v6.12.6/source/fs/namespace.c#L2877