+
Skip to content

Conversation

Luv-Ray
Copy link
Contributor

@Luv-Ray Luv-Ray commented Oct 20, 2024

fixes #6796

Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/tail/assert is no longer failing!

Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/tail/assert is no longer failing!
Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

@Luv-Ray Luv-Ray force-pushed the cksum_error_handling branch from 5ea3b8a to c9776e7 Compare October 20, 2024 07:47
.stderr_contains("WARNING: 1 line is improperly formatted");
}

#[cfg(not(windows))]
Copy link
Contributor

Choose a reason for hiding this comment

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

why not windows?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://github.com/uutils/coreutils/actions/runs/11424022765/job/31783927716#step:7:3602
seems that windows has a different logic and is guarded by another test

#[cfg(not(windows))]
let err_msg = "cksum: d: Is a directory\n";
#[cfg(windows)]
let err_msg = "cksum: d: Permission denied\n";

Copy link
Contributor

Choose a reason for hiding this comment

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

could you please document this into the test ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link

GNU testsuite comparison:

GNU test failed: tests/timeout/timeout. tests/timeout/timeout is passing on 'main'. Maybe you have to rebase?
Congrats! The gnu test tests/tail/assert is no longer failing!
Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

Copy link

GNU testsuite comparison:

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

Copy link
Collaborator

@RenjiSann RenjiSann left a comment

Choose a reason for hiding this comment

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

Please fixup the second and third commits into the first one, for better readability after merge.
Other than that, LGTM 👍

Comment on lines +618 to +620
// if any incorrectly formatted line, show it
cksum_output(&res, status);

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a specific reason for moving this up ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As shown in the code snippet in #6796 :

$ ../../../gnu/src/cksum -c CHECKSUM --ignore-missing
../../../gnu/src/cksum: dir: Is a directory
dir: FAILED open or read
../../../gnu/src/cksum: WARNING: 1 listed file could not be read
../../../gnu/src/cksum: CHECKSUM: no file was verified

warnings in cksum_output show up first, and CHECKSUM: no file was verified shows up later.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Right, indeed 👍

/// Windows has a different logic and is guarded by [`test_check_directory_error`].
#[cfg(not(windows))]
#[test]
fn test_check_error_handling() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd rename this test_check_failed_to_read, to be a bit more specific.

@Luv-Ray Luv-Ray force-pushed the cksum_error_handling branch from 47a28ed to d5cc3dd Compare October 22, 2024 12:20
@cakebaker cakebaker merged commit c4160f2 into uutils:main Oct 22, 2024
68 checks passed
@cakebaker
Copy link
Contributor

Thanks @Luv-Ray and @RenjiSann !

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: error handling deviation from GNU

4 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载