Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@naoNao89
Copy link
Contributor

@naoNao89 naoNao89 commented Oct 18, 2025

Add comprehensive tests for SHA3/SHAKE algorithm support

This PR adds comprehensive test coverage for SHA3 and SHAKE algorithms with the --length parameter.

The SHA3/SHAKE implementation was already merged into main. This PR ensures the algorithms are properly tested with various length parameters and edge cases.

Fixes #8933 (test coverage aspect)

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/cksum/cksum is no longer failing!

@sylvestre
Copy link
Contributor

Could you please add tests to make sure we don't regress in the future? Thanks

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/cksum/cksum is no longer failing!

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/rm/rm1 (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)
Congrats! The gnu test tests/cksum/cksum is no longer failing!

@naoNao89 naoNao89 force-pushed the fix-cksum-sha3-debug-8933 branch from 08769f4 to cbb156c Compare October 21, 2025 11:33
@sylvestre
Copy link
Contributor

please move the --debug implementation in a different PR

@naoNao89
Copy link
Contributor Author

sr, i missed pushing the commit from 8949 to 8948 🤡

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/cksum/cksum is no longer failing!

Copy link
Contributor

@sylvestre sylvestre left a comment

Choose a reason for hiding this comment

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

still need --debug move away

@naoNao89 naoNao89 closed this Oct 30, 2025
@naoNao89 naoNao89 force-pushed the fix-cksum-sha3-debug-8933 branch from 9016b78 to 514291d Compare October 30, 2025 05:31
@naoNao89 naoNao89 reopened this Oct 30, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 30, 2025

CodSpeed Performance Report

Merging #8948 will not alter performance

Comparing naoNao89:fix-cksum-sha3-debug-8933 (dee3483) with main (0058316)

Summary

✅ 125 untouched

@naoNao89 naoNao89 force-pushed the fix-cksum-sha3-debug-8933 branch from c177dec to d2ee583 Compare October 30, 2025 05:58
@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/cksum/cksum-base64. tests/cksum/cksum-base64 is passing on 'main'. Maybe you have to rebase?
Skipping an intermittent issue tests/misc/tee (passes in this run but fails in the 'main' branch)

@naoNao89 naoNao89 force-pushed the fix-cksum-sha3-debug-8933 branch 4 times, most recently from 3a9e52b to 6b1cf16 Compare October 30, 2025 06:51
@github-actions
Copy link

GNU testsuite comparison:

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

1 similar comment
@github-actions
Copy link

GNU testsuite comparison:

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

@naoNao89 naoNao89 force-pushed the fix-cksum-sha3-debug-8933 branch 2 times, most recently from dcb966d to fd5840a Compare October 31, 2025 12:09
@github-actions
Copy link

GNU testsuite comparison:

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

}

#[test]
fn test_sha3_with_length() {
Copy link
Contributor

Choose a reason for hiding this comment

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

This functionality is already tested by test_sha3_single_file.

naoNao89 added a commit to naoNao89/coreutils that referenced this pull request Nov 3, 2025
…ack)

- Remove test_sha3_with_length() - redundant with test_sha3_single_file()
- Remove test_sha3_invalid_length() - redundant with test_sha_length_invalid() and test_sha_missing_length()
- Remove test_sha3_untagged() - redundant with test_untagged_sha3_single_file()
- Keep test_sha3_base64_output() - provides unique coverage for base64 output with SHA3

Addresses code review feedback from @cakebaker (Oct 31) on PR uutils#8948.
All 134 tests pass with no regressions.
@github-actions
Copy link

github-actions bot commented Nov 3, 2025

GNU testsuite comparison:

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

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

GNU testsuite comparison:

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

@naoNao89 naoNao89 force-pushed the fix-cksum-sha3-debug-8933 branch from e92cfab to 204d05f Compare November 3, 2025 06:07
naoNao89 added a commit to naoNao89/coreutils that referenced this pull request Nov 3, 2025
This commit consolidates all changes for SHA3/SHAKE algorithm support:

Features:
- Add SHA3 and SHAKE algorithm support to cksum
- Support --length parameter for SHA3 (224, 256, 384, 512 bits)
- Support --length parameter for SHAKE (any length)
- Add base64 output support for SHA3/SHAKE

Tests:
- Add comprehensive test coverage for SHA3/SHAKE with various lengths
- Add tests for base64 output format
- Add tests for error cases (invalid lengths, missing length parameter)
- Remove redundant test coverage

Localization:
- Update English and French locale files with SHA3/SHAKE descriptions

Fixes PR uutils#8948 code review feedback from @cakebaker, @sylvestre, and @evilpie.
All 134 tests pass with no regressions.
@naoNao89 naoNao89 force-pushed the fix-cksum-sha3-debug-8933 branch from 204d05f to 661934b Compare November 3, 2025 06:16
@github-actions
Copy link

github-actions bot commented Nov 3, 2025

GNU testsuite comparison:

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

This commit consolidates all changes for SHA3/SHAKE algorithm support:

Features:
- Add SHA3 and SHAKE algorithm support to cksum
- Support --length parameter for SHA3 (224, 256, 384, 512 bits)
- Support --length parameter for SHAKE (any length)
- Add base64 output support for SHA3/SHAKE
- Add --debug flag (no-op matching GNU behavior)

Tests:
- Add comprehensive test coverage for SHA3/SHAKE with various lengths
- Add tests for base64 output format
- Add tests for error cases (invalid lengths, missing length parameter)
- Remove redundant test coverage

Localization:
- Update English and French locale files with SHA3/SHAKE descriptions

Fixes PR uutils#8948 code review feedback from @cakebaker, @sylvestre, and @evilpie.
All 134 tests pass with no regressions.
@naoNao89 naoNao89 force-pushed the fix-cksum-sha3-debug-8933 branch from 661934b to dee3483 Compare November 3, 2025 06:56
@github-actions
Copy link

github-actions bot commented Nov 3, 2025

GNU testsuite comparison:

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

@naoNao89 naoNao89 closed this by deleting the head repository Nov 6, 2025
@naoNao89 naoNao89 reopened this Nov 7, 2025
@github-actions
Copy link

github-actions bot commented Nov 7, 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.

cksum: Flag handling differences (--debug)

4 participants