test: When kdc fails to start, show the log

This is an attempt to find out why the GitHub Actions OS X build is
failing.
This commit is contained in:
Nicolas Williams
2022-01-20 14:32:17 -06:00
parent 7e67437594
commit 06ba7b1597
25 changed files with 26 additions and 26 deletions

View File

@@ -94,7 +94,7 @@ echo "Doing database check"
${kadmin} check ${R} || exit 1
echo Starting kdc
${kdc} --testing --detach || { echo "kdc failed to start"; exit 1; }
${kdc} --testing --detach || { echo "kdc failed to start"; cat messages.log; exit 1; }
kdcpid=`getpid kdc`
trap "kill ${kdcpid}; echo signal killing kdc; exit 1;" EXIT

View File

@@ -115,7 +115,7 @@ ${kadmin} check ${R} || exit 1
echo u1 > ${objdir}/foopassword
echo Starting kdc
${kdc} --detach --testing || { echo "kdc failed to start"; exit 1; }
${kdc} --detach --testing || { echo "kdc failed to start"; cat messages.log; exit 1; }
kdcpid=`getpid kdc`
trap "kill ${kdcpid}; echo signal killing kdc; exit 1;" EXIT

View File

@@ -93,7 +93,7 @@ echo "Doing database check"
${kadmin} check ${R} || exit 1
echo Starting kdc
${kdc} --detach --testing || { echo "kdc failed to start"; exit 1; }
${kdc} --detach --testing || { echo "kdc failed to start"; cat messages.log; exit 1; }
kdcpid=`getpid kdc`
trap "kill ${kdcpid}; echo signal killing kdc; exit 1;" EXIT

View File

@@ -107,7 +107,7 @@ echo u1 > ${objdir}/foopassword
echo ds > ${objdir}/barpassword
echo Starting kdc
${kdc} --detach --testing || { echo "kdc failed to start"; exit 1; }
${kdc} --detach --testing || { echo "kdc failed to start"; cat messages.log; exit 1; }
kdcpid=`getpid kdc`
trap "kill ${kdcpid}; echo signal killing kdc; exit 1;" EXIT

View File

@@ -106,7 +106,7 @@ echo u1 > ${objdir}/foopassword
echo ds > ${objdir}/barpassword
echo Starting kdc
${kdc} --detach --testing || { echo "kdc failed to start"; exit 1; }
${kdc} --detach --testing || { echo "kdc failed to start"; cat messages.log; exit 1; }
kdcpid=`getpid kdc`
trap "kill ${kdcpid}; echo signal killing kdc; exit 1;" EXIT

View File

@@ -90,7 +90,7 @@ ${kadmin} add -p kaka --use-defaults ${server}@${R} || exit 1
${kadmin} ext -k ${keytab} ${server}@${R} || exit 1
echo Starting kdc
${kdc} --detach --testing || { echo "kdc failed to start"; exit 1; }
${kdc} --detach --testing || { echo "kdc failed to start"; cat messages.log; exit 1; }
kdcpid=`getpid kdc`
trap "kill -9 ${kdcpid}; echo signal killing kdc; exit 1;" EXIT

View File

@@ -428,7 +428,7 @@ ${kadmin} add -r --use-defaults HTTP/${otherserver}@${R} || exit 1
${kadmin} ext_keytab -r -k $ukeytab foo@${R} || exit 1
echo "Starting kdc";
${kdc} --detach --testing || { echo "kdc failed to start"; exit 1; }
${kdc} --detach --testing || { echo "kdc failed to start"; cat messages.log; exit 1; }
kdcpid=`getpid kdc`
trap "kill -9 ${kdcpid} ${bx509pid}; echo signal killing kdc and bx509d; exit 1;" EXIT

View File

@@ -99,7 +99,7 @@ ${kadmin} check ${R3} || exit 1
echo foo > ${objdir}/foopassword
echo "Starting kdc" ; > messages.log
${kdc} --detach --testing || { echo "kdc failed to start"; exit 1; }
${kdc} --detach --testing || { echo "kdc failed to start"; cat messages.log; exit 1; }
kdcpid=`getpid kdc`
trap "kill -9 ${kdcpid}; echo signal killing kdc; exit 1;" EXIT

View File

