diff options
author | V3n3RiX <venerix@koprulu.sector> | 2025-04-11 08:43:59 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2025-04-11 08:43:59 +0100 |
commit | bb59556b3302a941db4630613c604644d5f7a617 (patch) | |
tree | 42e60b7ae227b0fe3af52dfac08d59653066a2db /dev-libs/libkdumpfile/files | |
parent | 3cd09a18bad26aad2645241b868755cfdf41b6ae (diff) |
Diffstat (limited to 'dev-libs/libkdumpfile/files')
4 files changed, 55 insertions, 189 deletions
diff --git a/dev-libs/libkdumpfile/files/libkdumpfile-0.5.4-32-bit-tests.patch b/dev-libs/libkdumpfile/files/libkdumpfile-0.5.4-32-bit-tests.patch deleted file mode 100644 index 4b5c0cb4c8fc..000000000000 --- a/dev-libs/libkdumpfile/files/libkdumpfile-0.5.4-32-bit-tests.patch +++ /dev/null @@ -1,73 +0,0 @@ -https://github.com/ptesarik/libkdumpfile/commit/16c73b83a78c1bfb55f3e9823b09fce549c8ec11 - -From 16c73b83a78c1bfb55f3e9823b09fce549c8ec11 Mon Sep 17 00:00:00 2001 -From: Petr Tesarik <petr@tesarici.cz> -Date: Thu, 23 May 2024 13:01:17 +0200 -Subject: [PATCH] Fix file cache test for 32-bit architectures - -If 64-bit file offsets are selected with _FILE_OFFSET_BITS on a 32-bit -architecture, the default mmap() call takes a 64-bit off_t, but dlsym() -returns a pointer to a function that takes a 32-bit off_t. - -To fix it: - -- always call original mmap64() if it is available, -- use XSTRINGIFY(mmap) instead of "mmap". - -The latter is needed, because some systems define mmap as a macro which -expands to another identifier. - -Fixes: #80 -Signed-off-by: Petr Tesarik <petr@tesarici.cz> ---- - configure.ac | 2 ++ - src/kdumpfile/test-fcache.c | 13 ++++++++++++- - 3 files changed, 15 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 04d1c6fa..93ebb39d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -61,6 +61,8 @@ AC_CHECK_SIZEOF(long) - AC_CHECK_SIZEOF(off_t) - AC_SUBST(SIZEOF_OFF_T, $ac_cv_sizeof_off_t) - -+AC_CHECK_FUNCS(mmap64) -+ - dnl This makes sure pkg.m4 is available. - m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config]) - -diff --git a/src/kdumpfile/test-fcache.c b/src/kdumpfile/test-fcache.c -index 1ed57447..604ed540 100644 ---- a/src/kdumpfile/test-fcache.c -+++ b/src/kdumpfile/test-fcache.c -@@ -64,9 +64,20 @@ static char *mmapbuf; - - static int failmmap; - -+#ifdef HAVE_MMAP64 -+ -+#define STR_MMAP XSTRINGIFY(mmap64) -+static void* (*orig_mmap)(void *addr, size_t length, int prot, int flags, -+ int fd, off64_t offset); -+ -+#else -+ -+#define STR_MMAP XSTRINGIFY(mmap) - static void* (*orig_mmap)(void *addr, size_t length, int prot, int flags, - int fd, off_t offset); - -+#endif -+ - void * - mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset) - { -@@ -445,7 +456,7 @@ main(int argc, char **argv) - return TEST_ERR; - } - -- orig_mmap = dlsym(RTLD_NEXT, "mmap"); -+ orig_mmap = dlsym(RTLD_NEXT, STR_MMAP); - if (!orig_mmap) { - fprintf(stderr, "Cannot get original mmap() address: %s\n", - dlerror()); diff --git a/dev-libs/libkdumpfile/files/libkdumpfile-0.5.4-c99.patch b/dev-libs/libkdumpfile/files/libkdumpfile-0.5.4-c99.patch deleted file mode 100644 index 959af60454ef..000000000000 --- a/dev-libs/libkdumpfile/files/libkdumpfile-0.5.4-c99.patch +++ /dev/null @@ -1,48 +0,0 @@ -https://github.com/ptesarik/libkdumpfile/commit/3682f5cad70146ab35d05af251d4461ef650b4b5 - -From 3682f5cad70146ab35d05af251d4461ef650b4b5 Mon Sep 17 00:00:00 2001 -From: Florian Weimer <fweimer@redhat.com> -Date: Thu, 4 Jan 2024 12:36:53 +0100 -Subject: [PATCH] Python 3 does not have a tp_print member in PyTypeObject - -This avoids an int-conversion compiler error with current -compilers: - -./kdumpfile.c:1449:9: error: initialization of 'long int' from 'int (*)(PyObject *, FILE *, int)' {aka 'int (*)(struct _object *, FILE *, int)'} makes integer from pointer without a cast - 1449 | attr_dir_print, /* tp_print*/ - | ^~~~~~~~~~~~~~ - - -In Python 3.11, the field at this position is called tp_vectorcall_offset -and has type Py_ssize_t, hence the error. ---- a/python/kdumpfile.c -+++ b/python/kdumpfile.c -@@ -1143,7 +1143,6 @@ attr_dir_repr(PyObject *_self) - Py_XDECREF(colon); - return result; - } --#endif - - static int - attr_dir_print(PyObject *_self, FILE *fp, int flags) -@@ -1214,6 +1213,7 @@ attr_dir_print(PyObject *_self, FILE *fp, int flags) - kdump_attr_iter_end(ctx, &iter); - return -1; - } -+#endif - - static PyObject * - attr_iterkey_new(PyObject *_self) -@@ -1446,7 +1446,11 @@ static PyTypeObject attr_dir_object_type = - sizeof(char), /* tp_itemsize*/ - /* methods */ - attr_dir_dealloc, /* tp_dealloc*/ -+#if PY_MAJOR_VERSION < 3 - attr_dir_print, /* tp_print*/ -+#else -+ 0, -+#endif - 0, /* tp_getattr*/ - 0, /* tp_setattr*/ - 0, /* tp_compare*/ - diff --git a/dev-libs/libkdumpfile/files/libkdumpfile-0.5.4-disabled-compression-tests.patch b/dev-libs/libkdumpfile/files/libkdumpfile-0.5.4-disabled-compression-tests.patch deleted file mode 100644 index 5748a27e1e81..000000000000 --- a/dev-libs/libkdumpfile/files/libkdumpfile-0.5.4-disabled-compression-tests.patch +++ /dev/null @@ -1,68 +0,0 @@ -https://github.com/ptesarik/libkdumpfile/commit/d529a573ab2cdbda501309e377007812e6de3351 - -From d529a573ab2cdbda501309e377007812e6de3351 Mon Sep 17 00:00:00 2001 -From: Stephen Brennan <stephen.s.brennan@oracle.com> -Date: Fri, 19 Jan 2024 11:52:24 -0800 -Subject: [PATCH] tests: skip tests which apply to disabled compression - -If configured --without-libzstd, for example, the diskdump-basic-zstd -test will return an ERROR code, causing "make check" to fail. Even using -XFAIL_TESTS will not resolve the error, because the return code is -ERROR, not FAIL. - -Instead, conditionally include the tests based on whether we are -compiling with each compression format. This way, we don't test -unsupported features. - -Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com> ---- - m4/compression.m4 | 1 + - tests/Makefile.am | 17 +++++++++++++---- - 2 files changed, 14 insertions(+), 4 deletions(-) - -diff --git a/m4/compression.m4 b/m4/compression.m4 -index 6755ef13..8cb7ce2d 100644 ---- a/m4/compression.m4 -+++ b/m4/compression.m4 -@@ -32,4 +32,5 @@ AC_SUBST([$2][_REQUIRES]) - AC_SUBST([$2][_CFLAGS]) - AC_SUBST([$2][_LIBS]) - AC_SUBST([$2][_PC_LIBS]) -+AM_CONDITIONAL(HAVE_$2, test "x$have_$1" = xyes) - ]) -diff --git a/tests/Makefile.am b/tests/Makefile.am -index 0c03b20b..8ac90b39 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -196,10 +196,6 @@ test_scripts = \ - diskdump-empty-s390x \ - diskdump-empty-x86_64 \ - diskdump-basic-raw \ -- diskdump-basic-zlib \ -- diskdump-basic-lzo \ -- diskdump-basic-snappy \ -- diskdump-basic-zstd \ - diskdump-flat-raw \ - diskdump-multiread \ - diskdump-excluded \ -@@ -331,6 +327,19 @@ test_scripts = \ - xlat-xen-x86_64-4.6-bigmem \ - zero-size - -+if HAVE_ZSTD -+test_scripts += diskdump-basic-zstd -+endif -+if HAVE_ZLIB -+test_scripts += diskdump-basic-zlib -+endif -+if HAVE_LZO -+test_scripts += diskdump-basic-lzo -+endif -+if HAVE_SNAPPY -+test_scripts += diskdump-basic-snappy -+endif -+ - dist_check_DATA = \ - addrmap-single-begin.expect \ - addrmap-single-middle.expect \ - diff --git a/dev-libs/libkdumpfile/files/libkdumpfile-0.5.5-parallel-tests.patch b/dev-libs/libkdumpfile/files/libkdumpfile-0.5.5-parallel-tests.patch new file mode 100644 index 000000000000..20282a7a2df2 --- /dev/null +++ b/dev-libs/libkdumpfile/files/libkdumpfile-0.5.5-parallel-tests.patch @@ -0,0 +1,55 @@ +https://github.com/ptesarik/libkdumpfile/commit/cc927b9e22ebe6de1a6ed23ca8d14d1f3d790fb5 + +From cc927b9e22ebe6de1a6ed23ca8d14d1f3d790fb5 Mon Sep 17 00:00:00 2001 +From: Petr Tesarik <petr@tesarici.cz> +Date: Fri, 27 Dec 2024 12:17:35 +0100 +Subject: [PATCH] tests: Fix xlat-linux-x86_64-6.11-pti-user-ver with parallel + runs + +The xlat-linux-x86_64-6.11-pti-user and xlat-linux-x86_64-6.11-pti-user-ver +test cases use the same input files, but the logic is flawed, because they +also use the same output file names. That fails if both run in parallel. + +Fixes: #85 +Signed-off-by: Petr Tesarik <petr@tesarici.cz> +--- + tests/xlat-linux-x86_64-6.11-pti-user-ver | 2 +- + tests/xlat-os-common | 11 ++++++----- + 2 files changed, 7 insertions(+), 6 deletions(-) + +diff --git a/tests/xlat-linux-x86_64-6.11-pti-user-ver b/tests/xlat-linux-x86_64-6.11-pti-user-ver +index 43d500d1..427985bc 100755 +--- a/tests/xlat-linux-x86_64-6.11-pti-user-ver ++++ b/tests/xlat-linux-x86_64-6.11-pti-user-ver +@@ -14,5 +14,5 @@ opts=( + osver=0x060b00 + ) + +-name=xlat-linux-x86_64-6.11-pti-user ++srcname=xlat-linux-x86_64-6.11-pti-user + . "$srcdir"/xlat-os-common +diff --git a/tests/xlat-os-common b/tests/xlat-os-common +index a308a743..7dcdee91 100644 +--- a/tests/xlat-os-common ++++ b/tests/xlat-os-common +@@ -4,13 +4,14 @@ + + mkdir -p out || exit 99 + +-if [ -z "$name" ]; then +- name=$( basename "$0" ) ++name=$( basename "$0" ) ++if [ -z "$srcname" ]; then ++ srcname="$name" + fi + resultfile="out/${name}.result" +-expectfile="$srcdir/$name.expect" +-symfile="$srcdir/$name.sym" +-datafile="$srcdir/$name.data" ++expectfile="$srcdir/$srcname.expect" ++symfile="$srcdir/$srcname.sym" ++datafile="$srcdir/$srcname.data" + cfgfile="out/${name}.cfg" + + optspec= + |