From da0aba21779529d98436e42323fc12f702390969 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Fri, 11 Jul 2014 20:18:41 -0700 Subject: Update to rra-c-util 5.5 and C TAP Harness 3.1 Update to rra-c-util 5.5: * Use Lancaster Consensus environment variables to control tests. * Use calloc or reallocarray for protection against integer overflows. * Suppress warnings from Kerberos headers in non-system paths. * Assume calloc initializes pointers to NULL. * Assume free(NULL) is properly ignored. * Improve error handling in xasprintf and xvasprintf. * Check the return status of snprintf and vsnprintf properly. * Preserve errno if snprintf fails in vasprintf replacement. Update to C TAP Harness 3.1: * Reopen standard input to /dev/null when running a test list. * Don't leak extraneous file descriptors to tests. * Suppress lazy plans and test summaries if the test failed with bail. * runtests now treats the command line as a list of tests by default. * The full test executable path can now be passed to runtests -o. * Improved harness output for tests with lazy plans. * Improved harness output to a terminal for some abort cases. * Flush harness output after each test even when not on a terminal. Change-Id: I05161eb3d3be49a98f7762e876cb114da0c84e9a Reviewed-on: https://gerrit.stanford.edu/1529 Reviewed-by: Russ Allbery Tested-by: Russ Allbery --- tests/util/messages-krb5-t.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'tests/util/messages-krb5-t.c') diff --git a/tests/util/messages-krb5-t.c b/tests/util/messages-krb5-t.c index 8e9daf1..c6de5a5 100644 --- a/tests/util/messages-krb5-t.c +++ b/tests/util/messages-krb5-t.c @@ -5,7 +5,7 @@ * which can be found at . * * Written by Russ Allbery - * Copyright 2010, 2011 + * Copyright 2010, 2011, 2013, 2014 * The Board of Trustees of the Leland Stanford Junior University * * Permission is hereby granted, free of charge, to any person obtaining a @@ -28,17 +28,31 @@ */ #include -#include +#ifdef HAVE_KRB5 +# include +#endif #include #include #include #include -#include +#ifdef HAVE_KRB5 +# include +#endif #include #include +/* Skip the whole test if not built with Kerberos support. */ +#ifndef HAVE_KRB5 +int +main(void) +{ + skip_all("not built with Kerberos support"); + return 0; +} +#else + /* * Test functions. */ @@ -116,5 +130,9 @@ main(void) message_handlers_die(0); is_function_output(test_die, NULL, 1, "", "warn_krb5 with no handlers"); + krb5_free_error_message(ctx, message); + krb5_free_context(ctx); return 0; } + +#endif /* HAVE_KRB5 */ -- cgit v1.2.3