1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
#!/bin/bash
### Configure shell and bootstrap
#
set -e
set -u
. `dirname $BASH_SOURCE`/_bootstrap.sh
### Verify the environment
#
if [ ! -f /proc/self/cgroup ]; then
snoopy_testResult_skip "File /proc/self/cgroup does not exist"
fi
if ! grep -E ':name=systemd:' /proc/self/cgroup > /dev/null; then
snoopy_testResult_skip "Cgroup :name=systemd: does not exist"
fi
### Evaluate
#
VAL_EXPECTED=`cat /proc/self/cgroup | grep -E ':name=systemd:'`
VAL_SNOOPY=`$SNOOPY_TEST_CLI run datasource cgroup name=systemd`
snoopy_test_compareValues "$VAL_SNOOPY" "$VAL_EXPECTED"
|