[LTP] [PATCH] mkdir_tests.sh: Handle error message from mkdir from rust coreutils
Petr Vorel
pvorel@suse.cz
Tue Dec 9 18:57:40 CET 2025
Hi Juerg,
> mkdir from rust coreutils doesn't print the directory path. Account for
> that.
> Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
> ---
> testcases/commands/mkdir/mkdir_tests.sh | 3 +++
> 1 file changed, 3 insertions(+)
> diff --git a/testcases/commands/mkdir/mkdir_tests.sh b/testcases/commands/mkdir/mkdir_tests.sh
> index c0a570e5c0e6..3bafbfdda7ba 100755
> --- a/testcases/commands/mkdir/mkdir_tests.sh
> +++ b/testcases/commands/mkdir/mkdir_tests.sh
> @@ -34,6 +34,9 @@ test2()
> if grep -q "$LONG_PATH.*No such file or directory" mkdir.out; then
> tst_res TPASS "Got correct error message"
> + elif grep -q "mkdir: No such file or directory" mkdir.out; then
> + # mkdir from rust coreutils doesn't print the directory path
> + tst_res TPASS "Got correct error message"
I was thinking about using extended regular expressions to use a single check,
but it's more readable this way.
I wonder why rust folks did not want to follow coreutils in
this case.
Anyway, merged. Thanks!
Kind regards,
Petr
More information about the ltp
mailing list