@@ -86,7 +86,7 @@ ${kadmin} check ${R} || exit 1
echo foo > ${objdir}/foopassword
echo Starting kdc ; > messages.log
${kdc} --detach --testing || { echo "kdc failed to start"; exit 1; }
${kdc} --detach --testing || { echo "kdc failed to start"; cat messages.log; exit 1; }
kdcpid=`getpid kdc`
trap "kill -9 ${kdcpid}; echo signal killing kdc; exit 1;" EXIT

View File

@@ -102,7 +102,7 @@ ${kadmin} check ${R4} || exit 1
echo foo > ${objdir}/foopassword
echo Starting kdc; > messages.log
${kdc} --detach --testing || { echo "kdc failed to start"; exit 1; }
${kdc} --detach --testing || { echo "kdc failed to start"; cat messages.log; exit 1; }
kdcpid=`getpid kdc`
trap "kill -9 ${kdcpid}; echo signal killing kdc; exit 1;" EXIT

View File

@@ -96,7 +96,7 @@ ${kadmin} check ${R} || exit 1
echo foo > ${objdir}/foopassword
echo Starting kdc; > messages.log
${kdc} --detach --testing || { echo "kdc failed to start"; exit 1; }
${kdc} --detach --testing || { echo "kdc failed to start"; cat messages.log; exit 1; }
kdcpid=`getpid kdc`
trap "kill -9 ${kdcpid}; echo signal killing kdc; exit 1;" EXIT

View File

@@ -95,7 +95,7 @@ echo $password > ${objdir}/foopassword
echo "Starting kdc" ; > messages.log
env ${HEIM_MALLOC_DEBUG} ${kdc} --detach --testing ||
{ echo "kdc failed to start"; exit 1; }
{ echo "kdc failed to start"; cat messages.log; exit 1; }
kdcpid=`getpid kdc`
trap "kill -9 ${kdcpid}; echo signal killing kdc; cat messages.log; exit 1;" EXIT

View File

@@ -88,7 +88,7 @@ echo bar > ${objdir}/barpassword
echo Starting kdc ; > messages.log
env MallocStackLogging=1 MallocStackLoggingNoCompact=1 MallocErrorAbort=1 MallocLogFile=${objdir}/malloc-log \
${kdc} --detach --testing || { echo "kdc failed to start"; exit 1; }
${kdc} --detach --testing || { echo "kdc failed to start"; cat messages.log; exit 1; }
kdcpid=`getpid kdc`
trap "kill -9 ${kdcpid}; echo signal killing kdc; cat messages.log; exit 1;" EXIT

View File

@@ -85,7 +85,7 @@ echo foo > ${objdir}/foopassword
echo Starting kdc ; > messages.log
env MallocStackLogging=1 MallocStackLoggingNoCompact=1 MallocErrorAbort=1 MallocLogFile=${objdir}/malloc-log \
${kdc} --detach --testing || { echo "kdc failed to start"; exit 1; }
${kdc} --detach --testing || { echo "kdc failed to start"; cat messages.log; exit 1; }
kdcpid=`getpid kdc`
trap "kill -9 ${kdcpid}; echo signal killing kdc; exit 1;" EXIT

View File

@@ -519,7 +519,7 @@ ${hxtool} issue-certificate \
{ echo "Failed to make PKINIT client cert"; exit 1; }
echo "Starting kdc needed for httpkadmind authentication to kadmind"
${kdc} --detach --testing || { echo "kdc failed to start"; exit 1; }
${kdc} --detach --testing || { echo "kdc failed to start"; cat messages.log; exit 1; }
kdcpid=`getpid kdc`
echo "Starting httpkadmind with remote HDBs only"

View File

