diff options
| author | eroen | 2015-07-13 00:08:15 +0200 |
|---|---|---|
| committer | eroen | 2015-07-13 00:11:05 +0200 |
| commit | 6b97d2952aca4692c7d1464d9ac901fef8b52ea9 (patch) | |
| tree | c8415496d839b3a560c64c2b281b957e925be389 /test3.bash | |
| parent | 1ff4e0626696cce79347cea1f8af03ff0df5c3fd (diff) | |
| download | dynsymlink-6b97d2952aca4692c7d1464d9ac901fef8b52ea9.tar.gz dynsymlink-6b97d2952aca4692c7d1464d9ac901fef8b52ea9.tar.bz2 dynsymlink-6b97d2952aca4692c7d1464d9ac901fef8b52ea9.tar.xz | |
Diffstat (limited to 'test3.bash')
| -rw-r--r-- | test3.bash | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test3.bash b/test3.bash new file mode 100644 index 0000000..d136732 --- /dev/null +++ b/test3.bash @@ -0,0 +1,24 @@ +#!/bin/bash + +TDIR=testdir-test3 +[[ -d testdir-test3 ]] || mkdir "$TDIR" +chmod +rwx "$TDIR" + +touch "$TDIR/rwfile" +chmod +rw "$TDIR/rwfile" +./test3-a "$TDIR/rwfile" || exit 1 +./test3-b "$TDIR/rwfile" || exit 1 +LD_PRELOAD=./libdynsymlink.so ./test3-a "$TDIR/rwfile" || exit 1 +LD_PRELOAD=./libdynsymlink.so ./test3-b "$TDIR/rwfile" || exit 1 +rm -f "$TDIR/rwfile" + +touch "$TDIR/rofile" +chmod +r "$TDIR/rofile" +chmod -w "$TDIR/rofile" +./test3-a "$TDIR/rofile" || exit 2 +./test3-b "$TDIR/rofile" && exit 2 +LD_PRELOAD=./libdynsymlink.so ./test3-a "$TDIR/rofile" || exit 2 +LD_PRELOAD=./libdynsymlink.so ./test3-b "$TDIR/rofile" || exit 2 +rm -f "$TDIR/rofile" + +rmdir "$TDIR" |
