This prints the rpaths for the given binary
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/tools/llvm-objdump/MachO/rpaths.test | ||
---|---|---|
2 | A quick summary comment at the start of the test describing the test purpose is usually a good idea, I think. |
llvm/test/tools/llvm-objdump/MachO/rpaths.test | ||
---|---|---|
2 | Nit: End comments with a '.'. Also, newer tests in the LLVM binutils tend to use '##' for comments, to help them stand out from lit and FileCheck directives. Same applies to the other two comments below. | |
12 | You should capture and use FileCheck to check what error message is reported here. |
llvm/test/tools/llvm-objdump/MachO/rpaths.test | ||
---|---|---|
6 | If you want to ensure there is no other string, you can use FileCheck %s --match-full-lines --strict-whitespace or add {{^}}...{{$}} |
llvm/test/tools/llvm-objdump/MachO/rpaths.test | ||
---|---|---|
6 | In this case there's also the header, which I wasn't worried about showing up one way or the other (since I made sure below it still doesn't show up if you pass the flag to disable it) |
llvm/test/tools/llvm-objdump/MachO/rpaths.test | ||
---|---|---|
6 | I think @MaskRay's point was that the current and previous patterns don't detect either of the following two cases: Objc2.64bit.exe.macho-x86_64: <some other rpath> @executable_path/../Frameworks <some other rpath> Objc2.64bit.exe.macho-x86_64: some nonsense @executable_path/../Frameworks garbagegarbage By default, FileCheck looks for substrings anywhere in the output after the previous match, and succeeds if it finds them. It doesn't have to be the whole line, unless you use --match-full-lines. --strict-whitespace also ensures that the line is appropriately indented (or not) as desired, with no leading or trailing whitespace beyond what is checked-for explicitly on each CHECK line. Meanwhile, CHECK-NEXT and CHECK-EMPTY can be used to ensure the output is on the desired lines in relation to each other. Finally, if you want to ensure there is no output anywhere other than what you check for explicitly, you could use --implicit-check-not={{.}}. |
A quick summary comment at the start of the test describing the test purpose is usually a good idea, I think.