>From f6185a75448c395795182ed1e568484056e7a2bf Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Fri, 22 Feb 2013 23:42:59 +0100 Subject: [PATCH] libdwfl: Try opening files all installed compression libraries. rhbz #909481. When a compression library wasn't installed libdwfl would not try the next compression library for opening a file. Retry with the next available compression library if a previous one isn't installed. Also disable tests that depend on a particular compression library (run-readelf-s.sh and run-dwflsyms.sh) if that library isn't installed. Signed-off-by: Mark Wielaard --- libdwfl/ChangeLog | 5 +++++ libdwfl/open.c | 6 +++--- tests/ChangeLog | 5 +++++ tests/Makefile.am | 5 ++++- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index 1311dea..78139ba 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,3 +1,8 @@ +2013-02-22 Mark Wielaard + + * open.c (__libdw_gunzip,__libdw_bunzip2,__libdw_unlzma): Define + as DWFL_E_BADELF when not used. + 2013-02-10 Mark Wielaard * argp-std.c (parse_opt): Use opt->core and opt->e explicitly in diff --git a/libdwfl/open.c b/libdwfl/open.c index 7dd5b52..40aac38 100644 --- a/libdwfl/open.c +++ b/libdwfl/open.c @@ -33,15 +33,15 @@ #include #if !USE_ZLIB -# define __libdw_gunzip(...) false +# define __libdw_gunzip(...) DWFL_E_BADELF #endif #if !USE_BZLIB -# define __libdw_bunzip2(...) false +# define __libdw_bunzip2(...) DWFL_E_BADELF #endif #if !USE_LZMA -# define __libdw_unlzma(...) false +# define __libdw_unlzma(...) DWFL_E_BADELF #endif /* Consumes and replaces *ELF only on success. */ diff --git a/tests/ChangeLog b/tests/ChangeLog index c1e0ef9..d181cd5 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2013-02-22 Mark Wielaard + + * Makefile.am (TESTS): Remove run-readelf-s.sh and run-dwflsyms.sh. + (LZMA): Add run-readelf-s.sh and run-dwflsyms.sh to TESTS. + 2013-02-15 Mark Wielaard * testfile-dwzstr.bz2: New testfile. diff --git a/tests/Makefile.am b/tests/Makefile.am index 44b4e61..63184f8 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -83,7 +83,6 @@ TESTS = run-arextract.sh run-arsymtest.sh newfile test-nlist \ run-test-flag-nobits.sh run-prelink-addr-test.sh \ run-dwarf-getstring.sh run-rerequest_tag.sh run-typeiter.sh \ run-readelf-d.sh run-readelf-gdb_index.sh run-unstrip-n.sh \ - run-readelf-s.sh run-dwflsyms.sh \ run-low_high_pc.sh run-macro-test.sh run-elf_cntl_gelf_getshdr.sh \ run-test-archive64.sh run-readelf-vmcoreinfo.sh \ run-readelf-mixed-corenote.sh @@ -93,6 +92,10 @@ check_PROGRAMS += msg_tst md5-sha1-test TESTS += msg_tst md5-sha1-test endif +if LZMA +TESTS += run-readelf-s.sh run-dwflsyms.sh +endif + if HAVE_LIBASM check_PROGRAMS += $(asm_TESTS) TESTS += $(asm_TESTS) -- 1.7.1