File: datasource_cgroup-name.sh

package info (click to toggle)
snoopy 2.5.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,016 kB
  • sloc: ansic: 7,169; sh: 4,514; makefile: 1,095
file content (30 lines) | stat: -rwxr-xr-x 582 bytes parent folder | download | duplicates (3)
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"