diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2019-12-10 13:43:47 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2019-12-10 15:44:16 +0100 |
commit | 4a52855899bdbd8bc570a667a03394872667e754 (patch) | |
tree | 15071805f20c2d62c87e8a4450cdfd9e0603388c | |
parent | 611d4107a4b3c434c4266ae6f2638927541bc9b6 (diff) | |
download | lvm2-4a52855899bdbd8bc570a667a03394872667e754.tar.gz |
tests: improve secure test
Validate we capture core while original task sleeps.
-rw-r--r-- | test/shell/dmsecuretest.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/shell/dmsecuretest.sh b/test/shell/dmsecuretest.sh index 75ad56dca..0f53ea704 100644 --- a/test/shell/dmsecuretest.sh +++ b/test/shell/dmsecuretest.sh @@ -45,7 +45,9 @@ sleep .5 dmsetup status "$DMTEST" # generate core file for running&sleeping binary -gcore "$PID" +gcore "$PID" | tee out +# check we capture core while dmsecuretest was already sleeping +grep "nanosleep" out kill "$PID" || true wait @@ -55,7 +57,7 @@ cat cmdout not grep "$SECURE" "core.$PID" || { ## cp "core.$PID" /dev/shm/core rm -f "core.$PID" - dmsetup remove "$DMTEST" + should dmsetup remove "$DMTEST" # go around weird bugs die "!!! Secure string $SECURE found present in core.$PID !!!" } rm -f "core.$PID" |