]> git.pld-linux.org Git - packages/kmod.git/commitdiff
upstream patch to fix flaky test; rel 2 auto/th/kmod-30-2
authorJan Palus <atler@pld-linux.org>
Fri, 1 Jul 2022 11:32:34 +0000 (13:32 +0200)
committerJan Palus <atler@pld-linux.org>
Fri, 1 Jul 2022 11:32:34 +0000 (13:32 +0200)
kmod.spec
uninitialized-var-in-test.patch [new file with mode: 0644]

index 8940933208cc915b3bbb2d05788d2fbce6c7169a..ef348c313ecb0075f40083527a8c0404d9302d0e 100644 (file)
--- a/kmod.spec
+++ b/kmod.spec
@@ -15,7 +15,7 @@ Summary:      Linux kernel module handling
 Summary(pl.UTF-8):     Obsługa modułów jądra Linuksa
 Name:          kmod
 Version:       30
-Release:       1
+Release:       2
 License:       GPL v2+
 Group:         Applications/System
 Source0:       https://www.kernel.org/pub/linux/utils/kernel/kmod/%{name}-%{version}.tar.xz
@@ -24,6 +24,7 @@ Source1:      %{name}-blacklist
 Source2:       %{name}-usb
 Patch0:                %{name}-modprobe.d-kver.patch
 Patch1:                %{name}-depmod.d-kver.patch
+Patch2:                uninitialized-var-in-test.patch
 URL:           https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git
 BuildRequires: autoconf >= 2.64
 BuildRequires: automake >= 1:1.11
@@ -151,6 +152,7 @@ Wiązania Pythona 3 do API kmod.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 %{__libtoolize}
diff --git a/uninitialized-var-in-test.patch b/uninitialized-var-in-test.patch
new file mode 100644 (file)
index 0000000..75d40ad
--- /dev/null
@@ -0,0 +1,31 @@
+From 16c086f48c2270ad6412ad7226df53079f825270 Mon Sep 17 00:00:00 2001
+From: Jan Engelhardt <jengelh@inai.de>
+Date: Thu, 30 Jun 2022 18:47:25 +0200
+Subject: testsuite: repair read of uninitialized memory
+
+Function ``test_backoff_time`` does not initialize ``delta``, and
+``get_backoff_delta_msec`` then performs a read from uninitialized
+memory with the ``!*delta`` expression.
+
+Signed-off-by: Jan Engelhardt <jengelh@inai.de>
+Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
+---
+ testsuite/test-util.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testsuite/test-util.c b/testsuite/test-util.c
+index fb8c9ef..5766584 100644
+--- a/testsuite/test-util.c
++++ b/testsuite/test-util.c
+@@ -231,7 +231,7 @@ DEFINE_TEST(test_addu64_overflow,
+ static int test_backoff_time(const struct test *t)
+ {
+-      unsigned long long delta;
++      unsigned long long delta = 0;
+       /* Check exponential increments */
+       get_backoff_delta_msec(now_msec(), now_msec() + 10, &delta);
+-- 
+cgit 
+
This page took 0.140024 seconds and 4 git commands to generate.