Page MenuHomeFreeBSD

makefs: tests: Improve ZFS perms test
AbandonedPublic

Authored by jlduran on Wed, Dec 31, 1:38 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jan 10, 11:20 PM
Unknown Object (File)
Sat, Jan 10, 4:36 PM
Unknown Object (File)
Thu, Jan 8, 9:56 PM
Unknown Object (File)
Thu, Jan 8, 2:46 AM
Unknown Object (File)
Sun, Jan 4, 6:43 PM
Unknown Object (File)
Sun, Jan 4, 5:14 PM
Unknown Object (File)
Sat, Jan 3, 10:26 AM
Unknown Object (File)
Fri, Jan 2, 10:46 PM
Subscribers

Details

Reviewers
None
Group Reviewers
tests
Summary

Match the output of "su" in a case-insensitive manner, since the output
can be all lowercase depending on the shell used.

It only affects if the user running the tests uses a non-standard shell
(zsh, for example).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 69536
Build 66419: arc lint + arc unit

Event Timeline

asomers added inline comments.
usr.sbin/makefs/tests/makefs_zfs_tests.sh
951

What about this line too?

usr.sbin/makefs/tests/makefs_zfs_tests.sh
951

This output comes from execvp(3), while the one below comes from su(1). But I guess, I can apply the same fix to both, for symmetry.

ngie added inline comments.
usr.sbin/makefs/tests/makefs_zfs_tests.sh
955

Please add a comment noting why both cases must be tested.

usr.sbin/makefs/tests/makefs_zfs_tests.sh
955

Please add a comment noting why both cases must be tested.

I meant in the code.. the commit message accurately reflects what the change aims to do, but this seems like it might get overlooked during a cleanup effort of some kind.

I'll abandon this revision, as it is very specific to zsh. It is unlikely that someone else hits this issue. For it to happen, the root user must use zsh (unlikely).
zsh intentionally lowercases the error message (https://github.com/zsh-users/zsh/blob/6a691a3487cc26900475291ced12400318176aeb/Src/utils.c#L361-L368)