@@ -314,7 +314,7 @@ cleanup() {
trap cleanup EXIT
echo Starting kdc ; > messages.log
${kdc} --detach --testing || { echo "kdc failed to start"; exit 1; }
${kdc} --detach --testing || { echo "kdc failed to start"; cat messages.log; exit 1; }
kdcpid=`getpid kdc`
echo "starting master" ; > messages.log

View File

@@ -97,7 +97,7 @@ ${kadmin} -l cpw --pruneall --random-key pruneall@${R} || exit 1
echo "$foopassword" > ${objdir}/foopassword
echo Starting kdc ; > messages.log
${kdc} --detach --testing || { echo "kdc failed to start"; exit 1; }
${kdc} --detach --testing || { echo "kdc failed to start"; cat messages.log; exit 1; }
kdcpid=`getpid kdc`
trap "kill -9 ${kdcpid} ${kadmpid}" EXIT

View File

@@ -369,7 +369,7 @@ echo notfoo > ${objdir}/notfoopassword
echo Starting kdc ; > messages.log
env MallocStackLogging=1 MallocStackLoggingNoCompact=1 MallocErrorAbort=1 MallocLogFile=${objdir}/malloc-log \
${kdc} --detach --testing ||
{ echo "kdc failed to start"; exit 1; }
{ echo "kdc failed to start"; cat messages.log; exit 1; }
kdcpid=`getpid kdc`
echo Starting kpasswdd; > messages.log

View File

@@ -107,7 +107,7 @@ if (($# == 0)); then
echo foo > ${objdir}/foopassword
echo Starting kdc ; > messages.log
${kdc} --detach --testing || { echo "kdc failed to start"; exit 1; }
${kdc} --detach --testing || { echo "kdc failed to start"; cat messages.log; exit 1; }
kdcpid=`getpid kdc`
trap "kill -9 ${kdcpid}; echo signal killing kdc; exit 1;" EXIT

View File

@@ -103,7 +103,7 @@ echo foo > ${objdir}/foopassword
echo Starting kdc ; > messages.log
env ${HEIM_MALLOC_DEBUG} ${kdc} --detach --testing ||
{ echo "kdc failed to start"; exit 1; }
{ echo "kdc failed to start"; cat messages.log; exit 1; }
kdcpid=`getpid kdc`
echo Starting kpasswdd

View File

@@ -199,7 +199,7 @@ echo foo > ${objdir}/foopassword
echo Starting kdc ; > messages.log
KRB5_CONFIG="${objdir}/krb5-pkinit2.conf"
${kdc} --detach --testing || { echo "kdc failed to start"; exit 1; }
${kdc} --detach --testing || { echo "kdc failed to start"; cat messages.log; exit 1; }
kdcpid=`getpid kdc`
trap 'kill -9 ${kdcpid}; echo signal killing kdc; cat ca.crt kdc.crt pkinit.crt pkinit-synthetic.crt; exit 1;' EXIT
@@ -232,7 +232,7 @@ ${kdestroy}
echo "Restarting kdc ($kdcpid)"
sh ${leaks_kill} kdc $kdcpid || ec=1
KRB5_CONFIG="${objdir}/krb5-pkinit.conf"
${kdc} --detach --testing || { echo "kdc failed to start"; exit 1; }
${kdc} --detach --testing || { echo "kdc failed to start"; cat messages.log; exit 1; }
kdcpid=`getpid kdc`
echo "Trying pk-init (principal in cert)"; > messages.log

View File

@@ -105,7 +105,7 @@ ${kadmin} check ${R2} || exit 1
echo foo > ${objdir}/foopassword
echo Starting kdc ; > messages.log
${kdc} --detach --testing || { echo "kdc failed to start"; exit 1; }
${kdc} --detach --testing || { echo "kdc failed to start"; cat messages.log; exit 1; }
kdcpid=`getpid kdc`
trap "kill -9 ${kdcpid}; echo signal killing kdc; exit 1;" EXIT

View File

@@ -86,7 +86,7 @@ ${kadmin} check ${R} || exit 1
echo foo > ${objdir}/foopassword
echo Starting kdc ; > messages.log
${kdc} --detach --testing || { echo "kdc failed to start"; exit 1; }
${kdc} --detach --testing || { echo "kdc failed to start"; cat messages.log; exit 1; }
kdcpid=`getpid kdc`
trap "kill -9 ${kdcpid} ${uuspid}; echo signal killing kdc; exit 1;" EXIT

View File

@@ -120,7 +120,7 @@ ${kadmin} list '*' > /dev/null || exit 1
echo "$foopassword" > ${objdir}/foopassword
echo Starting kdc
${kdc} --detach --testing || { echo "kdc failed to start"; exit 1; }
${kdc} --detach --testing || { echo "kdc failed to start"; cat messages.log; exit 1; }
kdcpid=`getpid kdc`
trap "kill ${kdcpid}; echo signal killing kdc; sh ${srcdir}/slapd-stop ; exit 1;" EXIT

View File

@@ -108,7 +108,7 @@ echo "Empty log"
> messages.log
echo Starting kdc
${kdc} --detach --testing || { echo "kdc failed to start"; exit 1; }
${kdc} --detach --testing || { echo "kdc failed to start"; cat messages.log; exit 1; }
kdcpid=`getpid kdc`
trap "kill ${kdcpid}; echo signal killing kdc; exit 1;" EXIT