File: cli-action-status-ld.so.preload-alien.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 (32 lines) | stat: -rwxr-xr-x 716 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
31
32
#!/bin/bash



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



### Prepare the environment
#
export SNOOPY_TEST_LD_SO_PRELOAD_PATH="$SNOOPY_CUR_TEST_FILENAME.ld.so.preload"
rm -f $SNOOPY_TEST_LD_SO_PRELOAD_PATH
echo "/unknown/lib/$SNOOPY_TEST_LIBSNOOPY_SO_PATH" > $SNOOPY_TEST_LD_SO_PRELOAD_PATH



### Execute & verify
#
if ! $SNOOPY_CLI status 2>&1 | grep -E "^/etc/ld.so.preload: +NOT OK - 'libsnoopy.so' found, but not with the expected path" > /dev/null ; then
    snoopy_testResult_fail "ld.so.preload contains invalid libsnoopy.so reference, but status error message not as expected"
fi



### Success
#
rm -f $SNOOPY_TEST_LD_SO_PRELOAD_PATH
snoopy_testResult_pass