md/002: use --run option instead of "echo y"#202
Merged
kawasaki merged 1 commit intolinux-blktests:masterfrom Sep 10, 2025
Merged
md/002: use --run option instead of "echo y"#202kawasaki merged 1 commit intolinux-blktests:masterfrom
kawasaki merged 1 commit intolinux-blktests:masterfrom
Conversation
When mdadm creates a new array, it asks questions to users in the console, which is not suitable for automated test script runs. Then the test case md/002 used "echo y" with pipe to answer the questions automatically. However, starting with mdadm version 4.4, the "echo y" approach no longer works effectively, especially after a commit which introduced a new question [1]. This caused the test case failure. [1] https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?h=main&id=e97c4e18c847803016aa60066cb6e57c528d83a6 The --run option is now the recommended alternative because it directly bypasses the questions. To avoid the failure, add the "--run" option to the mdadm create commands instead of the "echo y". Link: linux-blktests#201 Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Collaborator
Author
|
@yizhanglinux Could you try this patch and see if it avoids the failure? |
Contributor
|
Yes, it was fixed now. |
Collaborator
Author
|
@yizhanglinux Thanks for the confirmation. I have merged this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When mdadm creates a new array, it asks questions to users in the console, which is not suitable for automated test script runs. Then the test case md/002 used "echo y" with pipe to answer the questions automatically.
However, starting with mdadm version 4.4, the "echo y" approach no longer works effectively, especially after a commit which introduced a new question [1]. This caused the test case failure.
[1] https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?h=main&id=e97c4e18c847803016aa60066cb6e57c528d83a6
The --run option is now the recommended alternative because it directly bypasses the questions. To avoid the failure, add the "--run" option to the mdadm create commands instead of the "echo y".
Link: #201