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

update fuzztest #1112

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

update fuzztest #1112

wants to merge 7 commits into from

Conversation

pca006132
Copy link
Collaborator

It seems that it now builds fine with the latest version of fuzztest.

Copy link

codecov bot commented Dec 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.54%. Comparing base (25ce1b1) to head (ea188db).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1112      +/-   ##
==========================================
+ Coverage   91.46%   91.54%   +0.07%     
==========================================
  Files          30       30              
  Lines        5908     5904       -4     
==========================================
+ Hits         5404     5405       +1     
+ Misses        504      499       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pca006132
Copy link
Collaborator Author

OK managed to get a simple self-intersection example...

Copy link
Owner

@elalish elalish left a comment

Choose a reason for hiding this comment

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

Thanks!

test/manifold_fuzz.cpp Outdated Show resolved Hide resolved
case Transform::Scale:
cube = cube.Scale({std::get<0>(transform.second),
std::get<1>(transform.second),
std::get<2>(transform.second)});
Copy link
Owner

Choose a reason for hiding this comment

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

Might this be simpler if we just use cube.Transform?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm using three different transforms to try to get the fuzzer to produce something that is simpler. We can look into that later after the current issue is fixed, I guess.

}
}

FUZZ_TEST(ManifoldFuzz, SimpleCube).WithDomains(CsgDomain);
Copy link
Owner

Choose a reason for hiding this comment

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

Does this use the same random seed every time or different? If it fails, will it spit out all the info we need to create a deterministic test?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is different every time, but we can override that to replay the fuzzing process. It will spit out the info needed for the test when using the minimizer script, I will document it.

add_executable(manifold_fuzz manifold_fuzz.cpp)
target_link_libraries(manifold_fuzz PUBLIC manifold)
link_fuzztest(manifold_fuzz)
gtest_discover_tests(manifold_fuzz)
Copy link
Owner

Choose a reason for hiding this comment

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

Are we going to enable MANIFOLD_FUZZ on the CI?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, this is something that runs indefinitely, and non-deterministically. So this is probably something we want to run in our own machines.

test/manifold_fuzz.cpp Outdated Show resolved Hide resolved
@@ -421,3 +421,15 @@ TEST(Boolean, Precision2) {
cube2 = cube2.Translate(vec3(scale * kPrecision));
EXPECT_FALSE((cube ^ cube2).IsEmpty());
}

TEST(Boolean, SimpleCubeRegression) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@elalish it is now here.

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