[Expat-bugs] [ expat-Bugs-986349 ] runtest.c uses libcheck private function

SourceForge.net noreply at sourceforge.net
Fri Jul 9 05:17:18 CEST 2004


Bugs item #986349, was opened at 2004-07-06 23:22
Message generated for change (Settings changed) made by kwaclaw
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=986349&group_id=10127

Category: None
Group: None
>Status: Deleted
>Resolution: Duplicate
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: runtest.c uses libcheck private function

Initial Comment:

>> make check
/bin/sh ./libtool --silent --mode=link gcc -g -O2 -Wall
-Wmissing-prototypes -Wstrict-prototypes -fexceptions
-DHAVE_EXPAT_CONFIG_H   -I../expat-1.95.7/lib -I.
-I/usr/local/include -L/usr/local/lib -o tests/runtests
tests/runtests.o tests/chardata.o libexpat.la -lcheck
tests/runtests.o(.text+0x26e6): In function `main':
../expat-1.95.7/tests/runtests.c:1412: undefined
reference to `suite_free'
collect2: ld returned 1 exit status
make: *** [tests/runtests] Error 1

In version 0.9.0 of check,
check.c
static void suite_free (Suite *s)

and

void srunner_free (SRunner *sr)
...
  l = sr->slst;
  for (list_front(l); !list_at_end(l); list_advance(l)) {
    suite_free(list_val(l));
...

srunner_free appears to take care of suite_free
and suite_free is not used in check_check_main.c:
  n = srunner_ntests_failed(sr);
  srunner_free(sr);
  return (n == 0) ? EXIT_SUCCESS : EXIT_FAILURE;

the following patch allows 'make check' in expat to run

>> diff -U3 runtests.c.orig runtests.c
--- runtests.c.orig     2003-10-15 21:51:11.000000000 -0700
+++ runtests.c  2004-07-04 22:48:56.574652272 -0700
@@ -1409,7 +1409,6 @@
     srunner_run_all(sr, verbosity);
     nf = srunner_ntests_failed(sr);
     srunner_free(sr);
-    suite_free(s);
 
     return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
 }

>> make check
gcc -g -O2 -Wall -Wmissing-prototypes
-Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H
  -I../expat-1.95.7/lib -I. -I/usr/local/include -o
tests/runtests.o -c ../expat-1.95.7/tests/runtests.c
/bin/sh ./libtool --silent --mode=link gcc -g -O2 -Wall
-Wmissing-prototypes -Wstrict-prototypes -fexceptions
-DHAVE_EXPAT_CONFIG_H   -I../expat-1.95.7/lib -I.
-I/usr/local/include -L/usr/local/lib -o tests/runtests
tests/runtests.o tests/chardata.o libexpat.la -lcheck
tests/runtests
Expat version: expat_1.95.7
Running suite(s): basic
100%: Checks: 47, Failures: 0, Errors: 0




----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2004-07-07 14:28

Message:
Logged In: NO 

sorry, the page with the post submission got into a group of
tabs being periodically reloaded

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=986349&group_id=10127


More information about the Expat-bugs mailing list