diff options
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | Makefile.am | 14 | ||||
-rw-r--r-- | configure.in | 28 | ||||
-rw-r--r-- | libcroco-config.h.in | 3 | ||||
-rw-r--r-- | libcroco.spec.in | 25 | ||||
-rw-r--r-- | tests/test4-main.c | 2 | ||||
-rwxr-xr-x | tests/testctl | 146 | ||||
-rw-r--r-- | tests/valgrind.log | 166 | ||||
-rwxr-xr-x | tests/vg | 11 |
9 files changed, 208 insertions, 201 deletions
@@ -1,3 +1,17 @@ +2003-04-03 Dodji <dodji@seketeli.org> + + * tests/testctl: can now run one single test. This can also + run all the tests a run a simple report that summarizes the + results of the tests. + + * configure.in: make sure this generates the libcroco.spec file. + make sure to test the presence of glib2 during configure. + + * libcroco.spec.in: added autoconf magic in this. + Can now generate an rpm by typing make rpm. Before that, + the user that types make rpm must have write acess to + /usr/src . + 2003-04-02 Gaël Chamoulaud (strider) <strider@freespiders.org> * croco-config.1: updated the man page diff --git a/Makefile.am b/Makefile.am index c342c82..0b5264b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,9 +12,17 @@ bin_SCRIPTS=croco-config man_MANS = croco-config.1 -EXTRA_DIST= croco-config.in libcroco.pc.in TODO Doxyfile HACKING \ -docs/examples/cssom-example.c docs/usage.txt tests/test-inputs/*.css \ -tests/test-outputs/*.out $(man_MANS) +EXTRA_DIST= croco-config.in libcroco.pc libcroco.spec TODO Doxyfile \ +HACKING COPYING.LIB COPYING docs/examples/cssom-example.c \ +docs/usage.txt tests/test-inputs/*.css \ +tests/test-output-refs/*.out $(man_MANS) + +cleantar: + @(rm -f libcroco*.tar.gz) + @(rm -rf $(top_srcdir)/rpmbuildroot) + +rpm: cleantar + @(mkdir -p $(top_srcdir)/rpmbuildroot ; $(MAKE) dist && rpmbuild -ta --buildroot $(top_srcdir)/rpmbuildroot $(distdir).tar.gz) apidoc: if ! test -d docs/apis ; then mkdir -p docs/apis ; fi ; diff --git a/configure.in b/configure.in index d25eb9e..7ff9e96 100644 --- a/configure.in +++ b/configure.in @@ -61,21 +61,30 @@ dnl end of check of the different --enable-feature options dnl ************************************************* dnl -dnl Find pkg-config +dnl check glib-2.0 version dnl - -AC_PATH_PROG(PKG_CONFIG, pkg-config, no) -if test x$PKG_CONFIG = xno ; then - AC_MSG_ERROR([*** pkg-config not found. See http://www.freedesktop.org/software/pkgconfig/]) +GLIB2_VERSION=2.0 +have_glib2=no +PKG_CHECK_MODULES(GLIB2, + [glib-2.0 >= $GLIB2_VERSION], + [have_glib2=yes + AC_DEFINE(HAVE_GLIB2, 1, [use glib2])], + have_glib2=no) +if test "$have_glib2" = no ; then + AC_MSG_ERROR([*** glib2 not found. See http://www.gtk.org]) fi +AC_SUBST(GLIB2_VERSION) + dnl check libxml2 version +LIBXML2_VERSION=2.5.1 have_libxml2=no -PKG_CHECK_MODULES(LIBXML2, [libxml-2.0 >= 2.5.1], +PKG_CHECK_MODULES(LIBXML2, [libxml-2.0 >= $LIBXML2_VERSION], [have_libxml2=yes AC_DEFINE(HAVE_LIBXML2, 1, - [use libxml2])], + [use libxml2])], have_libxml2=no) +AC_SUBST(LIBXML2_VERSION) dnl --enable-tests dnl this option enables compilation of the unit tests built in to .c files @@ -175,8 +184,8 @@ CFLAGS="-g -Wunused -Wimplicit -Wreturn-type -Wswitch \ -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls " #-pedantic -Wshadow -0 -Wuninitialized -CROCO_LIBS="-L${libdir} -lcroco `pkg-config --libs glib-2.0`" -CROCO_CFLAGS="-I${includedir}/libcroco `pkg-config --cflags glib-2.0`" +CROCO_LIBS="-L${libdir} -lcroco $GLIB2_LIBS $LIBXML2_LIBS" +CROCO_CFLAGS="-I${includedir}/libcroco $GLIB2_CFLAGS $LIBXML2_CFLAGS" if test "$USE_LIBXML2" = "yes" ; then LIBXML2_LIBS=`pkg-config --libs libxml-2.0` @@ -201,6 +210,7 @@ AC_PROG_MAKE_SET AC_OUTPUT([ Makefile libcroco.pc +libcroco.spec croco-config src/Makefile csslint/Makefile diff --git a/libcroco-config.h.in b/libcroco-config.h.in index d548eb0..69d22fb 100644 --- a/libcroco-config.h.in +++ b/libcroco-config.h.in @@ -6,6 +6,9 @@ /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H +/* use glib2 */ +#undef HAVE_GLIB2 + /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H diff --git a/libcroco.spec.in b/libcroco.spec.in index 06e93c4..86b0467 100644 --- a/libcroco.spec.in +++ b/libcroco.spec.in @@ -1,7 +1,7 @@ %define __libtoolize : %define __spec_install_post /usr/lib/rpm/brp-compress Name: libcroco -Summary: An CCS2 parsing library +Summary: A CSS2 parsing library Version: @VERSION@ Release: 1 License: LGPL @@ -9,23 +9,23 @@ Group: System Environment/Libraries Source: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: pkgconfig >= 0.8 -Requires: glib2 >= 2.0.0 -Requires: libxml2 >= 2.4.7 -BuildRequires: glib2-devel >= 2.0.0 -BuildRequires: libxml2-devel >= 2.4.7 +Requires: glib2 >= @GLIB2_VERSION@ +Requires: libxml2 >= @LIBXML2_VERSION@ +BuildRequires: glib2-devel >= @GLIB2_VERSION@ +BuildRequires: libxml2-devel >= @LIBXML2_VERSION@ %description -CCS2 parsing library for GNOME +CSS2 parsing library for GNOME %package devel Summary: Libraries and include files for developing with libcroco. Group: Development/Libraries Requires: %{name} = %{version} Requires: pkgconfig >= 0.8 -Requires: glib2 >= 2.0.0 -Requires: glib2-devel >= 2.0.0 -Requires: libxml2 >= 2.4.7 -Requires: libxml2-devel >= 2.4.7 +Requires: glib2 >= @GLIB2_VERSION@ +Requires: glib2-devel >= @GLIB2_VERSION@ +Requires: libxml2 >= @LIBXML2_VERSION@ +Requires: libxml2-devel >= @LIBXML2_VERSION@ %description devel This package provides the necessary development libraries and include @@ -35,7 +35,7 @@ files to allow you to develop with libcroco. %setup -q -n libcroco-%{version} %build -%configure --enable-seleng=no --enable-layeng=yes +%configure --enable-seleng=@WITH_SELENG@ --enable-layeng=@WITH_SELENG@ make %install @@ -67,5 +67,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libcroco.pc %changelog +* Wed Apr 2 2003 Dodji Seketeli <dodji@seketeli.org> +- initial release: SAC api, CSSOM api, basic selectors implementation. + * Sun Mar 30 2003 Christian Schaller <uraeus@gnome.org> - created this thing diff --git a/tests/test4-main.c b/tests/test4-main.c index 91a5757..9f68c43 100644 --- a/tests/test4-main.c +++ b/tests/test4-main.c @@ -30,7 +30,7 @@ /** *@file - *Some test facilities for the #CRParser class. + *Some test facilities for the #CROMParser class. */ CRDocHandler * gv_test_handler = {0} ; diff --git a/tests/testctl b/tests/testctl index 8ba6806..a9001fe 100755 --- a/tests/testctl +++ b/tests/testctl @@ -27,7 +27,8 @@ TEST_OUTPUT_DIR=test-outputs ERROR_REPORT_FILE=tests-error.log COMMAND_LIST= COMMAND= - +RUN_VALGRIND=no +TEST_PROG= EGREP=`which egrep` if test "empty$EGREP" = "empty" ; then echo "You don't have the egrep program installed" @@ -43,9 +44,9 @@ fi display_usage () { echo "" - echo "usage: $0 [options] <command>" + echo "usage: $0 [general options] <command> [command option]" echo "" - echo "where options are:" + echo "where general options are:" echo "====================" echo "-h|--help displays this help" echo "" @@ -54,9 +55,12 @@ display_usage () echo "run run the tests and display their result" echo "mkref run the tests but saves their output as a reference" echo "mkcleanup removes the tmp directories that may have been created" + echo "" + echo "run command options:" + echo "--valgrind runs the test using valgrind" + echo "--testprog <test program>" } - parse_command_line () { if test "empty$1" = "empty" ; then @@ -83,9 +87,10 @@ parse_command_line () exit 0 ;; - run|mkref|mkcleanup) + run|mkref|mkcleanup) COMMAND_LIST=$arg - shift + REMAINING_ARGS=$@ + echo "REMAINING_ARGS=$REMAINING_ARGS" break ; ;; @@ -105,11 +110,10 @@ build_tests_list () echo "$un test: $TEST_PROG" TEST_PROG_LIST="$TEST_PROG_LIST $TEST_PROG" done - } #runs a test programs. -#usage run_test_prog <test-name> <reference> +#usage run_test_prog <test-name> <reference> <display-on-stdout> #where "test-name" is the name of the test program to run #"reference" is a boolean value: yes/no. (the string "yes" or the string no) #if yes, means that the output of the test is to be saved as a reference. @@ -118,7 +122,8 @@ run_test_prog () { TEST_PROG=$1 REFERENCE=$2 - + DISPLAY_ON_STDOUT=$3 + OUTPUT_DIR= OUTPUT_SUFFIX= TEST_INPUT_LIST= @@ -140,23 +145,42 @@ run_test_prog () mkdir $HERE/$TEST_OUTPUT_DIR ; echo "done" fi - OUTPUT_DIR=$HERE/$TEST_OUTPUT_DIR OUTPUT_SUFFIX=.out - fi + fi if test "empty$TEST_INPUT_LIST" != "empty" ; then for TEST_INPUT in $TEST_INPUT_LIST ; do - #launch the test with the test input file, and save the output. - echo "executing $HERE/$TEST_PROG $HERE/$TEST_INPUT_DIR/$TEST_INPUT > $OUTPUT_DIR/${TEST_INPUT}${OUTPUT_SUFFIX} ..." - $HERE/$TEST_PROG $HERE/$TEST_INPUT_DIR/$TEST_INPUT > $OUTPUT_DIR/${TEST_INPUT}${OUTPUT_SUFFIX} - echo "done" - echo "" + if test "$DISPLAY_ON_STDOUT" = "yes" ; then + echo "###############################################" + echo "launching $HERE/$TEST_PROG $HERE/$TEST_INPUT_DIR/$TEST_INPUT".... + echo "###############################################" + $HERE/$TEST_PROG $HERE/$TEST_INPUT_DIR/$TEST_INPUT + echo "###############################################" + echo "done" + echo "###############################################" + echo "" + else + echo "executing $HERE/$TEST_PROG $HERE/$TEST_INPUT_DIR/$TEST_INPUT > $OUTPUT_DIR/${TEST_INPUT}${OUTPUT_SUFFIX} ..." + $HERE/$TEST_PROG $HERE/$TEST_INPUT_DIR/$TEST_INPUT > $OUTPUT_DIR/${TEST_INPUT}${OUTPUT_SUFFIX} + echo "done" + fi done else - echo "executing $HERE/$TEST_PROG > $OUTPUT_DIR/${TEST_INPUT}${OUTPUT_SUFFIX} ..." - $HERE/$TEST_PROG > $OUTPUT_DIR/${TEST_PROG}${OUTPUT_SUFFIX} - echo "done" + if test "$DISPLAY_ON_STDOUT" = "yes" ; then + echo "####################################################" + echo "launching $HERE/$TEST_PROG ..." + echo "####################################################" + $HERE/$TEST_PROG + echo "####################################################" + echo "done" + echo "####################################################" + echo "" + else + echo "executing $HERE/$TEST_PROG > $OUTPUT_DIR/${TEST_INPUT}${OUTPUT_SUFFIX} ..." + $HERE/$TEST_PROG > $OUTPUT_DIR/${TEST_PROG}${OUTPUT_SUFFIX} + echo "done" + fi fi } @@ -183,7 +207,75 @@ run_test_report () fi } +############################ +#Executes the "run" command along with +#it's command options. +#For the sake of safety checking +############################ +execute_run_cmd () +{ + args=$@ + + if test "$1" != "run" ; then + echo "internal error: first argument should be \'run\'" + return + fi + shift + + while true ; do + cur_arg=$1 + echo "cur_arg=$cur_arg" + + case $cur_arg in + --valgrind) + RUN_VALGRIND=yes + shift + ;; + + "--testprog") + shift + if test "empty$1" = "empty" ; then + echo "--testprog should be followed by a prog name" + display_usage + exit + fi + TEST_PROG=$1 + echo "TEST_PROG=$TEST_PROG" + shift + ;; + + *) + break + ;; + esac + done + + if test "empty$TEST_PROG" = "empty"; then + build_tests_list ; + if test "empty$TEST_PROG_LIST" = "empty" ; then + echo "could not find any test to run" + exit + fi + + for TEST in $TEST_PROG_LIST ; do + run_test_prog $TEST no no; + done + run_test_report ; + else + #run the test and display result on stdout + run_test_prog $TEST_PROG no yes ; + fi +} +############################## +#Analyzes a command string "<command> [command option]" +#and runs the necessary commands. +# +#Must be called with the command line +#starting with a command name. +#all the previous general argument must +#have been stripped away. +############################# execute_command () { arg=$1 ; @@ -191,17 +283,7 @@ execute_command () case "$arg" in run) - build_tests_list ; - if test "empty$TEST_PROG_LIST" = "empty" ; then - echo "could not find any test to run" - exit - fi - - for TEST in $TEST_PROG_LIST ; do - run_test_prog $TEST no; - done - - run_test_report ; + execute_run_cmd $@ ;; mkref) @@ -212,7 +294,7 @@ execute_command () fi for TEST in $TEST_PROG_LIST ; do - run_test_prog $TEST yes; + run_test_prog $TEST yes no; done ;; @@ -240,7 +322,7 @@ main () exit fi - execute_command $COMMAND_LIST + execute_command $REMAINING_ARGS } main $@ diff --git a/tests/valgrind.log b/tests/valgrind.log index 7e68e8f..e7a7730 100644 --- a/tests/valgrind.log +++ b/tests/valgrind.log @@ -1,144 +1,22 @@ -==31389== valgrind-1.0.4, a memory error detector for x86 GNU/Linux. -==31389== Copyright (C) 2000-2002, and GNU GPL'd, by Julian Seward. -==31389== Startup, with flags: -==31389== --suppressions=/usr/local/lib/valgrind/default.supp -==31389== -v -==31389== --num-callers=100 -==31389== --leak-check=yes -==31389== --show-reachable=yes -==31389== Reading suppressions file: /usr/local/lib/valgrind/default.supp -==31389== Reading syms from /home/dodji/dev/libcroco/tests/.libs/test4 -==31389== Reading syms from /lib/ld-2.2.5.so -==31389== Reading syms from /usr/local/lib/valgrind/valgrind.so -==31389== Reading syms from /usr/lib/libglib-2.0.so.0.0.6 -==31389== object doesn't have any debug info -==31389== Reading syms from /usr/local/lib/libcroco.so.0.0.1 -==31389== Reading syms from /lib/i686/libc-2.2.5.so -==31389== object doesn't have any debug info -==31389== Estimated CPU clock rate is 364 MHz -==31389== -==31389== -==31389== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) -==31389== malloc/free: in use at exit: 38298 bytes in 19 blocks. -==31389== malloc/free: 2510 allocs, 2491 frees, 125800 bytes allocated. -==31389== -==31389== searching for pointers to 19 not-freed blocks. -==31389== checked 4075548 bytes. -==31389== -==31389== definitely lost: 0 bytes in 0 blocks. -==31389== possibly lost: 0 bytes in 0 blocks. -==31389== still reachable: 38298 bytes in 19 blocks. -==31389== -==31389== 20 bytes in 1 blocks are still reachable in loss record 1 of 6 -==31389== at 0x4003BF5B: calloc (vg_clientfuncs.c:239) -==31389== by 0x4025FF5D: g_allocator_new (in /usr/lib/libglib-2.0.so.0.0.6) -==31389== by 0x40254B16: (within /usr/lib/libglib-2.0.so.0.0.6) -==31389== by 0x40253F7F: g_list_append (in /usr/lib/libglib-2.0.so.0.0.6) -==31389== by 0x402BB93D: cr_parser_parse_import (cr-parser.c:3170) -==31389== by 0x402BD9A2: cr_parser_parse_stylesheet (cr-parser.c:4494) -==31389== by 0x402BE6BF: cr_parser_parse (cr-parser.c:5086) -==31389== by 0x402BE8B4: cr_parser_parse_from_file (cr-parser.c:5144) -==31389== by 0x402C2E74: cr_om_parser_parse_file (cr-om-parser.c:847) -==31389== by 0x804880E: test_cr_parser_parse (test4-main.c:100) -==31389== by 0x80488DA: main (test4-main.c:142) -==31389== by 0x402E1082: __libc_start_main (in /lib/i686/libc-2.2.5.so) -==31389== by 0x80485F1: cr_om_parser_parse_file (in /home/dodji/dev/libcroco/tests/.libs/test4) -==31389== -==31389== 80 bytes in 1 blocks are still reachable in loss record 2 of 6 -==31389== at 0x4003BAB5: malloc (vg_clientfuncs.c:100) -==31389== by 0x402E1BFA: (within /lib/i686/libc-2.2.5.so) -==31389== by 0x402E1865: iconv_open (in /lib/i686/libc-2.2.5.so) -==31389== by 0x402439E3: (within /usr/lib/libglib-2.0.so.0.0.6) -==31389== by 0x40241D2D: g_convert (in /usr/lib/libglib-2.0.so.0.0.6) -==31389== by 0x4024221C: g_convert_with_fallback (in /usr/lib/libglib-2.0.so.0.0.6) -==31389== by 0x40261F26: g_print (in /usr/lib/libglib-2.0.so.0.0.6) -==31389== by 0x402BF7EA: cr_statement_dump_charset (cr-statement.c:259) -==31389== by 0x402C1226: cr_statement_dump (cr-statement.c:1196) -==31389== by 0x402C14CF: cr_stylesheet_dump (cr-stylesheet.c:74) -==31389== by 0x804882B: test_cr_parser_parse (test4-main.c:104) -==31389== by 0x80488DA: main (test4-main.c:142) -==31389== by 0x402E1082: __libc_start_main (in /lib/i686/libc-2.2.5.so) -==31389== by 0x80485F1: cr_om_parser_parse_file (in /home/dodji/dev/libcroco/tests/.libs/test4) -==31389== -==31389== 208 bytes in 4 blocks are still reachable in loss record 3 of 6 -==31389== at 0x4003BAB5: malloc (vg_clientfuncs.c:100) -==31389== by 0x4025EAF2: g_mem_chunk_new (in /usr/lib/libglib-2.0.so.0.0.6) -==31389== by 0x40271523: g_string_sized_new (in /usr/lib/libglib-2.0.so.0.0.6) -==31389== by 0x40271588: g_string_new (in /usr/lib/libglib-2.0.so.0.0.6) -==31389== by 0x402B021D: cr_tknzr_parse_string (cr-tknzr.c:768) -==31389== by 0x402B44E5: cr_tknzr_get_next_token (cr-tknzr.c:2713) -==31389== by 0x402B8247: cr_parser_try_to_skip_spaces_and_comments (cr-parser.c:832) -==31389== by 0x402BB4A7: cr_parser_parse_charset (cr-parser.c:3026) -==31389== by 0x402BD767: cr_parser_parse_stylesheet (cr-parser.c:4408) -==31389== by 0x402BE6BF: cr_parser_parse (cr-parser.c:5086) -==31389== by 0x402BE8B4: cr_parser_parse_from_file (cr-parser.c:5144) -==31389== by 0x402C2E74: cr_om_parser_parse_file (cr-om-parser.c:847) -==31389== by 0x804880E: test_cr_parser_parse (test4-main.c:100) -==31389== by 0x80488DA: main (test4-main.c:142) -==31389== by 0x402E1082: __libc_start_main (in /lib/i686/libc-2.2.5.so) -==31389== by 0x80485F1: cr_om_parser_parse_file (in /home/dodji/dev/libcroco/tests/.libs/test4) -==31389== -==31389== 230 bytes in 8 blocks are still reachable in loss record 4 of 6 -==31389== at 0x4003BAB5: malloc (vg_clientfuncs.c:100) -==31389== by 0x4025F739: g_malloc (in /usr/lib/libglib-2.0.so.0.0.6) -==31389== by 0x4027842A: g_tree_new (in /usr/lib/libglib-2.0.so.0.0.6) -==31389== by 0x4025EC1E: g_mem_chunk_new (in /usr/lib/libglib-2.0.so.0.0.6) -==31389== by 0x40271523: g_string_sized_new (in /usr/lib/libglib-2.0.so.0.0.6) -==31389== by 0x40271588: g_string_new (in /usr/lib/libglib-2.0.so.0.0.6) -==31389== by 0x402B021D: cr_tknzr_parse_string (cr-tknzr.c:768) -==31389== by 0x402B44E5: cr_tknzr_get_next_token (cr-tknzr.c:2713) -==31389== by 0x402B8247: cr_parser_try_to_skip_spaces_and_comments (cr-parser.c:832) -==31389== by 0x402BB4A7: cr_parser_parse_charset (cr-parser.c:3026) -==31389== by 0x402BD767: cr_parser_parse_stylesheet (cr-parser.c:4408) -==31389== by 0x402BE6BF: cr_parser_parse (cr-parser.c:5086) -==31389== by 0x402BE8B4: cr_parser_parse_from_file (cr-parser.c:5144) -==31389== by 0x402C2E74: cr_om_parser_parse_file (cr-om-parser.c:847) -==31389== by 0x804880E: test_cr_parser_parse (test4-main.c:100) -==31389== by 0x80488DA: main (test4-main.c:142) -==31389== by 0x402E1082: __libc_start_main (in /lib/i686/libc-2.2.5.so) -==31389== by 0x80485F1: cr_om_parser_parse_file (in /home/dodji/dev/libcroco/tests/.libs/test4) -==31389== -==31389== 5120 bytes in 4 blocks are still reachable in loss record 5 of 6 -==31389== at 0x4003BAB5: malloc (vg_clientfuncs.c:100) -==31389== by 0x4025F05F: g_mem_chunk_alloc (in /usr/lib/libglib-2.0.so.0.0.6) -==31389== by 0x40271457: g_string_sized_new (in /usr/lib/libglib-2.0.so.0.0.6) -==31389== by 0x40271588: g_string_new (in /usr/lib/libglib-2.0.so.0.0.6) -==31389== by 0x402B021D: cr_tknzr_parse_string (cr-tknzr.c:768) -==31389== by 0x402B44E5: cr_tknzr_get_next_token (cr-tknzr.c:2713) -==31389== by 0x402B8247: cr_parser_try_to_skip_spaces_and_comments (cr-parser.c:832) -==31389== by 0x402BB4A7: cr_parser_parse_charset (cr-parser.c:3026) -==31389== by 0x402BD767: cr_parser_parse_stylesheet (cr-parser.c:4408) -==31389== by 0x402BE6BF: cr_parser_parse (cr-parser.c:5086) -==31389== by 0x402BE8B4: cr_parser_parse_from_file (cr-parser.c:5144) -==31389== by 0x402C2E74: cr_om_parser_parse_file (cr-om-parser.c:847) -==31389== by 0x804880E: test_cr_parser_parse (test4-main.c:100) -==31389== by 0x80488DA: main (test4-main.c:142) -==31389== by 0x402E1082: __libc_start_main (in /lib/i686/libc-2.2.5.so) -==31389== by 0x80485F1: cr_om_parser_parse_file (in /home/dodji/dev/libcroco/tests/.libs/test4) -==31389== -==31389== 32640 bytes in 1 blocks are still reachable in loss record 6 of 6 -==31389== at 0x4003BAB5: malloc (vg_clientfuncs.c:100) -==31389== by 0x402E1CFF: (within /lib/i686/libc-2.2.5.so) -==31389== by 0x402E1865: iconv_open (in /lib/i686/libc-2.2.5.so) -==31389== by 0x402439E3: (within /usr/lib/libglib-2.0.so.0.0.6) -==31389== by 0x40241D2D: g_convert (in /usr/lib/libglib-2.0.so.0.0.6) -==31389== by 0x4024221C: g_convert_with_fallback (in /usr/lib/libglib-2.0.so.0.0.6) -==31389== by 0x40261F26: g_print (in /usr/lib/libglib-2.0.so.0.0.6) -==31389== by 0x402BF7EA: cr_statement_dump_charset (cr-statement.c:259) -==31389== by 0x402C1226: cr_statement_dump (cr-statement.c:1196) -==31389== by 0x402C14CF: cr_stylesheet_dump (cr-stylesheet.c:74) -==31389== by 0x804882B: test_cr_parser_parse (test4-main.c:104) -==31389== by 0x80488DA: main (test4-main.c:142) -==31389== by 0x402E1082: __libc_start_main (in /lib/i686/libc-2.2.5.so) -==31389== by 0x80485F1: cr_om_parser_parse_file (in /home/dodji/dev/libcroco/tests/.libs/test4) -==31389== -==31389== LEAK SUMMARY: -==31389== definitely lost: 0 bytes in 0 blocks. -==31389== possibly lost: 0 bytes in 0 blocks. -==31389== still reachable: 38298 bytes in 19 blocks. -==31389== ---31389-- lru: 50 epochs, 0 clearings. ---31389-- translate: new 5784 (81473 -> 1079851), discard 0 (0 -> 0). ---31389-- dispatch: 2500000 basic blocks, 52/15905 sched events, 10797 tt_fast misses. ---31389-- reg-alloc: 1906 t-req-spill, 196526+11325 orig+spill uis, 29392 total-reg-r. ---31389-- sanity: 53 cheap, 3 expensive checks. +--8511-- FATAL: unhandled syscall: 252 +--8511-- Do not panic. You may be able to fix this easily. +--8511-- Read the file README_MISSING_SYSCALL_OR_IOCTL. +==8511== +==8511== Valgrind detected that your program requires +==8511== the following unimplemented functionality: +==8511== no wrapper for the above system call +==8511== This may be because the functionality is hard to implement, +==8511== or because no reasonable program would behave this way, +==8511== or because nobody has yet needed it. In any case, let me know +==8511== (jseward@acm.org) and/or try to work around the problem, if you can. +==8511== +==8511== Valgrind has to exit now. Sorry. Bye! +==8511== + +sched status: + +Thread 1: status = Runnable, associated_mx = 0x0, associated_cv = 0x0 +==8511== at 0x4046BCD3: _exit (in /lib/i686/libc-2.3.1.so) +==8511== by 0x403D37FF: __libc_start_main (in /lib/i686/libc-2.3.1.so) +==8511== by 0x8048721: cr_parser_new (in /home/dodji/dev/gnome/libcroco/tests/.libs/test2) + @@ -1,8 +1,12 @@ #!/bin/sh +### +# +### + OUTPUT_FILE=valgrind.log VG=`which valgrind` -VG_OPTIONS="-v --num-callers=100 --leak-check=yes --show-reachable=yes" +VG_OPTIONS="-q --num-callers=100 --leak-check=yes --show-reachable=yes" #Some sanity checks if test "empty$VG" = "empty" ; then @@ -12,4 +16,9 @@ if test "empty$VG" = "empty" ; then exit fi + +if test "empty$1" != "empty" ; then + OUTPUT_FILE="$1".vg +fi + exec $VG $VG_OPTIONS $@ 2>$OUTPUT_FILE
\ No newline at end of file |