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 test vectors #733

Merged
merged 3 commits into from
Dec 12, 2023
Merged

Update test vectors #733

merged 3 commits into from
Dec 12, 2023

Conversation

ffranr
Copy link
Contributor

@ffranr ffranr commented Dec 11, 2023

Includes files modified from running make test-vector-check.

@guggero
Copy link
Member

guggero commented Dec 11, 2023

Hmm, I think I know what's going on... It's as simple as having a test name substring collision...
We're running the following commands in gen-deterministic-test-vectors:

	make unit gen-test-vectors=true pkg=mssmt case=TestReplaceWithEmptyBranch
	make unit gen-test-vectors=true pkg=mssmt case=TestReplace

But since the case variable ends up in -test.run=Test... variable, which is a regular expression, when we run case=TestReplace we run both TestReplaceWithEmptyBranch and TestReplace but within the same process, which then means they're pulling from the same randomness source.

So I think the following patch should make things stable again (after running another make gen-deterministic-test-vectors):
diff.txt

This change ensures that running the `TestReplace` test will not run
any other tests at the same time. It is necessary to run tests
separately and sequentially when generating test vectors. Otherwise, the
random data generator will not be sampled deterministically for a given
seed.
Copy link
Member

@guggero guggero left a comment

Choose a reason for hiding this comment

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

Nice, LGTM 🎉

Copy link
Member

@guggero guggero left a comment

Choose a reason for hiding this comment

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

Stricter matching vs. renaming is a good idea, I like the second approach too 👍

@ffranr ffranr requested a review from GeorgeTsagk December 12, 2023 12:40
Copy link
Member

@GeorgeTsagk GeorgeTsagk left a comment

Choose a reason for hiding this comment

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

LGTM!

@ffranr ffranr added this pull request to the merge queue Dec 12, 2023
Merged via the queue into lightninglabs:main with commit 3b71255 Dec 12, 2023
14 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.

3 participants