Skip to content

md/002: use --run option instead of "echo y"#202

Merged
kawasaki merged 1 commit intolinux-blktests:masterfrom
kawasaki:md_002
Sep 10, 2025
Merged

md/002: use --run option instead of "echo y"#202
kawasaki merged 1 commit intolinux-blktests:masterfrom
kawasaki:md_002

Conversation

@kawasaki
Copy link
Copy Markdown
Collaborator

@kawasaki kawasaki commented Sep 5, 2025

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

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>
@kawasaki
Copy link
Copy Markdown
Collaborator Author

kawasaki commented Sep 5, 2025

@yizhanglinux Could you try this patch and see if it avoids the failure?
@alanpeterad FYI.

@yizhanglinux
Copy link
Copy Markdown
Contributor

Yes, it was fixed now.

# ./check md/002
md/002 (test md atomic writes)                               [passed]
    runtime    ...  12.033s

@kawasaki kawasaki merged commit c0162ed into linux-blktests:master Sep 10, 2025
5 checks passed
@kawasaki
Copy link
Copy Markdown
Collaborator Author

@yizhanglinux Thanks for the confirmation. I have merged this PR.

@kawasaki kawasaki deleted the md_002 branch October 10, 2025 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants