From 1016b53f61b859439ac4393a4172a4612856885e Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 19 Jan 2009 23:57:10 +0100 Subject: [PATCH] tests: cleanup ts/ipcs Signed-off-by: Karel Zak --- tests/functions.sh | 2 +- tests/ts/ipcs/functions.sh | 6 +++--- tests/ts/ipcs/headers | 6 ++---- tests/ts/ipcs/limits | 7 ++++--- tests/ts/ipcs/limits2 | 3 ++- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/functions.sh b/tests/functions.sh index 903f4ba2..6dbbeb77 100644 --- a/tests/functions.sh +++ b/tests/functions.sh @@ -80,7 +80,7 @@ function ts_init { TS_OUTDIR="$TS_TOPDIR/output/$TS_COMPONENT" TS_OUTPUT="$TS_OUTDIR/$TS_TESTNAME" - TS_DIFFDIR="$TS_DIFFDIR/diff/$TS_COMPONENT" + TS_DIFFDIR="$TS_TOPDIR/diff/$TS_COMPONENT" TS_DIFF="$TS_DIFFDIR/$TS_TESTNAME" TS_EXPECTED="$TS_TOPDIR/expected/$TS_NS" TS_MOUNTPOINT="$TS_OUTDIR/${TS_TESTNAME}-mnt" diff --git a/tests/ts/ipcs/functions.sh b/tests/ts/ipcs/functions.sh index ff35e75e..d742d8ef 100644 --- a/tests/ts/ipcs/functions.sh +++ b/tests/ts/ipcs/functions.sh @@ -38,9 +38,9 @@ IPCS_KERNEL_CMD=( # data from the ipcs command IPCS_CMD=( - "$TS_CMD_IPCS -m -l | $AWK '/max number of segments/ { print \$6 }'" - "$TS_CMD_IPCS -m -l | $AWK '/max total shared memory/ { print \$7 }'" - "$TS_CMD_IPCS -m -l | $AWK '/max seg size/ { print \$6 }'" + "$TS_CMD_IPCS -m -l | awk '/max number of segments/ { print \$6 }'" + "$TS_CMD_IPCS -m -l | awk '/max total shared memory/ { print \$7 }'" + "$TS_CMD_IPCS -m -l | awk '/max seg size/ { print \$6 }'" ) diff --git a/tests/ts/ipcs/headers b/tests/ts/ipcs/headers index 8a391d0c..53bc3d1a 100755 --- a/tests/ts/ipcs/headers +++ b/tests/ts/ipcs/headers @@ -15,12 +15,10 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -. ./commands.sh -. ./functions.sh - -TS_COMPONENT="ipcs" +TS_TOPDIR="$(dirname $0)/../.." TS_DESC="headers" +. $TS_TOPDIR/functions.sh ts_init "$*" ts_log "test: shm headers" diff --git a/tests/ts/ipcs/limits b/tests/ts/ipcs/limits index 0fb31606..c4efb9cc 100755 --- a/tests/ts/ipcs/limits +++ b/tests/ts/ipcs/limits @@ -15,14 +15,15 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -. ./commands.sh -. ./functions.sh -TS_COMPONENT="ipcs" +TS_TOPDIR="$(dirname $0)/../.." TS_DESC="limits overflow" +. $TS_TOPDIR/functions.sh + ts_init "$*" ts_skip_nonroot + . $TS_SELF/functions.sh ts_log "load original values" diff --git a/tests/ts/ipcs/limits2 b/tests/ts/ipcs/limits2 index 17c3c702..db2ca2b9 100755 --- a/tests/ts/ipcs/limits2 +++ b/tests/ts/ipcs/limits2 @@ -16,9 +16,10 @@ # GNU General Public License for more details. # +TS_TOPDIR="$(dirname $0)/../.." TS_DESC="basic limits" -. ./functions.sh +. $TS_TOPDIR/functions.sh ts_init "$*" . $TS_SELF/functions.sh -- 2.39.5