Skip to content
Snippets Groups Projects
Verified Commit ea1525a2 authored by georg's avatar georg
Browse files

CI: Introduce entropy script

parent 00cbacdd
No related tags found
No related merge requests found
......@@ -34,9 +34,10 @@ cache:
script:
- eatmydata gem install bundler --no-ri --no-rdoc
- eatmydata bundle install --jobs $(nproc) --path vendor
- rm /dev/random && ln -s /dev/urandom /dev/random
- utils/ci/entropy.sh &
- SCHLEUDER_ENV=test SCHLEUDER_CONFIG=spec/schleuder.yml eatmydata bundle exec rake db:init
- eatmydata bundle exec rspec
- pkill -f entropy.sh
codespell:
image: debian:unstable
......
#!/usr/bin/env python
# For testing purposes only
# DO NOT USE THIS, THIS DOES NOT PROVIDE ENTROPY TO /dev/random, JUST BYTES
import fcntl
import time
import struct
RNDADDENTROPY=0x40085203
while True:
random = "3420348024823049823-984230942049832423l4j2l42j"
t = struct.pack("ii32s", 8, 32, random)
with open("/dev/random", mode='wb') as fp:
# as fp has a method fileno(), you can pass it to ioctl
res = fcntl.ioctl(fp, RNDADDENTROPY, t)
time.sleep(0.001)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment