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 92.08%. Comparing base (2a3eac9) to head (c564172).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #797      +/-   ##
==========================================
- Coverage   92.15%   92.08%   -0.07%     
==========================================
  Files          35       35              
  Lines        7377     7382       +5     
  Branches      383      383              
==========================================
  Hits         6798     6798              
- Misses        438      442       +4     
- Partials      141      142       +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 (c564172) with main (2a3eac9)

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

@wtcpython
wtcpython force-pushed the fix/xargs-reject-multiline-quotes branch from 37bf474 to 2d7ef17 Compare August 11, 2026 01:09
@sylvestre
sylvestre force-pushed the fix/xargs-reject-multiline-quotes branch from 2d7ef17 to c564172 Compare August 18, 2026 17:21
@github-actions

Copy link
Copy Markdown

Commit c564172 has test result changes:

bfs testsuite:

Test results comparison:
  Current:   TOTAL: 317 / PASSED: 274 / FAILED: 37 / SKIPPED: 6
  Reference: TOTAL: 313 / PASSED: 267 / FAILED: 40 / SKIPPED: 6

Changes from main branch:
  TOTAL: +4
  PASSED: +7
  FAILED: -3

Test improvements (3):
  + gnu/execdir_path_dot
  + gnu/execdir_path_empty
  + gnu/execdir_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