[ expat-Bugs-985192 ] runtest.c uses libcheck private function

"SourceForge.net" <[email protected]>
Newsgroups gmane.text.xml.expat.bugs
Message-ID <[email protected]>
Bugs item #985192, was opened at 2004-07-05 01:58
Message generated for change (Settings changed) made by fdrake
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=985192&group_id=10127

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Fred L. Drake, Jr. (fdrake)
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




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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=985192&group_id=10127
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.