[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#873929: gcc7: Enable libgo tests and rebuilds with make -C



On 01.09.2017 23:11, Svante Signell wrote:
> On Fri, 2017-09-01 at 13:32 +0200, Matthias Klose wrote:
>> On 01.09.2017 11:55, Svante Signell wrote:
>>> Source: gcc-7
>>> Version: 7.2.0-2
>>> Severity: important
>>> Tags: patch
>>>
>>> Hello,
>>>
>>> Currently the libgo tests are not run due to a bug in
>>> libgo/Makefile.am
>>> (and Makefile.in). This error is found on all architectures where
>>> the
>>> testsuite is enabled. The attached patch fixes this bug as well as
>>> enables rebuilds with
>>> make -C build/<arch-triple>/libgo clean;
>>> <hack on>;
>>> make -C build/<arch-triple>/libgo;
>>> by adding more entries to the CLEANFILES target.
>>>
>>> (The GOBENCH = entry is due to a trailing white space in the
>>> original
>>> file)
>>
>> ok, this is the libgo-testsuite.diff patch.  Why do you test
>> USE_DEJAGNU twice then?
> 
> I just found out that the test suite does not run properly, and created
> the patch making that Makefile snippet being the same as for gcc-6. The
> if then else fi logic is broken:
> See e.g. https://buildd.debian.org/status/fetch.php?pkg=gcc-7&arch=amd6
> 4&ver=7.2.0-2&stamp=1504127698&raw=0
> 
> /usr/bin/make  check-DEJAGNU
> make[9]: Entering directory '/<<PKGBUILDDIR>>/build/x86_64-linux-
> gnu/32/libgo/testsuite'
> srcdir='../../../../../src/libgo/testsuite'; export srcdir; \
> EXPECT=`if [ -f ../../expect/expect ] ; then echo ../../expect/expect ;
> else echo expect ; fi`; export EXPECT; \
> runtest=`if [ -f ../../../../../src/libgo/../dejagnu/runtest ] ; then
> echo ../../../../../src/libgo/../dejagnu/runtest ; else echo runtest;
> fi`; \
> if /bin/bash -c "$runtest --version" > /dev/null 2>&1; then \
>   exit_status=0; l='libgo'; for tool in $l; do \
>     if $runtest "TEST_GCC_EXEC_PREFIX=/usr/lib/gcc" --tool $tool --
> srcdir $srcdir --target_board=unix\{,-fstack-protector\}
> GOTEST_TMPDIR=gotest21736/test; \
>     then :; else exit_status=1; fi; \
>   done; \
> else echo "WARNING: could not find \`runtest'" 1>&2; :;\
> fi; \
> exit $exit_status
> 
> for failed build logs.
> 
>> The go testsuite is special, because it's normally run from every
>> multilib directory instead of the top libdir only.
> 
> Sorry, I don't (yet) know what you mean, but will in due time. Perhaps
> with your help?

if you look at the check target for all other target libraries, then you'll see
that it doesn't descend into the multilib directories, e.g. 32 and x32 on amd64,
which it does for all target libs besides libgo.  Instead the target libraries
are iterated what you specifiy in RUNTESTFLAGS.  libgo doesn't do that, and
descends into the non-default multilib dirs itself.  This can be a problem if
you don't have a kernel running which understands all multilib variants, e.g.
x32. I'm happy to drop any of these patches, but a test run shouldn't try to
execute multilib variants when current running kernel doesn't support it.

Matthias


Reply to: