Skip to content

Commit

Permalink
tests: add proc readdir test
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Mikhalitsyn <[email protected]>
  • Loading branch information
mihalicyn committed Oct 2, 2024
1 parent 56fd97e commit 2594ae8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_proc.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2594ae8

Please sign in to comment.