binutils Newspaper
NOVEMBER 30, 2026
binutils — Proposed — Sentiment 7 / 10

Add strings -n option test case

Adds test cases for the `strings -n` option and support for it in binutils-common.exp.

This patch introduces test cases for the strings -n command-line option, which filters strings based on a minimum length. It specifically adds tests for n=4 (default), n=5, and n=7. Additionally, the patch ensures that the strings command is supported within the binutils-common.exp test suite. The author also notes that specific target configurations (mmix, tic4x-coff, tic64x-coff) have been adjusted to handle expected failures or pass correctly.

In the Thread 2 participants
  1. pengxu@kylinos.cn proposer

    Submits a patch to add test cases for the `strings -n` option, including adjustments for specific targets.

    “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.”
  2. Jan Beulich <jbeulich@suse.com> contributor

    Notes that the patch has already been committed after necessary modifications, implying the proposer's updates might be redundant or confirming prior work.

    “You realize though that I've already committed that patch of yours after making said changes?”

Technical Tradeoffs

  • Improves test coverage for the `strings` utility.
  • Requires careful configuration for different target architectures.

In Details

This patch adds test cases to binutils/testsuite/binutils-all/ for the strings utility, specifically targeting the -n option which controls the minimum length of displayed strings. It also enhances binutils/testsuite/binutils-common.exp to include support for the strings command. The proposer has also made adjustments for mmix, tic4x-coff, and tic64x-coff targets to ensure test stability, marking some as expected failures.

For Context
strings
A command-line utility that displays printable characters in files.
test case
A set of conditions or variables under which a system or component is tested to see whether it behaves as expected.
binutils-common.exp
A common test script file used by the GNU Binutils test suite, likely containing general setup and utility functions for various tests.
XFAIL
In testing, denotes an 'expected failure', meaning a test is known to fail and this is acceptable under certain conditions or for specific targets.
Filed Under: stringstestingbinutils