allow fuzzer disagreements where there are duplicated usedeps in the atom
All checks were successful
Gentoo Utils / build-oci-image (push) Successful in 19s
Gentoo Utils / check-format (push) Successful in 10s
Gentoo Utils / docs (push) Successful in 13s
Gentoo Utils / build (push) Successful in 24s
Gentoo Utils / test (push) Successful in 29s

Portage rejects atoms with duplicated usedeps that are otherwise
valid, gentoo-utils accepts these as valid however. So we will not
panic on cases of disagreement where the control side fails and we
detect duplicated usedeps.
This commit is contained in:
2025-12-14 02:53:49 +00:00
parent 90d67e3004
commit 87e9d1920c

View File

@@ -56,6 +56,16 @@ pub unsafe extern "C" fn LLVMFuzzerTestOneInput(input: *const u8, len: usize) ->
(Ok(_), Err(rest)) => {
panic!("disagreement on {str}\ncontrol:Ok\ngentoo-utils:Err({rest})");
}
(Err(_), Ok(atom))
if atom
.usedeps()
.iter()
.any(|usedep| atom.usedeps().iter().filter(|u| usedep == *u).count() > 1) =>
{
eprintln!(
"disagreement, but we will allow it since its probably because of duplicated usdeps"
);
}
(Err(_), Ok(_)) => {
panic!("disagreement on {str}\ncontrol:Err\ngentoo-utils:Ok")
}