[PATCH] D80838: [llvm-ar] Add more tests for errors in opening archives
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 4 00:55:22 PST 2021
jhenderson added a comment.
Hi @jdelia,
Sorry for the delay in responding. I and I suspect others who were involved on this have been off over the Christmas period.
I'm not sure why you think `ARCHIVE` is being incorrectly set. To me, it looks like it is being set exactly to what it should be. From line 12 of the failing test, you have `-DARCHIVE=%t/permission.b`. lit will expand `%t` to an absolute path pointing to a name unique to the test. In this case, it is `/home/bigpack/llvm-paq/11.0.0/llvm-project/build/test/tools/llvm-ar/Output/error-opening-permission.test.tmp`, and then a `/permission.b` is concatenated to the end of the string to form the value of `ARCHIVE`. FileCheck will then look for the line `error: error opening '/home/bigpack/llvm-paq/11.0.0/llvm-project/build/test/tools/llvm-ar/Output/error-opening-permission.test.tmp/permission.b': permission denied` (where the 'p' in 'permission' can be upper of lower-case) in the output of `not llvm-ar p /home/bigpack/llvm-paq/11.0.0/llvm-project/build/test/tools/llvm-ar/Output/error-opening-permission.test.tmp/permission.b` (stderr or stdout).
What happens when you try to manually run the llvm-ar command locally on the permission.b path? What output do you see (if any)? Does llvm-ar pass or fail? Also, what system are you running on? As noted in the test comments, the test doesn't work on Windows due to the difficulty of making a file unreadable on that platform. Maybe your platform has a similar problem?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80838/new/
https://reviews.llvm.org/D80838
More information about the llvm-commits
mailing list