From 996ab4cf64c64c96eebb5573e60ada63f29f8300 Mon Sep 17 00:00:00 2001 From: Alexander Mikhalitsyn Date: Wed, 2 Oct 2024 11:24:14 +0200 Subject: [PATCH] tests: add proc readdir test Signed-off-by: Alexander Mikhalitsyn --- tests/test_proc.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_proc.in b/tests/test_proc.in index 1ea4e4b1..e1384c19 100755 --- a/tests/test_proc.in +++ b/tests/test_proc.in @@ -65,6 +65,13 @@ fi echo $((64*1024*1024)) > ${mempath}/lxcfs_test_proc/${memory_limit_file} echo 0 > ${cpupath}/lxcfs_test_proc/cpuset.cpus +# Test that readdir on /proc basically works +echo "==> Testing directory listing on /proc" +ls -l ${LXCFSDIR}/proc | grep uptime +ls -l ${LXCFSDIR}/proc | grep cpuinfo +ls -l ${LXCFSDIR}/proc | grep stat +ls -l ${LXCFSDIR}/proc | grep meminfo + # Test uptime echo "==> Testing /proc/uptime" grep -Eq "^0.[0-9]{2} 0.[0-9]{2}$" ${LXCFSDIR}/proc/uptime