[all-commits] [llvm/llvm-project] ebdb6c: [lit] Cope with more cat variants (#121376)
Angus Lees via All-commits
all-commits at lists.llvm.org
Tue Dec 31 08:52:56 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ebdb6cf2acd6008e8741764a9078e2403cbc4fb5
https://github.com/llvm/llvm-project/commit/ebdb6cf2acd6008e8741764a9078e2403cbc4fb5
Author: Angus Lees <gus at inodes.org>
Date: 2024-12-31 (Tue, 31 Dec 2024)
Changed paths:
M llvm/utils/lit/tests/shtest-format.py
Log Message:
-----------
[lit] Cope with more cat variants (#121376)
BusyBox `cat` has yet another slight variation of error formatting:
```console
$ cat --help 2>&1 | head -1
BusyBox v1.37.0 (2024-09-30 10:39:57 UTC) multi-call binary.
$ cat does-not-exist
cat: can't open 'does-not-exist': No such file or directory
```
Rather than extend the test result regex with a third case,
recognise that we only really care about the filename and errno string.
Weaken the regex to ignore all "noise" around the filename.
Note this also corrects what looks like a bug with the previous regex.
Previously, the `cannot open does-not-exist` alternate did not assert
the following errno message. This was introduced in
https://reviews.llvm.org/D60553 (apparently) due to differences in the
`cat` command on AIX. That bug doesn't include the specific
AIX output, so it's unclear if this omission was intended.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list