Skip to content

xargs: reject quotes spanning input lines - #797

Open
wtcpython wants to merge 1 commit into
uutils:mainfrom
wtcpython:fix/xargs-reject-multiline-quotes
Open

xargs: reject quotes spanning input lines#797
wtcpython wants to merge 1 commit into
uutils:mainfrom
wtcpython:fix/xargs-reject-multiline-quotes

Conversation

@wtcpython

Copy link
Copy Markdown
Contributor

Fixes #776.

The whitespace-delimited argument reader allowed single and double quotes to span input lines. Quotes opened on one line could be closed on a later line, so malformed input was combined into arguments instead of rejected.

Reject a newline while a quote is open, matching GNU and BSD xargs behavior. Add regression coverage for both quote types when reading through --arg-file.

@sylvestre
sylvestre force-pushed the fix/xargs-reject-multiline-quotes branch from 12f27a8 to 37bf474 Compare July 28, 2026 10:09
@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.83%. Comparing base (3072c3f) to head (37bf474).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #797      +/-   ##
==========================================
- Coverage   91.90%   91.83%   -0.07%     
==========================================
  Files          35       35              
  Lines        7248     7253       +5     
  Branches      376      376              
==========================================
  Hits         6661     6661              
- Misses        444      448       +4     
- Partials      143      144       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed-hq

codspeed-hq Bot commented Jul 28, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 20 untouched benchmarks


Comparing wtcpython:fix/xargs-reject-multiline-quotes (37bf474) with main (3072c3f)

Open in CodSpeed

@github-actions

Copy link
Copy Markdown

Commit 37bf474 has test result changes:

bfs testsuite:

Test results comparison:
  Current:   TOTAL: 314 / PASSED: 266 / FAILED: 42 / SKIPPED: 6
  Reference: TOTAL: 314 / PASSED: 267 / FAILED: 41 / SKIPPED: 6

Changes from main branch:
  TOTAL: +0
  PASSED: -1
  FAILED: +1

New test failures (1):
  - gnu/okdir_path_relative

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(xargs): in some cases xargs do not error out when single quotes not match leading to corruption

1 participant