]> git.ipfire.org Git - thirdparty/util-linux.git/blame - tests/ts/ipcs/limits
tests: add missing ts_check_test_command calls
[thirdparty/util-linux.git] / tests / ts / ipcs / limits
CommitLineData
b30cd7ee
KZ
1#!/bin/bash
2
92f2c23e
KZ
3#
4# Copyright (C) 2007 Karel Zak <kzak@redhat.com>
5#
601d12fb 6# This file is part of util-linux.
92f2c23e
KZ
7#
8# This file is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 2 of the License, or
11# (at your option) any later version.
12#
13# This file is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
b30cd7ee 18
e130ce53 19TS_TOPDIR="${0%/*}/../.."
b30cd7ee
KZ
20TS_DESC="limits overflow"
21
1016b53f 22. $TS_TOPDIR/functions.sh
1d9acab1 23ts_init "$*"
2f791546
SK
24
25ts_check_test_command "$TS_CMD_IPCS"
19e00ec9 26ts_check_test_command "$TS_HELPER_SYSINFO"
2f791546 27
f0b561b6 28ts_skip_nonroot
12826d4c 29ts_check_prog "bc"
1016b53f 30
d42bbae5 31. $TS_SELF/functions.sh
b30cd7ee 32
a2db0b1a
RM
33ts_lock "ipcslimits"
34
57a917d6
KZ
35ts_log "load original values"
36for i in $IPCS_IDX; do
37 SHM_ORG[$i]=$(cat ${IPCS_PROCFILES[$i]})
38done >> $TS_OUTPUT
1d9acab1 39
9e930041 40ts_log "maximize kernel setting"
57a917d6
KZ
41for i in $IPCS_IDX; do
42 echo ${IPCS_LIMITS[$i]} >> ${IPCS_PROCFILES[$i]}
43done >> $TS_OUTPUT
b30cd7ee 44
7ef338f3 45ts_log "check for difference between kernel and IPC"
57a917d6 46ipcs_limits_check >> $TS_OUTPUT
b30cd7ee 47
57a917d6
KZ
48ts_log "write original values to kernel"
49for i in $IPCS_IDX; do
50 echo ${SHM_ORG[$i]} >> ${IPCS_PROCFILES[$i]}
51done >> $TS_OUTPUT
b30cd7ee
KZ
52
53ts_finalize
54