File: cli-action-enable-52-another-instance-enabled.sh

package info (click to toggle)
snoopy 2.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,988 kB
  • sloc: ansic: 7,167; sh: 4,514; makefile: 1,095
file content (39 lines) | stat: -rwxr-xr-x 910 bytes parent folder | download | duplicates (2)
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
31
32
33
34
35
36
37
38
39
#!/bin/bash



### Configure shell and bootstrap
#
set -e
set -u
. `dirname $BASH_SOURCE`/_bootstrap.sh



### Setup the test environment
#
export SNOOPY_TEST_LD_SO_PRELOAD_PATH="$SNOOPY_CUR_TEST_FILENAME.ld.so.preload"
rm -f $SNOOPY_TEST_LD_SO_PRELOAD_PATH
echo "/another/instance/of/libsnoopy.so" > $SNOOPY_TEST_LD_SO_PRELOAD_PATH
echo "/another/instance/of/libsnoopy.so" > $SNOOPY_TEST_LD_SO_PRELOAD_PATH.expected-result



### Run the command & test the exit status
#
if $SNOOPY_CLI enable ; then
    snoopy_testResult_fail "Unexpected zero exit status"
fi



### Evaluate
#
if ! diff -u $SNOOPY_TEST_LD_SO_PRELOAD_PATH $SNOOPY_TEST_LD_SO_PRELOAD_PATH.expected-result ; then
    snoopy_testResult_fail "ld.so.preload test file ($SNOOPY_TEST_LD_SO_PRELOAD_PATH) content not as expected"
fi

rm -f $SNOOPY_TEST_LD_SO_PRELOAD_PATH
rm -f $SNOOPY_TEST_LD_SO_PRELOAD_PATH.expected-result

snoopy_testResult_pass