Commit Graph

362 Commits

Author SHA1 Message Date
renovate[bot] 1a8d7f96a6 chore(deps): update codecov/codecov-action action to v7 (#240)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-07 09:08:29 +02:00
renovate[bot] 53599ccd40 chore(deps): update rust crate libfuzzer-sys to v0.4.13 2026-06-05 07:24:05 +02:00
renovate[bot] 9bc64f03ed chore(deps): update rust crate chrono to v0.4.45 2026-06-05 07:17:21 +02:00
Marc Herbert d266f9b90e CI: remove echo "/opt/homebrew/opt/gpatch/libexec/gnubin" >> "$GITHUB_PATH" (#234)
This is not needed now that tests automatically look for `gpatch` on mac
since commit 1254f146f8 ("tests: validate "patch" and "ed" commands
once, print meaningful messages (#226)")

The fewer PATH changes, the better.

Signed-off-by: Marc Herbert <Marc.Herbert@gmail.com>
2026-06-03 14:13:10 +02:00
Marc Herbert ec3428b48f tests: fix "gpatch --version" error message on mac (#235)
When we fail to find `gpatch`, don't say that we failed to find `patch`.

Cosmetic fix to commit 1254f146f8 ("tests: validate "patch" and "ed"
commands once, print meaningful messages (#226)")

This is an extremely minor fix because the error message already printed
"gpatch validation failed, no such file or directory" even before this
commit.

Signed-off-by: Marc Herbert <Marc.Herbert@gmail.com>
2026-06-03 14:11:51 +02:00
oech3 58da229c09 support prefixed names (#231) 2026-06-03 14:11:29 +02:00
Sylvestre Ledru 250f935efe Add CONTRIBUTING.md pointing to the review guidelines 2026-05-30 10:07:54 +02:00
Marc Herbert 1254f146f8 tests: validate "patch" and "ed" commands once, print meaningful messages (#226)
macOS' /usr/bin/patch and GNU patch have very subtle incompatibilities
that cause only some "more advanced" tests to fail in obscure and very
time-consuming ways - while other tests pass. In some cases (depending
on test threads racing), the lack of newlines in some test data even
causes the whole test suite to stall.

This fix runs `patch -version` (only once), makes sure the output starts
with "GNU patch" and shows a meaningful assert message when not. It also
looks for `gpatch` instead of `patch` on macOS and shows a meaningful
assert message if either is missing.

Fixes: #225

This also provides faster and better feedback when `ed` is missing (see
#39) and implements a portable and basic check.

Last but not least, this new code is generic enough to support the
validation of any other test dependency in the future.
2026-05-24 17:08:52 +02:00
renovate[bot] c1943c5abb chore(deps): update rust crate divan to v4.7.0 2026-05-23 07:09:07 +02:00
Gunter Schmidt d33aca1fff cmp Feat: change data type for 'bytes' limit and 'ignore initial' to u64 (#183)
* feat: u64 for --bytes and --ignore-initial

fix: bumped up tempfile to "3.26.0"

The variables for --bytes, --ignore-initial and line count where size 'usize',
thus limiting the readable bytes on 32-bit systems.
GNU cmp is compiled with LFS (Large File Support) and allows i64 values.

This is now all u64, which works also on 32-bit systems with Rust.
There is no reason to implement a 32-bit barrier for 32 bit machines.

Additionally the --bytes limit can be set to 'u128' using the feature
"cmp_bytes_limit_128_bit".

The performance impact would be negligible, as there only few calculations
each time a full block is read from the file.


---------

Co-authored-by: Gunter Schmidt <gsgit@beadsoft.de>
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2026-05-14 23:13:02 +02:00
renovate[bot] 649179069c chore(deps): update dawidd6/action-download-artifact action to v21 2026-05-14 10:29:01 +02:00
Daniel Hofstetter 9fe96ed5e9 Make compare_test_results.py executable 2026-05-14 10:25:48 +02:00
pocopepe 2c47ea9f04 feat: add gnu testsuite tracking workflows 2026-05-14 09:42:26 +02:00
Daniel Hofstetter 9a7a727da4 Fix end of some files 2026-05-14 09:41:36 +02:00
Daniel Hofstetter a24b0c391e ci: add .pre-commit-config.yaml 2026-05-14 09:41:36 +02:00
xtqqczze 3f2c8678da actions: add security audit workflow 2026-05-14 09:41:25 +02:00
Marc Herbert d73fa831b0 tests: fix "old" names in generated patch files
Fixes #223. Very simple reproduction

```
cd diffutils
mkdir a
touch a/alef  a/alefn  a/alef_  a/alefx  a/alefr  a/fuzz.file
cargo test
```
 => fail

https://www.gnu.org/software/diffutils/manual/html_node/Multiple-Patches.html
states that the "old" file name has precedence over the "new" filename.

I hit this problem because some other (and unfortunately: unknown for
now) test issue left bogus `a/alef*` file(s) behind in my workspace. I
didn't bother cleaning them up because I assumed some test would keep
recreating them and that cost me a lot of time.

This issue seems to have existed since the very first commit.
Interestingly, there as a previous attempt in 2024 to fix this in commit
a3a372ff36 ! So I was apparently not the only affected. BUT that
fix was immediately reverted by commit ba7cb0aef9 in the same
PR. Admittedly, that fix seemed somewhat off-topic in
https://github.com/uutils/diffutils/pull/33. So here it is again.
2026-05-13 14:02:35 +02:00
renovate[bot] be90f75e68 chore(deps): update rust crate assert_cmd to v2.2.2 2026-05-12 09:13:23 +02:00
oech3 259e51d0d4 *.yml: dedup env: 2026-05-09 16:56:20 +02:00
xtqqczze da98437b08 chore: add COPYRIGHT file and update license references
- move copyright information from LICENSE-* files to COPYRIGHT
- use some improved wording used by the Rust project
2026-05-09 16:48:09 +02:00
xtqqczze 54db7b0b3e Add SECURITY.md
Copied from https://github.com/uutils/coreutils/blob/5e974797bd8050c2d425a706670254ad0323404d/SECURITY.md

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2026-05-09 16:44:14 +02:00
renovate[bot] c811142a6c chore(deps): update rust crate divan to v4.6.0 2026-04-28 16:05:06 +02:00
pocopepe 4043bb1928 skip --help args in fuzz_cmp_args since it causes process exit 2026-04-21 10:25:34 +02:00
pocopepe d11f672d29 fix: fuzz targets missing target dir and silent CI failures 2026-04-21 10:25:34 +02:00
oech3 37abce4eab Add CI for wasm32 (#218)
Co-authored-by: oech3 <>
2026-04-19 11:05:03 +02:00