Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve fuzzer logging #7281

Merged
merged 2 commits into from
Feb 12, 2025
Merged

Conversation

RenjiSann
Copy link
Collaborator

While fuzzing, I had a hard time understanding the output, because of the number of tests and the lack of uniformity in the output.

This PR adds colored output to the logging (like for the diffs, for the test result, etc...)
Here is an example (sorry for the accessibility, but a screenshot is the only way to show the colored output)

image

Note: I have made little modifications to fuzz_cksum to fix some false positives and to further improve logs' readability, because it's the tool I am the most familiar with.

@RenjiSann RenjiSann force-pushed the renji/improve-fuzzer-log branch from e63f6e9 to 910c67a Compare February 8, 2025 00:12
Copy link

github-actions bot commented Feb 8, 2025

GNU testsuite comparison:

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

@sylvestre
Copy link
Contributor

Seems that you have unrelated changes in your pr

@RenjiSann
Copy link
Collaborator Author

Indeed, I pushed my dev environment :')

@sylvestre
Copy link
Contributor

it looks great :)

@RenjiSann RenjiSann force-pushed the renji/improve-fuzzer-log branch 2 times, most recently from d07797e to 046af8f Compare February 8, 2025 23:31
@RenjiSann RenjiSann force-pushed the renji/improve-fuzzer-log branch from 046af8f to e94e077 Compare February 8, 2025 23:33
Copy link

github-actions bot commented Feb 8, 2025

GNU testsuite comparison:

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

@RenjiSann
Copy link
Collaborator Author

@sylvestre I'll let you merge if you're happy with the changes !

@sylvestre
Copy link
Contributor

sorry, i didn't noticed that you cleaned it

};
use rand::Rng;
use std::env::temp_dir;
use std::fs::{self, File};
use std::io::Write;
use std::process::Command;

static CMD_PATH: &str = "cksum";
static CMD_PATH: &str = "../gnu/src/cksum";
Copy link
Contributor

Choose a reason for hiding this comment

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

It means that you need gnu + build it
Currently it is using the bin from the system

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

On my system, coreutils version is 9.5, so I am missing the recently added crc32b algorithm, which leads to many errors. IMO, it's better to fuzz against the same version of the GNU coreutils as the one we test against, but that's not a strong requirement for me, if it's too much work

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense but should be done in a different pr

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will do 👍

@RenjiSann RenjiSann force-pushed the renji/improve-fuzzer-log branch from e94e077 to 6afa515 Compare February 12, 2025 18:46
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/rm/rm2 is no longer failing!

@sylvestre sylvestre merged commit 9542e15 into uutils:main Feb 12, 2025
65 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