summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-strings
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-strings][test] Merge two closely related testsJames Henderson2019-09-022-7/+8
| | | | | | | | | | This is a follow-up to feedback on D66015. Reviewed by: grimar Differential Revision: https://reviews.llvm.org/D67069 llvm-svn: 370643
* NFC. Remove trailing whitespace in testJames Henderson2019-08-121-1/+1
| | | | llvm-svn: 368556
* [llvm-strings] Improve testing of llvm-stringsJames Henderson2019-08-1223-93/+216
| | | | | | | | | | | | | | | | | | | This patch tidies up the llvm-strings testing by: 1. Adding comments to every test. 2. Getting rid of canned input files, and having the tests generate them on the fly (this makes the tests self-contained). 3. Adding missing test coverage. 4. Renaming some tests that weren't clear as to their purpose. 5. Adding extra checking of various cases, formatting etc. 6. Removing a test that didn't seem to have any useful purpose for testing llvm-strings. Reviewed by: rupprecht, grimar, MaskRay Differential Revision: https://reviews.llvm.org/D66015 llvm-svn: 368555
* [binutils] Add response file option to help and docsJames Henderson2019-06-211-0/+7
| | | | | | | | | | | | | | | | | | | | | Many LLVM-based tools already support response files (i.e. files containing a list of options, specified with '@'). This change simply updates the documentation and help text for some of these tools to include it. I haven't attempted to fix all tools, just a selection that I am interested in. I've taken the opportunity to add some tests for --help behaviour, where they were missing. We could expand these tests, but I don't think that's within scope of this patch. This fixes https://bugs.llvm.org/show_bug.cgi?id=42233 and https://bugs.llvm.org/show_bug.cgi?id=42236. Reviewed by: grimar, MaskRay, jkorous Differential Revision: https://reviews.llvm.org/D63597 llvm-svn: 364036
* [llvm-ar][llvm-nm][llvm-size] Change -long-option to --long-option in tests. NFCFangrui Song2019-05-012-3/+3
| | | | llvm-svn: 359688
* [llvm-strings] Fix whitespaces to match strings output.Jordan Rupprecht2018-11-095-30/+67
| | | | | | | | | | | | | | | | | Summary: The current implementation prepends a space on every line, making it difficult to compare against GNU strings. The space appears to have come from handling --radix in rL292707. The space is for making sure there's a space between the radix and the value; however the space is still emitted even when there is no radix. This change fixes that so the space is only emitted when there is a radix. Reviewers: jhenderson Reviewed By: jhenderson Subscribers: llvm-commits, compnerd Differential Revision: https://reviews.llvm.org/D54238 llvm-svn: 346529
* Fix llvm-strings crash for negative char valuesJames Henderson2018-10-241-0/+3
| | | | | | | | | | | | | | | | | On Windows at least, llvm-strings was crashing if it encountered bytes that mapped to negative chars, as it was passing these into std::isgraph and std::isblank functions, resulting in undefined behaviour. On debug builds using MSVC, these functions verfiy that the value passed in is representable as an unsigned char. Since the char is promoted to an int, a value greater than 127 would turn into a negative integer value, and fail the check. Using the llvm::isPrint function is sufficient to solve the issue. Reviewed by: ruiu, mstorsjo Differential Revision: https://reviews.llvm.org/D53509 llvm-svn: 345137
* [llvm-strings] Add support for the -a/--all optionsMartin Storsjo2017-11-141-0/+3
| | | | | | | | | | | | They don't actually change nay behaviour, as llvm-strings currently checks the whole object without looking at individual sections anyway. This allows using llvm-strings in a context that explicitly passes the -a option. Differential Revision: https://reviews.llvm.org/D40020 llvm-svn: 318185
* [llvm] Get rid of "%T" expansionsKuba Mracek2017-08-152-9/+8
| | | | | | | | | | The %T lit expansion expands to a common directory shared between all the tests in the same directory, which is unexpected and unintuitive, and more importantly, it's been a source of subtle race conditions and flaky tests. In https://reviews.llvm.org/D35396, it was agreed that it would be best to simply ban %T and only keep %t, which is unique to each test. When a test needs a temporary directory, it can just create one using mkdir %t. This patch removes %T in llvm. Differential Revision: https://reviews.llvm.org/D36495 llvm-svn: 310953
* llvm-strings: add support for `-t`Saleem Abdulrasool2017-01-212-0/+43
| | | | | | Allow printing the file content offset via the `-t` or `--radix` option. llvm-svn: 292707
* test: use separate input file for testSaleem Abdulrasool2016-11-162-4/+8
| | | | | | | Rather than using sed to generate the input and pipe the result to strings, use the static input instead. llvm-svn: 287079
* llvm-strings: support the `-n` optionSaleem Abdulrasool2016-11-151-0/+24
| | | | | | | | | Permit specifying the match length (the `-n` or `--bytes` option). The deprecated `-[length]` form is not supported as an option. This allows the strings tool to display only the specified length strings rather than the hardcoded default length of >= 4. llvm-svn: 286914
* Revert "Revert "llvm-strings: support printing the filename""Saleem Abdulrasool2016-11-145-3/+18
| | | | | | | Change the dynamic files to static in the hope that it will actually fix the transient errors that Ive been unable to reproduce. llvm-svn: 286891
* Revert "llvm-strings: support printing the filename"Renato Golin2016-11-144-19/+2
| | | | | | | | | | | | Also, Revert "test: remove the archive before modifying it" Revert "test: explicitly use gnu format" This reverts commits r286778, r286729 and r286767, as they are randomly failing on many bots (AArch64, x86_64). llvm-svn: 286820
* test: remove the archive before modifying itSaleem Abdulrasool2016-11-131-0/+1
| | | | | | | The archive may already exist when not doing a clean test run. The dirty state can cause a test failure. Remove the archive first. llvm-svn: 286778
* llvm-strings: support printing the filenameSaleem Abdulrasool2016-11-133-0/+16
| | | | | | This adds support for the `-f` or `--print-file-name` option for strings. llvm-svn: 286767
* test: explicitly use gnu formatSaleem Abdulrasool2016-11-121-2/+2
| | | | | | This should fix the Darwin buildbots. llvm-svn: 286729
* llvm-strings: trivialise logic until we support more optionsSaleem Abdulrasool2016-11-121-0/+13
| | | | | | | | Until we have handling for ignoring unloaded sections, simplify the logic to the point of triviality. This fixes the scanning of archives, particularly when embedded in archives. llvm-svn: 286727
* llvm-strings: ensure that the last string is correctly printedSaleem Abdulrasool2016-11-122-0/+4
We would ignore the last string that appeared if the file ended with a printable character. Ensure that we get the last string. llvm-svn: 286706
OpenPOWER on IntegriCloud