[PATCH v2] libsframe: testsuite: Fix testsuite build on Solaris
Rainer Orth
ro@CeBiTec.Uni-Bielefeld.DE
Tue Sep 9 16:16:52 GMT 2025
Hi Alan,
>> >> Thanks for taking care of this.
>> >>
>> >> sframe-test.h in toplevel include/ looks odd IMO. Adding to
>> >> libsframe/testsuite/ folder along with the -I${top_srcdir}/testsuite
>> >> addition in libsframe/testsuite/libsframe.decode/local.mk,
>> >> libsframe/testsuite/libsframe.encode/local.mk,
>> >> libsframe/testsuite/libsframe.find/local.mk may be a better thing to do.
>> >
>> > I thought about this, but this seems like lots of duplication to me.
>> > Besides, these files are extremly repetetive, doing the same over and
>> > over again. I wonder if this cannot be simplified, avoiding the massive
>> > duplication to improve maintainablitly? Let's see what Alan thinks
>> > about this.
>>
>> any word on how to handle this. The current duplication worries me,
>> especially for a patch that tries to reduce duplication in one place
>> increasing duplication even more in a different place.
>
> Did you try putting the new include file in libsframe/? I agree with
> Indu that sframe-test.h does not belong in the top level include/.
my initial plan was to put it into libsframe/testsuite where it belongs.
Only when I saw the duplication required to do so did I decide to put it
into toplevel include which is already in the include path.
> Or even fix the makefile fragment duplication like this, and put
> sframe-test.h in libsframe/testsuite. I've taken out -Wall from
> testsuite_CPPFLAGS and -I$(srcdir) from AM_CPPFLAGS because they don't
> seem to be needed.
That works just fine indeed, thanks. I'll post a v3 patch soon.
Btw. how should I acknowledge your contribution to the patch? In
ChangeLog's it's easy to see, but without them you cannot. A
Coauthored-By: tag or some such?
> The testsuite object file naming is somewhat annoying too. I don't
> know how to wrestle automake into dropping testsuite_libsframe_decode_
> prefix here:
> CC testsuite/libsframe.decode/testsuite_libsframe_decode_be_flipping-be-flipping.o
True, that's ugly. However, I believe there's an underlying issue that
would fix that as a side effect: currently the testcases are built by
make -k check. When some or fall of them fail to compile, as in the
present case, the error is easily lost in the wad of output produced by
make -k check.
I believe that the tests should be built by runtest instead. This way,
every failure will be prominently visible in libsframe.sum, instead of
being hidden in the make output.
I usually use gcc's contrib/test_summary -t (used in toplevel make
mail-report.log) to collect all those summaries into a single file which
easily can be check for failures and regressions. libsframe build
failures would show up there, too.
libsframe is weird in another way: it doesn't use ChangeLog's unlike the
rest of binutils. Such inconsistencies are always confusing.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
More information about the Binutils
mailing list