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

Tracking issue: test suite #6

Open
2 of 8 tasks
jaromil opened this issue Jan 9, 2018 · 6 comments
Open
2 of 8 tasks

Tracking issue: test suite #6

jaromil opened this issue Jan 9, 2018 · 6 comments

Comments

@jaromil
Copy link
Contributor

jaromil commented Jan 9, 2018

Still to do:

  • Create functional tests (call randombytes twice, check if output differs)
  • Write a mocking test suite (using cmocka a home-brewed mocking framework)

Platforms:

  • windows: use Appveyor (only builds)
  • linux<3.17 (/dev/urandom): use Travis
  • linux>=3.17 (getrandom): use Travis?
  • osx: use Travis
  • bsd: ??
  • node: Use Travis (d4a32f8)

Original report:

Hi there again :^) thanks for sharing this pretty clean and handy implementation. Have you thought of adding a test suite that helps measuring the entropy on each system it is ran? This library may be of help https://github.com/dyne/libdisorder

@dsprenkels
Copy link
Owner

Sorry, but unfortunately I do not think measuring entropy will be particularly useful. Shannon entropy does not guarantee the cryptographic properties of a random generator. I think an entropy test would give (if anything) only a false sense of security).

I agree that this library should include test cases though.

@jaromil jaromil changed the title test suite measuring Shannon entropy test suite Jan 9, 2018
@dsprenkels
Copy link
Owner

As an update to this, I suggest we (I?) could use CMocka for testing C objects. The hard part will be to get a cluster of build targets though. Perhaps use Buildbot?

@jaromil
Copy link
Contributor Author

jaromil commented Mar 26, 2018

I can help to setup a travis build to covers linux, osx and nodejs targets. No idea how to automate windows or bsd.

@dsprenkels
Copy link
Owner

For Windows I would like to keep using Appveyor. For Linux we will want to build on linux<3.17 and linux>=3.17 (not sure how to do this on Travis). We already have osx (which is working fine).

A Node.js target on Travis would be helpful.

@dsprenkels dsprenkels changed the title test suite Tracking issue: test suite Dec 18, 2018
@dsprenkels
Copy link
Owner

Update: Travis CI seems to have been discontinued. We have to find an alternative.

@jaromil
Copy link
Contributor Author

jaromil commented Sep 13, 2021

Hi Dan! I am using github actions with succes and our own in-house jenkins for exotic targets that aren't covered.

Also about tests, using randombytes in zenroom I setup another kind of test measuring the average hamming distance between a large number of iterations, perhaps interesting.

I wish to contribute something in these directions, will try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants