]> git.ipfire.org Git - thirdparty/elfutils.git/commit
tests: Add a bit less and slightly smaller sections for addsections
authorMark Wielaard <mark@klomp.org>
Fri, 16 Jun 2023 23:40:38 +0000 (01:40 +0200)
committerMark Wielaard <mark@klomp.org>
Fri, 16 Jun 2023 23:40:38 +0000 (01:40 +0200)
commit8bcce843fd11ea5fcc1dd350db9069843757e94f
treea74bee5203991bb76cb6675f70c9aea8466549cb
parentb39afca988fe366589a869db42503c98ea580c5a
tests: Add a bit less and slightly smaller sections for addsections

The run-copymany-sections.sh testcase adds 64K sections (twice)
to a couple of times. Each section is just 6 bytes long, but each
data section is malloced and freed. That adds up. And is especially
slow when running under valgrind.

Reduce the number of sections added to 32K (twice) and make each
section data just one single zero byte.

* tests/addsections.c (add_sections): Don't strdup and free
the string ".extra", but just add the empty string.
* tests/run-copymany-sections.sh: Call addsections with
32768 instead of 65535.

Signed-off-by: Mark Wielaard <mark@klomp.org>
tests/addsections.c
tests/run-copymany-sections.sh