Skip to content

Conversation

@martinkunkel2
Copy link
Contributor

@martinkunkel2 martinkunkel2 commented Dec 2, 2025

Use case is that two files are piped into comm, i.e. in bash

   comm <(cat file1) <(cat file2)

see also full example in #9537

Before the fix, comm reads from the pipes twice. Once in "fn comm" and
once in "fn are_files_identical". As such, part of the data is skipped
in comparison which leads to wrong output.

This is fixed by skipping the file comparison in case one of the files is not a regular file.

This fixes #9537

@martinkunkel2 martinkunkel2 force-pushed the comm_fix_anonymous_pipes branch from bd3c2e3 to 2ebd3da Compare December 2, 2025 22:17
@github-actions
Copy link

github-actions bot commented Dec 2, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)

Use case is that two files are piped into comm, i.e. in bash
   comm <(cat file1) <(cat file2)

Before the fix, comm reads from the pipes twice. Once in "fn comm" and
once in "fn are_files_identical". As such, part of the data is skipped
in comparison which leads to wrong output.

This is fixed by skipping the file comparison in case one of the files
is not a regular file.
@martinkunkel2 martinkunkel2 force-pushed the comm_fix_anonymous_pipes branch from 2ebd3da to 5c944e5 Compare December 3, 2025 18:55
@github-actions
Copy link

github-actions bot commented Dec 3, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)

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.

comm: errors when using process substitution

1 participant