A number of tests covering llvm-ar behaviour.
Details
- Reviewers
rupprecht MaskRay jhenderson - Commits
- rG3a6aaa4391f0: Reapply [llvm-ar][test] Increase llvm-ar test coverage
rL366206: Reapply [llvm-ar][test] Increase llvm-ar test coverage
rG1159fe3f6e0d: Reapply [llvm-ar][test] Increase llvm-ar test coverage
rL365318: Reapply [llvm-ar][test] Increase llvm-ar test coverage
rG0c5fe7a440a2: Revert [llvm-ar][test] Increase llvm-ar test coverage
rL365317: Revert [llvm-ar][test] Increase llvm-ar test coverage
rG870d9c61b062: [llvm-ar][test] Increase llvm-ar test coverage
rL365316: [llvm-ar][test] Increase llvm-ar test coverage
Diff Detail
Event Timeline
test/tools/llvm-ar/create.test | ||
---|---|---|
1 | Since you've used ## below.. # -> ## | |
test/tools/llvm-ar/dash-before-letter.test | ||
1 | # -> ## | |
test/tools/llvm-ar/extract.test | ||
1 | # -> ## | |
7 | --implicit-check-not {{.}} does not check a regular expression. Use | count 0 instead | |
test/tools/llvm-ar/insert-after.test | ||
1 | # -> ## | |
3 | Maybe split this into rm %t-back.a/etc below. |
After MaskRay's suggestion I have removed all use of rm -f %t-*
test/tools/llvm-ar/create.test | ||
---|---|---|
1 | The times I've used ## below has been to make comments stand out more in files that require the use of # on each line. Would it be preferred to standardise the use of ## and # on all files regardless of their use as input YAML files? | |
test/tools/llvm-ar/extract.test | ||
7 | I did some experimentation with implicit-check-not and a regular expression and it seemed to work fine, do you have a test case that illustrates the issue? |
test/tools/llvm-ar/create.test | ||
---|---|---|
1 | From what I can tell in llvm-objcopy, llvm-objdump, ..., comments in the header are also prefixed with ## nowadays. | |
9 | No strong preference here, but if you like it: RUN: rm -f %t.warning.ar RUN: llvm-ar r %t.warning.ar %t1.txt %t2.txt 2>&1 \ RUN: | FileCheck %s --check-prefix=WARNING -DOUTPUT=%t.warning.ar WARNING: warning: creating [[OUTPUT]] | |
13 | FileCheck --allow-empty /dev/null --implicit-check-not={{.}} | |
test/tools/llvm-ar/dash-before-letter.test | ||
2 | Can you merge this test with default-add.test ? | |
test/tools/llvm-ar/extract.test | ||
7 | Thanks for clarification. It works. FileCheck --allow-empty /dev/null --implicit-check-not={{.}} | |
14 | ||
test/tools/llvm-ar/move-after.test | ||
32 | It may be interesting to specifies files not in the order: llvm-ar ma %t1.txt %t-multiple.a %t4.txt %t3.txt | |
test/tools/llvm-ar/preserve-mod-time.test | ||
8 | TZ=UTC | |
11 | --full-time is specific to GNU coreutils. See llvm-objcopy/ELF/strip-preserve-mtime.test, check just the yyyy part should be ok: # CHECK-PRESERVE-MTIME: {{[[:space:]]1997}} |
test/tools/llvm-ar/dash-before-letter.test | ||
---|---|---|
2 | I didn't realise that default-add.test already covered this functionality. Unless we want to spin off a new test explicitly for dashes before letters then I think default-add.test should suffice for coverage. |
test/tools/llvm-ar/dash-before-letter.test | ||
---|---|---|
2 | The spin-off dash-before-letter.test may be clearer. You can probably delete the multi-dash tests from default-add.test. |
The tools/llvm-ar/extract.test is failing on macOS:
******************** TEST 'LLVM :: tools/llvm-ar/extract.test' FAILED ******************** Script: -- : 'RUN: at line 2'; rm -rf /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp && mkdir -p /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/extracted/ : 'RUN: at line 5'; /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/bin/llvm-ar cr /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/empty.a : 'RUN: at line 6'; /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/bin/llvm-ar x /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/empty.a 2>&1 | /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/bin/FileCheck --allow-empty /dev/null --implicit-check-not={{.}} : 'RUN: at line 9'; echo filea > /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/a.txt : 'RUN: at line 10'; echo fileb > /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/b.txt : 'RUN: at line 11'; /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/bin/llvm-ar rc /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/archive.a /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/a.txt /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/b.txt : 'RUN: at line 14'; cd /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/extracted && /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/bin/llvm-ar x /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/archive.a a.txt : 'RUN: at line 15'; diff /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/a.txt /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/extracted/a.txt : 'RUN: at line 18'; rm /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/extracted/a.txt : 'RUN: at line 19'; cd /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/extracted && /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/bin/llvm-ar x /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/archive.a : 'RUN: at line 20'; diff /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/a.txt /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/extracted/a.txt : 'RUN: at line 21'; diff /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/b.txt /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/extracted/b.txt -- Exit Code: 1 Command Output (stdout): -- 1a2,3 > > --
Is it possible to revert this change?
I'd say XFAIL: darwin would be cleaner then a revert... This apparently works fine on other OSes except that there is some hidden macOS issue that hasn't been sorted out.
If the archive member is not a regular object, the format will be detected incorrectly?
Simmilarly to D63197, I'm not sure if it's preferable to make this test XFAIL: darwin or explicitly call llvm-ar with --format=gnu. What do you think jfb?
Since you've used ## below..
# -> ##