]> git.proxmox.com Git - mirror_lxcfs.git/blob - tests/test_read_proc.sh
Release LXCFS 6.0.0
[mirror_lxcfs.git] / tests / test_read_proc.sh
1 #/bin/bash -eux
2 #./lxcfs -s -f -d -o allow_other -o direct_io ${DIR}
3
4 red_c() {
5 echo -e $2 "\e[31;1m${1}\e[0m"
6 }
7 DIR=${LXCFSDIR:-/var/lib/lxcfs}
8
9 if ! mountpoint -q $DIR; then
10 echo "lxcfs isn't mounted on ${DIR}"
11 exit 1
12 fi
13
14
15 PWD=`pwd`
16 COUNT=3
17
18 for i in test-read
19 do
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
27
28 red_c "$BIN test meminfo"
29 $BIN $DIR/proc/meminfo $COUNT
30 done
31 exit 0