2
# $Id: coredump.sh 61 2006-05-19 18:32:14Z steve-beattie $
4
# Copyright (C) 2002-2005 Novell/SUSE
6
# This program is free software; you can redistribute it and/or
7
# modify it under the terms of the GNU General Public License as
8
# published by the Free Software Foundation, version 2 of the
12
#=DESCRIPTION coredump test
16
_corefilelist=`echo core.*`
17
if [ "$_corefilelist" = "core.*" ]
24
if [ "$1" = "yes" -a "$_corefile" = "no" ]
26
echo "Error: corefile expected but not present - $2"
27
elif [ "$1" = "no" -a "$_corefile" = "yes" ]
29
echo "Error: corefile present when not expected -- $2"
32
unset _corefile _corefilelist
37
pwd=`cd $pwd ; /bin/pwd`
49
# PASS TEST, no confinement
50
echo "*** A 'Segmentation Fault' message from bash is expected for the following test"
51
runchecktest "COREDUMP (no confinement)" signal11
52
checkcorefile yes "COREDUMP (no confinement)"
54
# PASS TEST, with r confinement
55
genprofile $test:$coreperm
59
echo "*** A 'Segmentation Fault' message from bash is expected for the following test"
60
runchecktest "COREDUMP ($coreperm confinement)" signal11
61
checkcorefile yes "COREDUMP ($coreperm confinement)"
63
# FAIL TEST, with x confinement
64
genprofile $test:$nocoreperm
68
echo "*** A 'Segmentation Fault' message from bash is expected for the following test"
69
runchecktest "COREDUMP ($nocoreperm confinement)" signal11
70
checkcorefile no "COREDUMP ($nocoreperm confinement)"