File: test_readdir.in

package info (click to toggle)
lxcfs 6.0.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 716 kB
  • sloc: ansic: 10,144; sh: 757; makefile: 37; python: 32
file content (31 lines) | stat: -rwxr-xr-x 573 bytes parent folder | download | duplicates (4)
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
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1+

set -eu
[ -n "${DEBUG:-}" ] && set -x

PASS=0
UUID=$(uuidgen)

cleanup() {
    [ "$PASS" = "1" ] || (echo FAIL && exit 1)
}

LXCFSDIR=${LXCFSDIR:-/var/lib/lxcfs}

trap cleanup EXIT HUP INT TERM

if ! mountpoint -q ${LXCFSDIR}; then
    echo "lxcfs isn't mounted on ${LXCFSDIR}"
    exit 1
fi

TESTCASE="Stress readdir"
echo "==> Checking for cpuset cgroups"
if [ -d /sys/fs/cgroup/cpuset ]; then
   for i in `seq 1 1000`;do ls -al "${LXCFSDIR}/cgroup/cpuset" >/dev/null; done
else
   echo "==> Skipping $TESTCASE"
fi

PASS=1