]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[SFrame-V3] libsframe: testsuite: add a new test for SFrame V2
authorIndu Bhagat <indu.bhagat@oracle.com>
Fri, 16 Jan 2026 00:40:54 +0000 (16:40 -0800)
committerIndu Bhagat <indu.bhagat@oracle.com>
Fri, 16 Jan 2026 01:02:23 +0000 (17:02 -0800)
commit6150c6c06163feca4e6042fbaef4cd33ff1fb39e
tree9728d786769081d0cc5715ffa97f724c75bbd495
parentc1ca6c6bdb6d1a02dcc25597bf377d8cc396a412
[SFrame-V3] libsframe: testsuite: add a new test for SFrame V2

The existing frecnt-2.c testcase reads the SFrame section from the
provided DATA2 buffer.  It exercises the sframe_decode (),
sframe_decoder_get_num_fidx (), and sframe_decoder_get_funcdesc_v2 ()
APIs.  Currently DATA2 file is the SFrame section created from the test
input (mentioned in the comments in the file) in SFrame version 2
format.

Moving forward, creating SFrame V2 section via GNU assembler and GNU ld
will not be supported.  But textual dump of SFrame V2 sections via
readelf/objdump will need to be supported.  Add a test similar to
frecnt-2.c using SFrame version 2 binary data to the libsframe
testsuite.  Such a test will help ensure that sframe_decode () and
related APIs remain tested for multiple supported arches till the
support for dumping V2 sections is to be maintained.

Duplicate frecnt-2.c to create a frecnt-v2.c, the latter will test with
a SFrame V2 input section always.

Reviewed-by: Jens Remus <jremus@linux.ibm.com>
libsframe/
* Makefile.in: Regenerated.
libsframe/testsuite/
* libsframe.decode/decode.exp: Add new test.
* libsframe.decode/local.mk: Likewise
* libsframe.decode/DATA-V2: New SFrame V2 test data file.
* libsframe.decode/frecnt-v2.c: New test.
libsframe/Makefile.in
libsframe/testsuite/libsframe.decode/DATA-V2 [new file with mode: 0644]
libsframe/testsuite/libsframe.decode/decode.exp
libsframe/testsuite/libsframe.decode/frecnt-v2.c [new file with mode: 0644]
libsframe/testsuite/libsframe.decode/local.mk