Skip to content

Conversation

@oech3
Copy link
Contributor

@oech3 oech3 commented Jan 28, 2026

Closes #10175 .
We cannot add tests for device returning EIO and cannot backport corresponding GNU tests until we backport proper args managenent too.

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/shuf/shuf-reservoir (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/sort/sort-stale-thread-mem (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

@ChrisDryden
Copy link
Collaborator

I was messing around with ways to make an integ test for this and I was able to replicate the conditions using /proc/self/mem . Will only work on linux but should give us regression coverage in the CI

  #[test]
  #[cfg(target_os = "linux")]
  fn test_check_file_with_io_error() {
      // /proc/self/mem causes EIO when read without proper seeking
      new_ucmd!()
          .arg("-a")
          .arg("md5")
          .arg("--check")
          .pipe_in("d8e8fca2dc0f896fd7cb4cb0031ba249  /proc/self/mem\n")
          .fails()
          .stderr_contains("Input/output error")
          .stdout_contains("FAILED open or read");
  }

@oech3

This comment was marked as outdated.

@oech3
Copy link
Contributor Author

oech3 commented Jan 28, 2026

After we found other bugs needed to dedup the code

@oech3

This comment was marked as off-topic.

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/shuf/shuf-reservoir (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/sort/sort-stale-thread-mem (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)

@oech3
Copy link
Contributor Author

oech3 commented Jan 28, 2026

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/shuf/shuf-reservoir (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/sort/sort-stale-thread-mem (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

@oech3
Copy link
Contributor Author

oech3 commented Jan 28, 2026

Does not work as we expected. ignore

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/shuf/shuf-reservoir (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/sort/sort-stale-thread-mem (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

@dezgeg
Copy link
Contributor

dezgeg commented Jan 29, 2026

Does not work as we expected. ignore

If you mean the /proc/self/mem trick, it fails on musl due to error message being different. #[cfg(all(target_os = "linux", not(target_env = "musl")))] should work.

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/shuf/shuf-reservoir (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/sort/sort-stale-thread-mem (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/basenc/bounded-memory is now passing!

@oech3
Copy link
Contributor Author

oech3 commented Jan 29, 2026

Thankyou

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.

cksum, hashsum: --check'ing broken file cause panic

3 participants