Skip to content

Conversation

@sylvestre
Copy link
Contributor

@sylvestre sylvestre commented Aug 27, 2025

run ssh, it might break with:


---- test_chmod::test_chmod_umask_expected stdout ----

thread 'test_chmod::test_chmod_umask_expected' panicked at tests/by-util/test_chmod.rs:240:5: assertion `left == right` failed: Unexpected umask value: expected 022 (octal), but got 002. Please adjust the test environment.
  left: 2
 right: 18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

@sylvestre sylvestre force-pushed the test-chmod branch 2 times, most recently from df7575e to 0b67ada Compare August 27, 2025 20:32
@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

@cakebaker
Copy link
Contributor

clippy complains about a useless conversion:

  error: useless conversion to the same type: `u32`
     --> tests/by-util/test_chmod.rs:248:9
      |
  248 |         u32::from(system_umask),
      |         ^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `u32::from()`: `system_umask````

@github-actions
Copy link

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/timeout/timeout (fails in this run but passes in the 'main' branch)

run ssh, it might break with:

---- test_chmod::test_chmod_umask_expected stdout ----

thread 'test_chmod::test_chmod_umask_expected' panicked at tests/by-util/test_chmod.rs:240:5:
assertion `left == right` failed: Unexpected umask value: expected 022 (octal), but got 002. Please adjust the test environment.
  left: 2
 right: 18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)

@sylvestre sylvestre requested a review from cakebaker August 29, 2025 22:13
assert_eq!(
current_umask, 0o022,
"Unexpected umask value: expected 022 (octal), but got {current_umask:03o}. Please adjust the test environment.",
current_umask, system_umask as u32,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, maybe I'm missing something. What's the reason for the conversion (and the corresponding allow(clippy::cast_lossless)? Both libc::umask and uucore::mode::get_umask return a u32 value and so no conversion is necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was failing on mac

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  Checking coreutils v0.1.0 (/Users/runner/work/coreutils/coreutils)
  error: casts from `u16` to `u32` can be expressed infallibly using `From`
     --> tests/by-util/test_chmod.rs:247:24
      |
  247 |         current_umask, system_umask as u32,
      |                        ^^^^^^^^^^^^^^^^^^^
      |
      = help: an `as` cast can become silently lossy if the types change in the future
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
      = note: `-D clippy::cast-lossless` implied by `-D clippy::pedantic`
      = help: to override `-D clippy::pedantic` add `#[allow(clippy::cast_lossless)]`
  help: use `u32::from` instead
      |
  247 -         current_umask, system_umask as u32,
  247 +         current_umask, u32::from(system_umask),
      |
  
  error: could not compile `coreutils` (test "tests") due to 1 previous error
Error: Final attempt failed. Child_process exited with error code 1

@cakebaker cakebaker merged commit 7d2d674 into uutils:main Aug 30, 2025
93 checks passed
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.

2 participants