-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathcreate_test.bash
executable file
·36 lines (34 loc) · 1.37 KB
/
create_test.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
set -ex
rm -rf testing
for (( a=0; a<1; a++ ))
do
empty=$(xxd -l 1 -c 1 -p < /dev/random)
mkdir -p testing/$empty
empty=$(xxd -l 1 -c 1 -p < /dev/random)
mkdir -p testing/$empty
parent=$(xxd -l 1 -c 1 -p < /dev/random)
for (( b=0; b<5; b++ ))
do
child1=$(xxd -l 1 -c 1 -p < /dev/random)
for (( c=0; c<1; c++ ))
do
child2=$(xxd -l 1 -c 1 -p < /dev/random)
mkdir -p testing/$parent/$child1/$child2
file=$(xxd -l 1 -c 1 -p < /dev/random)
dd if=/dev/random of=testing/$parent/$child1/$child2/$file bs=5 count=1
file=$(xxd -l 1 -c 1 -p < /dev/random)
dd if=/dev/random of=testing/$parent/$child1/$child2/$file bs=5 count=1
file=$(xxd -l 16 -c 16 -p < /dev/random)
dd if=/dev/random of=testing/$parent/$child1/$child2/$file bs=5 count=1
file=$(xxd -l 16 -c 16 -p < /dev/random)
dd if=/dev/random of=testing/$parent/$child1/$child2/$file bs=500 count=1
file=$(xxd -l 16 -c 16 -p < /dev/random)
dd if=/dev/random of=testing/$parent/$child1/$child2/$file bs=1000 count=1
file=$(xxd -l 16 -c 16 -p < /dev/random)
dd if=/dev/random of=testing/$parent/$child1/$child2/file2 bs=131100 count=1
done
done
done
rm -rf out.squashfs
mksquashfs testing out.squashfs -comp xz