Add strings -n option test case
Adds test cases for the `strings -n` option, improving test coverage for string length filtering.
This patch introduces test cases for the strings -n option, which allows users to specify a minimum string length for output. It includes tests for the default length (n=4) and custom lengths (n=5, n=7), verifying that the command correctly filters strings based on their length. The patch also integrates support for the strings command into the binutils-common.exp test suite.
- proposer
Submits a patch to add test cases for the `strings -n` option.
“This patch adds strings -n test case, including n=4(default),5 and 7. For example , when n = 5, the "strings -n" result only show symbols whose length >= 5. At the same time ,add "strings" command support in binutils-common.exp.”
- reviewer
Requests that new patch versions be submitted as distinct threads for clearer version tracking.
“Also, please sen new versions as distinct new threads, not as replies to earlier versions. See how the versioning isn't possible to determine at https://sourceware.org/pipermail/binutils/2026-September/thread.html. The sole thing tagged V2 is _not_ this new patch version.”
- proposer
Provides an update to the patch, clarifying its purpose and changes.
“I have updated the patch: 1.Add some description for this patch 2.Correct changed files list 3.This case is for "string -n", I used "string -d -n" to avoid non-data symbols, only show data symbols 4.Change dirctives format 5.I used loop to test 3 cases 6.Correct STRINGS in binutils-common.exp”
In Details
This patch adds comprehensive test cases for the strings -n option, ensuring that the minimum string length filtering functionality works correctly. It covers default behavior and custom length specifications, and integrates the strings command into the binutils-common.exp test harness for improved test suite management.
- strings command
- A Unix utility that scans an object file or executable and prints the printable character sequences that are at least a certain length. It's useful for finding embedded text strings in binary files.
- test case
- A set of conditions or variables under which a tester will determine whether a system under test satisfies requirements or works correctly. In this context, it involves input files and expected output for the
stringscommand. - binutils-common.exp
- A file in the binutils test suite that likely contains common setup or utility functions used by multiple test scripts, ensuring consistency across different parts of the test suite.