forked from skorokithakis/python-fuse-sample
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.sh
55 lines (47 loc) · 1.24 KB
/
test.sh
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env bash
set -eu
hr() {
echo "======================================" >>$log
}
dumb_and_dangerous() {
hr
printf "\n" >>$log
hr
for x; do
printf "%s " "$x" >>$log
done
printf "\n" >>$log
hr
sleep .1
eval "$@" >/dev/null
}
#log=log/$$.log
log=/dev/stdout
printf "\n\n" >>$log
hr
echo "TEST RUN" >>$log
date >>$log
(python3 passthrough.py /real /fuse >>$log) &
(python3 passthrough.py /real2 /fuse2 >>$log) &
dumb_and_dangerous touch /fuse/touched
dumb_and_dangerous touch /fuse/touched
dumb_and_dangerous ls /fuse/touched
dumb_and_dangerous ls /fuse/
dumb_and_dangerous rm /fuse/touched
dumb_and_dangerous echo "xxx" \> /fuse/echo
dumb_and_dangerous ls /fuse/echo
dumb_and_dangerous cat /fuse/echo
dumb_and_dangerous mv /fuse/echo /fuse/mv
dumb_and_dangerous mv /fuse/mv /fuse2/mv
#dumb_and_dangerous mv /fuse/mv /fuse2/mv
dumb_and_dangerous cp /fuse2/mv /fuse2/cp
dumb_and_dangerous cp /fuse2/cp /fuse/cp
dumb_and_dangerous chmod 777 /fuse2/cp
dumb_and_dangerous chown root:root /fuse2/cp
dumb_and_dangerous mkdir /fuse/aaa
dumb_and_dangerous mkdir -p /fuse/a/b/c
dumb_and_dangerous rm -rf /fuse/aaa
dumb_and_dangerous ln -s /fuse/cp /fuse/cp-sl
dumb_and_dangerous ln -s /fuse/cp /fuse2/cp-sl
dumb_and_dangerous ln /fuse/cp /fuse/cp-hl
hr