]> git.proxmox.com Git - mirror_lxcfs.git/blame - tests/test_read_proc.sh
pam_cgfs: improve cg_filter_and_set_cpus()
[mirror_lxcfs.git] / tests / test_read_proc.sh
CommitLineData
1c511f26
SH
1#/bin/bash -eux
2#./lxcfs -s -f -d -o allow_other -o direct_io ${DIR}
97f1f27b
YY
3
4red_c() {
5 echo -e $2 "\e[31;1m${1}\e[0m"
6}
1c511f26 7DIR=${LXCFSDIR:-/var/lib/lxcfs}
97f1f27b
YY
8
9if ! mountpoint -q $DIR; then
1c511f26 10 echo "lxcfs isn't mounted on ${DIR}"
97f1f27b
YY
11 exit 1
12fi
13
14
15PWD=`pwd`
16COUNT=3
17
18for i in test-read
19do
20 BIN=$PWD/$i
21
22 red_c "$BIN test cpuinfo"
23 $BIN $DIR/proc/cpuinfo $COUNT
24
25 red_c "$BIN test stat"
26 $BIN $DIR/proc/stat $COUNT
e5e7d255 27
97f1f27b
YY
28 red_c "$BIN test meminfo"
29 $BIN $DIR/proc/meminfo $COUNT
97f1f27b
YY
30done
31exit 0