]> git.proxmox.com Git - mirror_lxcfs.git/blobdiff - tests/test_read_proc.sh
Merge pull request #190 from brauner/2017-06-12/bugfixes
[mirror_lxcfs.git] / tests / test_read_proc.sh
index de95c1e85b26db308a0bc1ec287ba279b935ee14..f24d21808fe9fefba4707967e26da2493138b47e 100755 (executable)
@@ -1,13 +1,13 @@
-#/bin/bash
-#./lxcfs -s -f -d -o allow_other -o direct_io /var/lib/lxcfs
+#/bin/bash -eux
+#./lxcfs -s -f -d -o allow_other -o direct_io ${DIR}
 
 red_c() {
      echo -e $2 "\e[31;1m${1}\e[0m"
 }
-DIR=/var/lib/lxcfs
+DIR=${LXCFSDIR:-/var/lib/lxcfs}
 
 if ! mountpoint -q $DIR; then
-    echo "lxcfs isn't mounted on /var/lib/lxcfs"
+    echo "lxcfs isn't mounted on ${DIR}"
     exit 1
 fi
 
@@ -24,9 +24,8 @@ do
 
        red_c "$BIN test stat"
        $BIN $DIR/proc/stat $COUNT
-       
+
        red_c "$BIN test meminfo"
        $BIN $DIR/proc/meminfo $COUNT
-       
 done
 exit 0