-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestcases_dir.sh
43 lines (29 loc) · 1.12 KB
/
testcases_dir.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
dir=dir
filename=file.txt
rm -rf $dir
mkdir $dir
echo -e "\033[32m getfattr -n user.has_integrity $dir; \033[00m"
getfattr -n user.has_integrity $dir;
echo -e "\033[32m setfattr -n user.has_integrity -v "0" $dir; \033[00m"
setfattr -n user.has_integrity -v "0" $dir;
attr -l $dir;
getfattr -n user.has_integrity $dir;
echo -e "\033[32m touch $dir/$filename; \033[00m"
rm -rf $dir/$filename;
touch $dir/$filename;
attr -l $dir/$filename
echo -e "\033[32m setfattr -n user.has_integrity -v "1" $dir; \033[00m"
setfattr -n user.has_integrity -v "1" $dir;
attr -l $dir;
getfattr -n user.has_integrity $dir;
echo -e "\033[32m touch $dir/$filename; \033[00m"
rm -rf $dir/$filename;
touch $dir/$filename;
attr -l $dir/$filename
echo -e "\033[32m setfattr -n user.has_integrity -v "0" $dir/$filename; \033[00m"
setfattr -n user.has_integrity -v "0" $dir/$filename;
getfattr -n user.has_integrity $dir/$filename;
getfattr -n user.integrity_val $dir/$filename;
echo -e "\033[32m setfattr -n user.has_integrity -v "1" $dir/$filename; \033[00m"
setfattr -n user.has_integrity -v "1" $dir/$filename;
getfattr -n user.integrity_val $dir/$filename;