mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-19 02:29:40 +00:00
Revert "stress2: Replace rename() with arc4random()"
This reverts commit f65d0b18d9
.
Misleading commit message
This commit is contained in:
parent
9a4813e1dc
commit
cb53f83d8a
@ -137,7 +137,7 @@ write_file(void)
|
||||
unlink(path);
|
||||
}
|
||||
|
||||
fprintf(fp, "blah blah blah garbage %ld\n", (long)arc4random());
|
||||
fprintf(fp, "blah blah blah garbage %ld\n", random());
|
||||
fclose(fp);
|
||||
if (rename(path, filename) < 0) {
|
||||
warn("rename");
|
||||
@ -150,7 +150,7 @@ random_sleep(int base, int slop)
|
||||
{
|
||||
long val;
|
||||
|
||||
val = arc4random() % slop;
|
||||
val = random() % slop;
|
||||
usleep(base + val);
|
||||
}
|
||||
|
||||
|
@ -886,12 +886,11 @@ test(void)
|
||||
{
|
||||
unsigned long offset;
|
||||
unsigned long size = maxoplen;
|
||||
unsigned long rv;
|
||||
unsigned long rv = random();
|
||||
unsigned long op = rv % (3 + !lite + mapped_writes);
|
||||
|
||||
/* turn off the map read if necessary */
|
||||
|
||||
arc4random_buf(&rv, sizeof(rv));
|
||||
if (op == 2 && !mapped_reads)
|
||||
op = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user