tests: clean up the testing scripts
Do some cleanups to the testing scripts. Signed-off-by: WANG Cong <wangcong@zeuux.org>
This commit is contained in:
parent
7177d32ecf
commit
f0b561b632
|
@ -22,14 +22,14 @@ TS_VERBOSE="no"
|
||||||
|
|
||||||
function ts_skip {
|
function ts_skip {
|
||||||
echo " IGNORE ($1)"
|
echo " IGNORE ($1)"
|
||||||
if [ -n "$2" ] && [ -b "$2" ]; then
|
if [ -n "$2" -a -b "$2" ]; then
|
||||||
ts_device_deinit "$2"
|
ts_device_deinit "$2"
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
function ts_skip_nonroot {
|
function ts_skip_nonroot {
|
||||||
if [ $UID != 0 ]; then
|
if [ $UID -ne 0 ]; then
|
||||||
ts_skip "not root permissions"
|
ts_skip "not root permissions"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,14 +21,10 @@
|
||||||
TS_COMPONENT="ipcs"
|
TS_COMPONENT="ipcs"
|
||||||
TS_DESC="limits overflow"
|
TS_DESC="limits overflow"
|
||||||
|
|
||||||
if [ $UID != 0 ]; then
|
|
||||||
ts_init "$*"
|
|
||||||
ts_skip_nonroot
|
|
||||||
fi
|
|
||||||
|
|
||||||
. ./ts-ipcs.sh
|
. ./ts-ipcs.sh
|
||||||
|
|
||||||
ts_init "$*"
|
ts_init "$*"
|
||||||
|
ts_skip_nonroot
|
||||||
|
|
||||||
ts_log "load original values"
|
ts_log "load original values"
|
||||||
for i in $IPCS_IDX; do
|
for i in $IPCS_IDX; do
|
||||||
|
|
|
@ -26,12 +26,12 @@ MOUNTER="/sbin/mount.mytest"
|
||||||
ts_init "$*"
|
ts_init "$*"
|
||||||
ts_skip_nonroot
|
ts_skip_nonroot
|
||||||
|
|
||||||
cat > $MOUNTER << EOF
|
cat > $MOUNTER <<\EOF
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# This util-linux-ng regression test component
|
# This util-linux-ng regression test component
|
||||||
# It's safe to remove me...
|
# It's safe to remove me...
|
||||||
#
|
#
|
||||||
echo "\$0 called with \"\$*\""
|
echo "$0 called with \"$*\""
|
||||||
EOF
|
EOF
|
||||||
chmod +x $MOUNTER
|
chmod +x $MOUNTER
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue