Commit 6f01881
committed
testsuite: fix random-generation of kvs archive files in t0021
Problem: the randbytes() function in t0021-archive-cmd.t uses
/dev/random to create files of size 128 and 2048 bytes, respectively.
However, /dev/random can be truncated at <128 bytes and, when it is,
the file created by dd will be as well. This causes a size mismatch
in the kvs, which causes tests 13, 14, and 18 to fail. This first
showed up in GitLab CI on TOSS 4.
We can instead utilize the /dev/urandom file, which is not truncated,
and thus guaranteed to create files of the proper sizes. Also, some
cleanup of t0021-archive-cmd.t is baked into this PR.
When merged, closes issue #5750.1 parent 74cc138 commit 6f01881
1 file changed
+2
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
| |||
15 | 13 | | |
16 | 14 | | |
17 | 15 | | |
18 | | - | |
| 16 | + | |
19 | 17 | | |
20 | 18 | | |
21 | 19 | | |
| |||
86 | 84 | | |
87 | 85 | | |
88 | 86 | | |
89 | | - | |
| 87 | + | |
90 | 88 | | |
91 | 89 | | |
92 | 90 | | |
| |||
0 commit comments