Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
tests/lib: introduce helpers for setting up /dev/random using /dev/urandom in project prepare #4354
Conversation
| + mknod /dev/random c 1 9 | ||
| +} | ||
| + | ||
| +restore_dev_random() { |
zyga
Dec 5, 2017
Contributor
This is probably not correct since some distributions don't use proper random devices. We should probably mv /dev/random /dev/random.bak or .orig and then mv them back.
In any case, this is my suggestion, LGTM
codecov-io
commented
Dec 5, 2017
•
Codecov Report
@@ Coverage Diff @@
## master #4354 +/- ##
=======================================
Coverage 78.05% 78.05%
=======================================
Files 450 450
Lines 30899 30899
=======================================
Hits 24118 24118
Misses 4772 4772
Partials 2009 2009Continue to review full report at Codecov.
|
| @@ -252,30 +252,6 @@ EOF | ||
| systemctl start snapd.socket | ||
| fi | ||
| - if [[ "$SPREAD_SYSTEM" == debian-* || "$SPREAD_SYSTEM" == ubuntu-* ]]; then |
| + # keep the original /dev/random around | ||
| + mv /dev/random /dev/random.orig | ||
| + # same as /dev/urandom | ||
| + mknod /dev/random c 1 9 |
bboozzoo
added some commits
Dec 8, 2017
|
Well, at least it didn't timeout this time. The tasks that were getting stuck before, all passed now. What has failed is:
Looks unrelated, so I've restarted the build. |
|
FWIW, the travis job was filing before as the create-key/snap-sign/completion prepare were taking too long. Collected debug output suggests that the /dev/random node was not changed at all. This is either the Debug log in question:
|
bboozzoo commentedDec 5, 2017
The hosts used for testing may run out of entropy in /dev/random, thus causing
any crypto operations to potentially block. Since we do not need a high quality
RNG source for the tests, set up /dev/random to be the same as /dev/urandom in
project prepare and restore it back to the proper state in project restore
phase.