From: Ken Raeburn Date: Tue, 14 Nov 2000 05:33:01 +0000 (+0000) Subject: make "make check" do something X-Git-Tag: krb5-1.3-alpha1~1750 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ccc1fade4c89651181c12befc64923adfab45792;p=krb5.git make "make check" do something git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12868 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/util/et/ChangeLog b/src/util/et/ChangeLog index 6441d2ad7..6be9a3770 100644 --- a/src/util/et/ChangeLog +++ b/src/util/et/ChangeLog @@ -1,3 +1,11 @@ +2000-11-14 Ken Raeburn + + * Makefile.in (check-unix): Depend on, and run, t_com_err and + test_et. + * test_et.c (main): Return type is int; return 0 at end. Use %ld + format for error code values. + (error_table_name): Declare. + 2000-11-08 Ken Raeburn Test out lclint and its4 on com_err library, fixing reported diff --git a/src/util/et/Makefile.in b/src/util/et/Makefile.in index 94e188ffc..2f8fe32a1 100644 --- a/src/util/et/Makefile.in +++ b/src/util/et/Makefile.in @@ -126,6 +126,12 @@ includes:: com_err.h clean-unix:: $(RM) $(BUILDTOP)/include/com_err.h +# test_et doesn't have an interesting exit status, but it'll exercise +# some cases that t_com_err doesn't, so let's see if it crashes. +check-unix:: t_com_err test_et + ./test_et + ./t_com_err + # The real compile_et just isn't portable. (But then again, anything using # lex and yacc isn't portable by definition. :-( ) # diff --git a/src/util/et/test_et.c b/src/util/et/test_et.c index ff638a24c..50edcbd64 100644 --- a/src/util/et/test_et.c +++ b/src/util/et/test_et.c @@ -6,7 +6,10 @@ extern int sys_nerr, errno; -main() +/* XXX Not part of official public API. */ +extern const char *error_table_name (errcode_t); + +int main() { printf("Before initiating error table:\n\n"); printf("Table name '%s'\n", error_table_name(KRB_MK_AP_TGTEXP)); @@ -21,7 +24,7 @@ main() printf("With 0: tgt-expired -> %s\n", error_message(KRB_MK_AP_TGTEXP)); initialize_krb_error_table(); - printf("KRB error table initialized: base %d (%s), name %s\n", + printf("KRB error table initialized: base %ld (%s), name %s\n", ERROR_TABLE_BASE_krb, error_message(ERROR_TABLE_BASE_krb), error_table_name(ERROR_TABLE_BASE_krb)); initialize_krb_error_table(); @@ -29,7 +32,7 @@ main() error_message(KRB_MK_AP_TGTEXP)); initialize_quux_error_table(); - printf("QUUX error table initialized: base %d (%s), name %s\n", + printf("QUUX error table initialized: base %ld (%s), name %s\n", ERROR_TABLE_BASE_quux, error_message(ERROR_TABLE_BASE_quux), error_table_name(ERROR_TABLE_BASE_quux)); @@ -45,4 +48,5 @@ main() com_err("whoami", FOO_ERR, " -- message goes %s", "here"); com_err("whoami", 0, (char *)0); com_err("whoami", 0, "error number %d\n", 0); + return 0; }