devfs: add /dev/urandom and /dev/hwrng#7421
Conversation
|
|
Sorry for the very long delay in reviewing this PR. Feel free to squash |
2a8a778 to
5826a06
Compare
|
squashed, and added a test in devfs unittests. I don't have hardware with me right now, so I didn't run the /dev/hwrng unittest. |
jnohlgard
left a comment
There was a problem hiding this comment.
I don't think we can do any tests on the actual bytes that are produced by the read of the /dev/urandom, /dev/hwrng file, but only test to see that the return value from read is correct and that the bytes they are at least not all unchanged. We should not assume they are all changed though.
|
The unit tests completed successfully on Mulle, though the check needs to be changed to avoid false negatives depending on the hwrng data |
|
This is based on a quite old base commit, could you rebase please while fixing the unit test? |
5826a06 to
cf25c29
Compare
|
Fixed unittest (amended directly) and rebased. Tested on our hardware (stm32). |
|
Fixed auto init call from unittests |
jnohlgard
left a comment
There was a problem hiding this comment.
Looks good, what do you think about using a pseudomodule for the devfs nodes?
| TEST_ASSERT_EQUAL_INT(0, res); | ||
| } | ||
|
|
||
| static void test_devfs_urandom(void) |
There was a problem hiding this comment.
Rather unrelated, but this whole test suite should go into its own application.
|
Needs rebase. @gebart @vincent-d are there any plans to continue this? |
|
needs rebase |
|
@vincent-d still active and care to rebase this one? Just tested after rebasing, works -> would merge. |
|
@smlng active I am, though not much on RIOT recently ;) If it's simply a rebase, I can do. If it needs more changes, I'm afraid won't have time. |
|
rebased |
|
Please squash |
|
squashed |
|
@gebart not sure if you are available, but if so: please recheck and ACK or dismiss you review. I'll leave this open for a few days but would then dismiss your review and merge this. |
no response, but comments are addressed
|
@leandrolanzieri a pointer, as you were interested and said @jcarrano might find this useful, too. |
|
This requires having |
|
@cladmi: you refer to the fact that now fewer boards can run the unit tests, bc some do not have the required feature, right? That's kind of the problem with the monolithic unittest binary (IMHO)?! |
|
The release specs task And yes it is a problem with being monolithic. I will do a PR to split this test out for the release. |
This PR adds a
/dev/urandomfile to the devfs registry whenperiph_hwrngis available.