You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
system-tests/ce/03_no-cores.sh

18 lines
407 B

#!/bin/bash
SYSCTL="/sbin/sysctl"
CORE_DIR=$(dirname $(${SYSCTL} kernel.core_pattern | awk '{print $3}'| sed -e "s_'__g"))
CORE_FILES=$(ls -1 -m ${CORE_DIR})
NUM_FILES=$(ls -1 ${CORE_DIR}|wc -l)
echo "1..1"
if [ -d ${CORE_DIR} ]; then
if [[ $NUM_FILES > 0 ]]; then
echo "not ok 1 - ${CORE_DIR} not empty: ${CORE_FILES}"
else
echo "ok 1 - ${CORE_DIR} empty"
fi
else
echo "ok 1 - no ${CORE_DIR}"
fi