Hi Peter, * Peter Rosin wrote on Fri, Oct 01, 2010 at 01:38:42PM CEST: > Anyway, is this test case good enough? Should I find a better > way to skip on non-dumpbin runs? How?
Skip if $NM != $DUMPBIN? But then you'd need to ensure DUMPBIN is set. How for a slight improvement at least something that's bound to remain even if the symbol pipe is rewritten in sed or another language, e.g., looking whether ' UNDEF ' or 'Section length' is present? Please consider moving testsuite additions which are clearly system- specific to other tests which are clearly system-specific, and grouping those testing the same systems, or family of systems (such as w32). And then using one AT_BANNER for a set of test groups. OK with nits below. Thanks, Ralf > Subject: [PATCH] msvc: handle symbols from different files independently. > > * libltdl/m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS) > <dumpbin, lt_cv_sys_global_symbol_pipe>: Make all sections > viable for symbol extraction again when the symbols from a new > file starts. Fixes tests/tagdemo-make.test for MSVC 10. > * tests/dumpbin-symbols.at: New test, making sure we don't > regress. > * Makefile.am (TESTSUITE_AT): Update. > --- a/libltdl/m4/libtool.m4 > +++ b/libltdl/m4/libtool.m4 > @@ -3645,6 +3645,7 @@ for ac_symprfx in "" "_"; do > # which start with @ or ?. > lt_cv_sys_global_symbol_pipe="$AWK ['"\ > " {last_section=section; section=\$ 3};"\ > +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ > " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ > " \$ 0!~/External *\|/{next};"\ > " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ > --- /dev/null > +++ b/tests/dumpbin-symbols.at > +AT_BANNER([Symbol extraction]) > +AT_SETUP([dumpbin -symbols section hiding]) > + > +# I don't know of a stable way to create a pair of objects that > +# exhibits the potential problem, so this test fakes it by > +# testing with output from a case that do have the potential > +# problem. > + > +eval `$LIBTOOL --config | $EGREP '^(global_symbol_pipe)='` > + > +# This skip check is fragile, make lt_cv_nm_interface visible here instead? > +case $global_symbol_pipe in > +*last_section=section*) ;; > +*) AT_CHECK([exit 77]) ;; > +esac > +# Check if the _convenience symbol from section SECT3 in conv.lib is > +# present even if section SECT3 in foo.obj is hidden. > +AT_CHECK([eval "cat dumpbin-output | $global_symbol_pipe"], [], [stdout]) cat dumpbin-output | eval "$global_symbol_pipe" ought to be sufficient. Or even < dumpbin-output eval "$global_symbol_pipe" Thanks, Ralf