]> git.proxmox.com Git - mirror_lxcfs.git/commitdiff
tests: Fix uptime check
authorStéphane Graber <stgraber@ubuntu.com>
Fri, 6 Mar 2020 08:45:45 +0000 (09:45 +0100)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 6 Mar 2020 13:02:45 +0000 (14:02 +0100)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
tests/test_proc

index c30d06f287ededfa89b8b744e14a55f09df51877..c20f3df81e77845a019e1185011ec968deec023c 100755 (executable)
@@ -37,7 +37,7 @@ echo $((64*1024*1024)) > ${mempath}/lxcfs_test_proc/memory.limit_in_bytes
 echo 0 > ${cpupath}/lxcfs_test_proc/cpuset.cpus
 
 # Test uptime
-[ "$(cat ${LXCFSDIR}/proc/uptime)" = "0.00 0.00" ]
+grep -Eq "^0.[0-9]{2} 0.[0-9]{2}$" ${LXCFSDIR}/proc/uptime
 
 # Test cpuinfo
 [ "$(grep "^processor" ${LXCFSDIR}/proc/cpuinfo | wc -l)" = "1" ]