Allow the command to be preceded by an exclamation point, which changes
the default expected result to a clean exit with a non-zero exit code.
MFC after: 1 week
Differential D58099
atf-check: Add shortcut for not-exit:0 Authored by des on Jul 8 2026, 7:17 AM. Tags None Referenced Files
Details
Diff Detail
Event TimelineComment Actions This is a really nice, simple feature request -- I love it! The concern I have about this change is that ! is a shell builtin operator and this could cause confusion/result in bugs if someone tries to fun the command on the command line in certain shells where ! has special meanings in different contexts (we can't always assume atf-sh is running /bin/sh, unfortunately..). How about atf_check -s '!0' false instead? If things were done that way the negation operator could be extended to -e and -o without any sort of ambiguity/confusion. Comment Actions Can you provide an example?
No, that completely negates the point of the patch. Comment Actions This still feels ambiguous in a non-desirable way to me, but I can see the value in making this possible so I want to give this the space to get more feedback instead of me serving as an unnecessary impediment.
| ||||||||||||||||||||||||||||||||||||||