summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* libelf/elf_newscn.c: fix build failure against gcc-14 (-Walloc-size)upstream/masterSergei Trofimovich2023-11-031-3/+3
| | | | | | | | | | | | | | | | | | | `gcc-14` adde a new -Walloc-size warning that makes sure that size of an individual element matches size of a pointed type: https://gcc.gnu.org/PR71219 `elfutils` triggers is on `calloc()` call where member size is sued as `1`. elf_newscn.c: In function `elf_newscn`: elf_newscn.c:97:12: error: allocation of insufficient size «1» for type «Elf_ScnList» with size «16» [-Werror=alloc-size] 97 | newp = calloc (sizeof (Elf_ScnList) | ^ The change swaps arguments to pass larger value as a member size. Signed-off-by: Sergei Trofimovich <[email protected]>
* tests: Optionally dump all units in dwarf-getmacrosOmar Sandoval2023-11-022-10/+44
| | | | | | | If instead of a CU offset an empty string is given as the second argument, dump all units. Signed-off-by: Omar Sandoval <[email protected]>
* tests: Handle DW_MACRO_{define,undef}_{strx,sup} in dwarf-getmacrosOmar Sandoval2023-11-022-0/+10
| | | | Signed-off-by: Omar Sandoval <[email protected]>
* readelf: Support .gdb_index version 9Aaron Merey2023-11-025-5/+165
| | | | | | | | | | | Version 9 adds a "shortcut table" to the index. The shortcut table contains the name and language of the main function, if it exists. A testcase added in this patch uses an executable written with Fortran. This is because gdb does not currently populate the shortcut table of C/C++ programs (see sourceware PR30996). Signed-off-by: Aaron Merey <[email protected]>
* libdw, libdwfl: Save original path of ELF fileOmar Sandoval2023-11-029-25/+65
| | | | | | | | | | libdw and libdwfl currently save the path of the directory containing the ELF file to use when searching for alt and dwo files. To search for dwp files, we need the file name too. Add an elfpath field to Dwarf, and set the debugdir field from it. Also update libdwfl to set elfpath and debugdir. Signed-off-by: Omar Sandoval <[email protected]>
* debuginfod-client.c: Don't print empty line in header_callbackAaron Merey2023-11-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | libcurl passes an empty line to header_callback indicating the end of the response's HTTP headers. Currently this empty line is printed to the debuginfod_client's verbose_fd with a "header" prefix: $ echo $DEBUGINFOD_URLS https://debuginfod.fedoraproject.org/ $ debuginfod-find -vv debuginfo e2bbf033b548021c37866429f12a99bd33bd6e8d [...] header x-fedora-requestid: ZULLx0PPA8nmj8c8Hw-RtAACgAE header server: Apache header [...] Prevent this unnecessary line of output by only printing non-empty lines in header_callback. Signed-off-by: Aaron Merey <[email protected]>
* dwfl_offline_section_address: replace asserts with early returnAaron Merey2023-11-011-4/+5
| | | | | | | | | | | | | | dwfl_offline_section_address asserts that the current module is ET_REL. A possibly corrupt .gnu_debuglink can cause an abort by calling dwfl_offline_section_address on an ET_DYN module. Prevent this abort and similar ones by replacing dwfl_offline_section_address initial asserts with an early return. https://sourceware.org/bugzilla/show_bug.cgi?id=30980 Signed-off-by: Aaron Merey <[email protected]>
* libdw: Recognize .debug_[ct]u_index sections in dwarf_elf_beginOmar Sandoval2023-11-013-26/+37
| | | | | | | | | | | | | | | DWARF package (.dwp) files have a .debug_cu_index section and, optionally, a .debug_tu_index section. Add them to the list of DWARF sections. Unfortunately, it's not that simple: the other debug sections in a dwp file have names ending with .dwo, which confuses the checks introduced by commit 5b21e70216b8 ("libdw: dwarf_elf_begin should use either plain, dwo or lto DWARF sections."). So, we also have to special case .debug_cu_index and .debug_tu_index in scn_dwarf_type and check_section to treat them as TYPE_DWO sections. Signed-off-by: Omar Sandoval <[email protected]>
* libdw: ignore really large discriminatorMark Wielaard2023-11-011-1/+7
| | | | | | | | | | | | llvm can create really large discriminator values. We used to flag those as invalid when the value wouldn't fit in 24 bits. Just truncate the value. * libdw/dwarf_getsrclines.c (add_new_line): Define SETX. Use SETX to set discriminator. https://sourceware.org/bugzilla/show_bug.cgi?id=30967 Signed-off-by: Mark Wielaard <[email protected]>
* CONTRIBUTING: Update ChangeLog policy, mention patchwork and try botsMark Wielaard2023-10-251-2/+36
| | | | Signed-off-by: Mark Wielaard <[email protected]>
* PR 30000: debuginfod-find should have a source-list verbHousam Alamour2023-10-248-3/+414
| | | | | | | | | | | | | | | | | | * seclines.cxx: Introduce new tool that compiles a list of source files associated with a specified dwarf/elf file. This compilation relies on searching the dwarf debug information, which can be automatically retrieved via debuginfod using libdwfl functions when required. The target file can encompass various types, such as an executable, a coredump, a running process, or the currently executing kernel. The source file names are rendered as unique entries and then displayed on the standard output. * run-srcfiles-self.sh: New test-case for tool. https://sourceware.org/bugzilla/show_bug.cgi?id=30000 Signed-off-by: Housam Alamour <[email protected]>
* CONTRIBUTING: Switch from real name policy to know identity policyMark Wielaard2023-10-191-1/+3
| | | | Signed-off-by: Mark Wielaard <[email protected]>
* libelf: Make elf32_getchdr and elf64_getchdr thread-safeHeather McIntyre2023-10-146-44/+85
| | | | | | | | | | | | | | | * libelf/elf32_getchdr.c: Move getchdr function to elf32_getchdr.h. * libelf/elf32_getchdr.h: New file. Add macro to create getchdr_wrlock. * libelf/elf32_updatenull.c: Change call from getchdr to getchdr_wrlock. * libelf/elf_getdata.c: Add elf_getdata_wrlock. * libelf/libelfP.h: Add internal function declarations. * libelf/Makefile.am (noinst_HEADERS): Add elf32_getchdr.h. Signed-off-by: Heather S. McIntyre <[email protected]> Signed-off-by: Mark Wielaard <[email protected]>
* libelf: Fix elf_end deadlockHeather McIntyre2023-10-141-1/+4
| | | | | | | | * libelf/elf_end.c (elf_end): Add rwlock_unlock before early return. Signed-off-by: Heather S. McIntyre <[email protected]> Signed-off-by: Mark Wielaard <[email protected]>
* libelf: Make elf_version thread-safeHeather McIntyre2023-10-141-1/+10
| | | | | | | | | * elf_version.c (version_once): Define once. (initialize_version): New static function. (elf_version): Use initialize_version version_once. Signed-off-by: Heather S. McIntyre <[email protected]> Signed-off-by: Mark Wielaard <[email protected]>
* lib: Add new once_define and once macros to eu-config.hHeather McIntyre2023-10-141-0/+7
| | | | | | | | * lib/eu-config.h New macros. [USE_LOCKS] (ONCE_CALL): (once_define, once) Signed-off-by: Heather S. McIntyre <[email protected]> Signed-off-by: Mark Wielaard <[email protected]>
* libelf: Sync elf.h from glibcYing Huang2023-10-131-2/+107
| | | | | MIPS add new ELF file header flags, new relocations and new section type SHT_MIPS_ABIFLAGS.
* PR30962: debuginfod: full paths for X-DEBUGINFOD-FILE/ARCHIVE response headersFrank Ch. Eigler2023-10-113-26/+47
| | | | | | | | | | Previous code was inconsistent in offering basename versus full pathname for these headers. The documentation was not explicit on this issue. We now simplify by always passing full names back, and document this in the debuginfod.8 man page, along with pointers to how to use proxy front-end servers to strip them if needed. Signed-Off-By: Frank Ch. Eigler <[email protected]>
* libdw: Skip zero entries in arangesMark Wielaard2023-10-091-2/+15
| | | | | | | | | | | | | | | | An address/length entry of two zeros is supposed to mark the end of a table. But in some cases a producer might leave zero entries in the table (for example when using gcc -ffunction-sections -gc-sections). Since we know the lenght of the table we can just skip such entries and continue to the end. * libdw/dwarf_getaranges.c (dwarf_getaranges): Calculate endp. When seeing two zero values, check we are at endp. https://sourceware.org/bugzilla/show_bug.cgi?id=27805 Signed-off-by: Mark Wielaard <[email protected]>
* strip: Clean up a bit more after errorsMark Wielaard2023-10-061-6/+3
| | | | | | | | | | | | In some cases (late) errors would exit early without cleanup. Set result to 1 (failure) in those cases and fallthrough. That way we cleanup and might provide more hints to the user about what was wrong with the file. * src/strip.c (handle_elf): Set result to 1 and fallthrough instead of return 1. Signed-off-by: Mark Wielaard <[email protected]>
* libdw: Handle split DWARF in dwarf_macro_getsrcfilesOmar Sandoval2023-10-034-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Macro information references file names from the line number information table, which is tricky in split DWARF for a couple of reasons. First, the line number information for a macro unit comes from the .debug_line.dwo section in the split file, not the .debug_line section in the skeleton file. This was not specified in the GNU DebugFission design document [1] or the DWARF 5 standard, but it is how GCC and Clang behave in practice and was clarified in DWARF standard issue 200602.1 [2] for the upcoming DWARF 6 standard. dwarf_macro_getsrcfiles uses the line number information from whichever Dwarf handle it was passed. This is error-prone, since the most natural thing to do is to pass the skeleton Dwarf handle. Fix this by storing the appropriate Dwarf handle in Dwarf_Macro_Op_Table and using that one. Second, for .debug_macinfo.dwo in GNU DebugFission (generated by gcc -gdwarf-4 -gstrict-dwarf -gsplit-dwarf), the offset into .debug_line.dwo is implicitly 0. Again, this isn't in any specification, but it's how GCC behaves in practice (Clang never generates macro information for DWARF 4 split DWARF). Make get_macinfo_table default to 0 for split DWARF when it can't find DW_AT_stmt_list. 1: https://gcc.gnu.org/wiki/DebugFission 2: https://dwarfstd.org/issues/200602.1.html Signed-off-by: Omar Sandoval <[email protected]>
* libdw: Fix dwarf_macro_getsrcfiles for DWARF 5Omar Sandoval2023-10-034-6/+28
| | | | | | | | | | | | | | | | | Dwarf_Macro_Op_Table::is_64bit conflates the address size and the offset size: for .debug_macinfo, it is initialized based on the compilation unit's address size, but for .debug_macro, it is initialized based on the macro unit's offset size. is_64bit is used to determine the address size to pass to __libdw_getsrclines. For a 64-bit architecture using DWARF 5 with 32-bit offsets (the common case), this fails because read_srclines checks that the given address size matches the address size from the line number program header. Fix it by splitting is_64bit into separate address_size and offset_size members. Fixes: fb90bf3f84b5 ("Support .debug_macro") Signed-off-by: Omar Sandoval <[email protected]>
* libdw: Handle other string forms in dwarf_macro_param2Omar Sandoval2023-10-032-6/+18
| | | | | | | | | | | dwarf_getmacros handles the additional macro string forms added by DWARF 5, but dwarf_macro_param2 doesn't. Update it with the list of all string forms allowed in .debug_macro. In particular, GCC and Clang generate DW_MACRO_define_strx and DW_MACRO_undef_strx, which dwarf_macro_param2 couldn't handle. Fixes: cdf865b890c2 ("readelf, libdw: Handle DWARF5 .debug_macro.") Signed-off-by: Omar Sandoval <[email protected]>
* libdw: Handle DW_AT_ranges in split DWARF 5 skeleton in dwarf_rangesOmar Sandoval2023-10-032-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | When commit 879f3a4f99df ("libdw: Handle .debug_rnglists in dwarf_ranges.") added support for split DWARF 5 in 2018, GCC put all range lists for split DWARF in the .debug_rnglists section of the skeleton file (similarly to GNU DebugFission, which puts all range lists in .debug_ranges in the skeleton file). In 2021, after a discussion on the dwarf-discuss mailing list [1], GCC changed this to match Clang's behavior. Now, ranges are in .debug_rnglists.dwo in the split file, _except_ for one: the skeleton unit DIE has a DW_AT_ranges attribute, and its ranges are in .debug_rnglists in the skeleton file. See GCC commit 4b33c5aaab9e ("dwarf2out: Fix up ranges for -gdwarf-5 -gsplit-dwarf [PR99490]") and the Issue 210310.1 clarifying the DWARF standard [2]. Unfortunately, this confuses dwarf_ranges, which always uses .debug_rnglists.dwo if it exists. Fix it by special casing the unit DIE: its range lists should be in .debug_rnglists if that exists, and .debug_rnglists.dwo otherwise. 1: https://lists.dwarfstd.org/pipermail/dwarf-discuss/2021-March/002009.html 2: https://dwarfstd.org/issues/210310.1.html Signed-off-by: Omar Sandoval <[email protected]>
* libdw: Handle split DWARF in dwarf_entrypcOmar Sandoval2023-10-034-14/+17
| | | | | | | | | If a DIE has no DW_AT_entry_pc attribute, dwarf_entrypc looks for DW_AT_low_pc in that DIE. But for a split compilation unit DIE, DW_AT_low_pc is in the corresponding skeleton DIE, so this fails. dwarf_lowpc already handles this fallback, so use it instead. Signed-off-by: Omar Sandoval <[email protected]>
* libdw: Make try_split_file staticOmar Sandoval2023-10-032-1/+5
| | | | | | It's only used in libdw_find_split_unit.c. Signed-off-by: Omar Sandoval <[email protected]>
* PR30879: intermittent debuginfod crash with unhandled exceptionFrank Ch. Eigler2023-09-222-17/+47
| | | | | | | | | | | Code inspection identified two places where sqlite_ps objects were being created/used outside try/catch protection. This patch wraps or replaces them. * configure.ac: Look for glibc backtrace headers. * debuginfod.cxx (scan): New function wrapped by a try/catch loop. (sqlite_checkpoint_pb): Use non-exception-producing sqlite functions. (main, my_terminate_handler): New terminate() handler.
* libelf: tdelete dummy key if anything goes wrong setting up rawchunkMark Wielaard2023-09-111-2/+6
| | | | | | | | | | | | | elf_getdata_rawchunk uses a binary search tree cache. If a rawchunk is not yet in the cache we setup a new entry. But if anything went wrong setting up the new rawchunk we would leave a NULL key in the cache. This could blow up the next search. Fix this by removing the (dummy) key from the cache on any failure. * libelf/elf_getdata_rawchunk.c (elf_getdata_rawchunk): Don't assign NULL to *found. Call tdelete if anything goes wrong. Signed-off-by: Mark Wielaard <[email protected]>
* libelf: fix typos in commentCOCOCO X2023-09-102-1/+5
| | | | | | bug -> but Signed-off-by: Yanglin Xun <[email protected]>
* tests: Fix system_elf_gelf_test build without system libelf.hMark Wielaard2023-09-041-1/+6
| | | | | | | | | | | | | | | | | | | | | | If there is no system libelf.h then the building of system-elf-gelf-test fails with: ../libelf/gelf.h:32:10: fatal error: libelf.h: No such file or directory This is because although the testcase includes the headers as ../libelf/libelf.h and ../libelf/gelf.h, gelf.h itself does an Fix this by putting a copy of libelf.h in the build test directory and using -I. for building system-elf-gelf-test. * tests/Makefile.am (BUILT_SOURCES): New for libelf.h. (CLEANFILES): Add libelf.h. (libelf.h): New target that copies srdir libelf.h. (system_elf_gelf_test_CPPFLAGS): Add -I. https://sourceware.org/bugzilla/show_bug.cgi?id=30812 Signed-off-by: Mark Wielaard <[email protected]>
* PR30809: improve debuginfod client progress-callback parametersFrank Ch. Eigler2023-08-291-14/+28
| | | | | | | | | | | | | | * debuginfod-client.c (debuginfod_query_server): Use fstat(3) of the file handle being downloaded into as the preferred source of download progress. Tested by hand, as the testsuite doesn't have enough machinery to simulate compressed vs. uncompressed service. Hand testing with (unmodified) fedora-38 gdb and debuginfod-find shows dramatically improved progress displays: all have quantitative figures when fetching from real (unmodified) upstream servers. Signed-off-by: Frank Ch. Eigler <[email protected]>
* backends: Update list of LoongArch relocationsXi Ruoyao2023-08-291-0/+9
| | | | | | | * backends/loongarch_reloc.def: Add DELETE, ALIGN, PCREL20_S2, CFA, ADD6, SUB6, ADD_ULEB128, SUB_ULEB128, 64_PCREL. Signed-off-by: Xi Ruoyao <[email protected]>
* libelf: Sync elf.h from GlibcXi Ruoyao2023-08-291-0/+9
| | | | | | | | Adds new LoongArch relocations. * elf.h: Update from glibc. Signed-off-by: Xi Ruoyao <[email protected]>
* libelf, readelf, elflint: Add RELR supportMark Wielaard2023-08-2912-14/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle RELR as defined here: https://groups.google.com/g/generic-abi/c/bX460iggiKg/m/YT2RrjpMAwAJ Introduce new ELF_T_RELR Elf_Type and handle it for SHT_RELR. Check various properties in elflint. Print RELR relocations in readelf. Just the entries with -U. Just the addresses with -N. And addresses plus symbol/offsets by default. Also add a test to check that gelf.h works with the system elf.h. * libebl/eblsectiontypename.c (ebl_section_type_name): Add RELR to knownstype. * libelf/elf32_updatenull.c (updatenull_wrlock): Handle sh_entsize for SHT_RELR. * libelf/gelf.h (GElf_Relr): New typedef for Elf64_Relr. * libelf/gelf_fsize.c (__libelf_type_sizes): Add ELF_T_RELR. * libelf/gelf_xlate.c (__elf_xfctstom): Likewise. * libelf/gelf_xlate.h: Add RELR as FUNDAMENTAL. * libelf/libelf.h (Elf_Type): Add ELF_T_RELR. Add RELR defines/typedefs if undefined in system elf.h. * libelf/libelfP.h: Define ELF32_FSZ_RELR and ELF64_FSZ_RELR. * src/elflint.c (check_reloc_shdr): Check she_entsize for ELF_T_RELR. (check_relr): New function. (check_dynamic): Handle DT_RELR. (special_sections): Add SHT_RELR. (check_sections): Call check_relr. * src/readelf.c (print_relocs): Also accept a Dwfl_Module. (handle_relocs_relr): New function. (print_dwarf_addr): Make static and declare early. (process_elf_file): Pass dwflmod to print_relocs. (handle_dynamic): Handle DT_RELRSZ and DTRELRENT. * system-elf-gelf-test.c: New test. * Makefile.am (TESTS): Add system-elf-gelf-test. (check_PROGRAMS): Likewise. (system_elf_gelf_test_CPPFLAGS): New variable. (system_elf_gelf_test_LDADD): Likewise. https://sourceware.org/bugzilla/show_bug.cgi?id=28495 Signed-off-by: Mark Wielaard <[email protected]>
* libelf: Remove elf_scncnt from libelf.mapMark Wielaard2023-08-281-1/+0
| | | | | | | | | | | | | elf_scncnt was never implemented. It was probably an old name for elf_getshnum (which was the deprecated name of the elf_getshdrnum alias). Just remove it from the map file * libelf/libelf.map (ELFUTILS_1.0): Remove elf_scncnt. https://sourceware.org/bugzilla/show_bug.cgi?id=30729 Reported-by: Kostadin Shishmanov <[email protected]> Signed-off-by: Mark Wielaard <[email protected]>
* libelf: Free and clear rawdata_base and zdata_base consistentlyMark Wielaard2023-08-022-2/+17
| | | | | | | | | | | | | | | | | | | | There could be a leak if a program called elf_strptr on a compressed section, but the program never requests the (uncompressed) section data, but does explicitly (re)compress that same section data. Fix this by explicitly always freeing and clearing the zdata_base and rawdata_base in __libelf_reset_rawdata and elf_compress. Also clear zdata_base in elf_end so the pointer isn't indeterminate when it is being used in a later comparison against rawdata_base. * libelf/elf_compress.c (elf_compress): Explicitly free zdata_base before clearing. (__libelf_reset_rawdata): Free zdata_base if it isn't (going to be) used for rawdata_base. Explicitly clear rawdata_base and zdata_base after free. * libelf/elf_end.c (elf_end): Clear zdata_base after free. Signed-off-by: Mark Wielaard <[email protected]>
* tests: run-lfs-symbols.sh needs gawkSam James2023-07-201-2/+2
| | | | | | | | | | | | | | | | | With awk=mawk, I get: ``` FAIL: run-lfs-symbols.sh ======================== First sanity-check that LFS detection works. checking ./testfile-nolfs awk: line 3: syntax error at or near / FAIL run-lfs-symbols.sh (exit status: 2) ``` * tests/run-lfs-symbols.sh: Call 'gawk' instead of 'awk'. Signed-off-by: Sam James <[email protected]>
* SECURITY: new fileFrank Ch. Eigler2023-07-034-2/+60
| | | | | | | | | | Policy drafted in April 2023. https://inbox.sourceware.org/elfutils-devel/[email protected]/ Added links to README, and mentioned in configury/spec files for installation. Signed-off-by: Frank Ch. Eigler <[email protected]>
* libelf: Replace list of elf_getdata_rawchunk results with a treeMark Wielaard2023-06-273-30/+52
| | | | | | | | | | | | | | | | | elf_getdata_rawchunks did a linear search to see if a chunk was already fetched. Replace this list with a binary search tree to make lookup faster when a lot of Elf_Data_Chunk were created. * libelf/libelfP.h (Elf_Data_Chunk): Remove next field. (struct Elf): Change the rawchunks type from Elf_Data_Chunk * to void *. * elf_getdata_rawchunk.c (chunk_compare): New static function. (elf_getdata_rawchunk): Use tsearch instead of a manual linked list. * elf_end.c (free_chunk): New static function. (elf_end): Call tdestroy instead of walking linked list. Signed-off-by: Mark Wielaard <[email protected]>
* backends: Update list of RISC-V relocationsAndreas Schwab2023-06-271-0/+4
| | | | | | | * backends/riscv_reloc.def: Add IRELATIVE, PLT32, SET_ULEB128, SUB_ULEB128. Signed-off-by: Andreas Schwab <[email protected]>
* libelf: Sync elf.h from glibcAndreas Schwab2023-06-271-3/+10
| | | | | | | | Adds new RISC-V relocations. * elf.h: Update from glibc. Signed-off-by: Andreas Schwab <[email protected]>
* debuginfod: Fix formatting in debuginfod_config_cacheMark Wielaard2023-06-221-14/+18
| | | | | | | | The formatting of debuginfod_config_cache in debuginfod-client.c was slightly off making it hard to see the program logic. Make sure lines are < 76 chars, and if { } else { } indentation follows GNU style. Signed-off-by: Mark Wielaard <[email protected]>
* tests: Use -N for run-readelf-self.sh.Mark Wielaard2023-06-171-1/+1
| | | | | | | | | The test doesn't really need to resolve all addresses and -N is really slow. * tests/run-readelf-self.sh: Add -N. Signed-off-by: Mark Wielaard <[email protected]>
* tests: Split up run-strip-reloc.sh test in three subtestsMark Wielaard2023-06-176-158/+171
| | | | | | | | | | | | | | | | | | | | | | | | This test can take a very long time under valgrind (on s390x). Split it into three tests for kernel modules, self-test and ppc64. That way the tests can run in parallel and each individual test produces a result (so the buildbot won't time out). Also change the comparison to elfcmp instead of doing readelf -a on both and compare the textual output. * tests/run-strip-reloc.sh: Split out generic part into... * tests/strip-reloc-subr.sh: ...this file. * tests/run-strip-reloc-ko.sh: New file. * tests/run-strip-reloc-ppc64.sh: New file. * tests/run-strip-reloc-self.sh: New file. * tests/Makefile.am (TESTS): Remove run-strip-reloc.sh. Add run-strip-reloc-ko.sh, run-strip-reloc-self.sh and run-strip-reloc-ppc64.sh (EXTRA_DIST): Remove run-strip-reloc.sh. Add strip-reloc-subr.sh, run-strip-reloc-ko.sh, run-strip-reloc-self.sh and run-strip-reloc-ppc64.sh. Signed-off-by: Mark Wielaard <[email protected]>
* tests: Really split run-copymany-sections.sh into separate testsMark Wielaard2023-06-175-45/+3
| | | | | | | | | | | | | | | | The previous commit 4fac1627c "tests: Split run-copymany-sections.sh into separate tests" duplicated the tests because they were still also done in the new test-copymany-subr.sh. Remove them really this time. Also don't source test-subr.sh twice, test-copymany-subr.sh already sources it, so the subtests don't have to also do it again. * tests/test-copymany-subr.sh: Remove actual tests. * tests/run-copymany-be32.sh: Remove . $srcdir/test-subr.sh. * tests/run-copymany-be64.sh: Likewise. * tests/run-copymany-le32.sh: Likewise. * tests/run-copymany-le64.sh: Likewise. Signed-off-by: Mark Wielaard <[email protected]>
* tests: Split run-copymany-sections.sh into separate testsMark Wielaard2023-06-176-3/+71
| | | | | | | | | | | | | | | | | | | | | | | | This test can take a very long time under valgrind (on s390x). Split it into four tests for big/little endian, 32/64 bit. That way the tests can run in parallel and each individual test produces a result (so the buildbot won't time out). * tests/run-copymany-sections.sh: Delete and move generic part into... * tests/test-copymany-subr.sh: ... here. * tests/run-copymany-be32.sh: New big endian 32 bit tests. * tests/run-copymany-be64.sh: New big endian 64 bit tests. * tests/run-copymany-le32.sh: New little endian 32 bit tests. * tests/run-copymany-le64.sh: New little endian 64 bit tests. * tests/Makefile.am (TESTS): Remove run-copymany-sections.sh, add run-copymany-be32.sh, run-copymany-le32.sh, run-copymany-be64.sh and run-copymany-le64.sh. (EXTRA_DIST): Remove run-copymany-sections.sh. Add test-copymany-subr.sh, run-copymany-be32.sh, run-copymany-le32.sh, run-copymany-be64.sh and run-copymany-le64.sh. Signed-off-by: Mark Wielaard <[email protected]>
* tests: Use readelf -N -w in run-strip-reloc.shMark Wielaard2023-06-171-5/+5
| | | | | | | | | With -N the test runs 4 times faster. And the address lookup is not essential for the test. * tests/run-strip-reloc.sh: Use readelf -N -w. Signed-off-by: Mark Wielaard <[email protected]>
* tests: Add a bit less and slightly smaller sections for addsectionsMark Wielaard2023-06-172-5/+7
| | | | | | | | | | | | | | | | | 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 <[email protected]>
* debuginfod: PR29696: enlarge run-debuginfod-federation-metrics.sh workload againFrank Ch. Eigler2023-06-161-2/+1
| | | | | | Now that the bug is fixed, we can let debuginfod have all the traffic. Signed-off-by: Frank Ch. Eigler <[email protected]>
* debuginfod: PR29696: Removed secondary fd close in cache config causing a ↵Ryan Goldberg2023-06-161-12/+18
| | | | | | race condition Signed-off-by: Ryan Goldberg <[email protected]>