Code readability improvements
This commit is contained in:
@@ -52,8 +52,7 @@ elif [[ $1 == "--performance" ]]; then
|
||||
else
|
||||
echo "Database protection will not be tested due to the lack of setuid capabilites."
|
||||
echo "To test it, run this script with '--setuid'."
|
||||
#valgrind --leak-check=full -s ../build/icfs -o default_permissions -o debug ./protected ./.pt.db 2>&1 | grep "==\|zenity\|Permission\|column\|callback\|SQLite" &
|
||||
valgrind --leak-check=full --show-leak-kinds=all -s ../build/icfs -o default_permissions ./protected ./.pt.db &
|
||||
valgrind --leak-check=full -s ../build/icfs -o default_permissions ./protected ./.pt.db &
|
||||
sleep 5
|
||||
fi
|
||||
|
||||
@@ -213,14 +212,10 @@ else
|
||||
echo "[ICFS-TEST]: permanent permissions database access was not tested due to the lack of seuid bit setting capabilites. To test this, run the script with '--setuid' flag"
|
||||
fi
|
||||
|
||||
# performance testing code
|
||||
|
||||
RUNS_NUM=500
|
||||
|
||||
if [[ $1 == '--performance' ]]; then
|
||||
|
||||
#warmup
|
||||
icfs_dialogue --set-fake-response yes
|
||||
parallel -j8 ::: "./stress.bash $RUNS_NUM openers/opener10"
|
||||
|
||||
icfs_dialogue --set-fake-response yes
|
||||
echo "[ICFS-TEST]: temp permissions"
|
||||
time parallel -j8 ::: "./stress.bash $RUNS_NUM openers/opener7"
|
||||
@@ -228,7 +223,6 @@ if [[ $1 == '--performance' ]]; then
|
||||
icfs_dialogue --set-fake-response yes_perm
|
||||
echo "[ICFS-TEST]: perm permissions"
|
||||
time parallel -j8 ::: "./stress.bash $RUNS_NUM openers/opener8"
|
||||
|
||||
fi
|
||||
|
||||
# unmount
|
||||
@@ -238,11 +232,9 @@ sleep 0.5
|
||||
umount "$(realpath ./protected)"
|
||||
sleep 3
|
||||
|
||||
# test the same thing, but without ICFS mounted
|
||||
|
||||
if [[ $1 == '--performance' ]]; then
|
||||
|
||||
#warmup
|
||||
parallel -j8 ::: "./stress.bash $RUNS_NUM openers/opener9"
|
||||
|
||||
echo "[ICFS-TEST]: bare filesystem"
|
||||
time parallel -j8 ::: "./stress.bash $RUNS_NUM openers/opener9"
|
||||
fi
|
||||
|
Reference in New Issue
Block a user