From 56f1b1f5088acd044de14fe82928ab5239a1be8e15c521aa2a56138395405a17 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 6 Mar 2015 11:36:23 +0000 Subject: [PATCH 1/2] Accepting request 289634 from home:msmeissn:branches:Base:System - 0001-use-correct-sort-method-in-test-array.patch: use correct test bsc#920930 OBS-URL: https://build.opensuse.org/request/show/289634 OBS-URL: https://build.opensuse.org/package/show/Base:System/kmod?expand=0&rev=91 --- ...se-correct-sort-method-in-test-array.patch | 41 +++++++++++++++++++ kmod.changes | 6 +++ kmod.spec | 5 ++- 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 0001-use-correct-sort-method-in-test-array.patch diff --git a/0001-use-correct-sort-method-in-test-array.patch b/0001-use-correct-sort-method-in-test-array.patch new file mode 100644 index 0000000..7cbdbe7 --- /dev/null +++ b/0001-use-correct-sort-method-in-test-array.patch @@ -0,0 +1,41 @@ +From 813357548c7f9063996783e2ac8382501e32a4ed Mon Sep 17 00:00:00 2001 +From: Marcus Meissner +Date: Fri, 6 Mar 2015 08:57:10 +0100 +Subject: [PATCH] use correct sort method in test-array + +the pointers we get are char ** not char * +--- + testsuite/test-array.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/testsuite/test-array.c b/testsuite/test-array.c +index 3c72a8a..8e1b2ba 100644 +--- a/testsuite/test-array.c ++++ b/testsuite/test-array.c +@@ -90,6 +90,14 @@ static int test_array_append_unique(const struct test *t) + DEFINE_TEST(test_array_append_unique, + .description = "test array append unique"); + ++static int array_strcmp(void *a, void *b) ++{ ++ char *pa = *(char **)a; ++ char *pb = *(char **)b; ++ ++ return strcmp(pa, pb); ++} ++ + static int test_array_sort(const struct test *t) + { + struct array array; +@@ -104,7 +112,7 @@ static int test_array_sort(const struct test *t) + array_append(&array, c2); + array_append(&array, c3); + array_append(&array, c1); +- array_sort(&array, (int (*)(const void *a, const void *b)) strcmp); ++ array_sort(&array, (int (*)(const void *a, const void *b)) array_strcmp); + assert_return(array.count == 6, EXIT_FAILURE); + assert_return(array.array[0] == c1, EXIT_FAILURE); + assert_return(array.array[1] == c1, EXIT_FAILURE); +-- +2.1.4 + diff --git a/kmod.changes b/kmod.changes index 169c881..19b7508 100644 --- a/kmod.changes +++ b/kmod.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Mar 6 07:58:19 UTC 2015 - meissner@suse.com + +- 0001-use-correct-sort-method-in-test-array.patch: use correct test + bsc#920930 + ------------------------------------------------------------------- Sun Feb 22 10:41:40 UTC 2015 - meissner@suse.com diff --git a/kmod.spec b/kmod.spec index 3cb51e7..636af13 100644 --- a/kmod.spec +++ b/kmod.spec @@ -35,7 +35,10 @@ Patch2: 0003-libkmod-config-Recognize-allow_unsupported_modules-i.patch Patch3: 0009-libkmod-Implement-filtering-of-unsupported-modules-o.patch Patch4: 0010-modprobe-Implement-allow-unsupported-modules.patch Patch5: 0011-Do-not-filter-unsupported-modules-when-running-a-van.patch +# PATCH-MAILED-UPSTREAM: kmod-blacklist-fixtest.patch meissner@suse.de Patch6: kmod-blacklist-fixtest.patch +# PATCH-MAILED-UPSTREAM: 0001-use-correct-sort-method-in-test-array.patch meissner@suse.de bsc#920930 +Patch7: 0001-use-correct-sort-method-in-test-array.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake @@ -100,7 +103,7 @@ in %lname. %prep %setup -q -%patch -P 1 -P 2 -P 3 -P 4 -P 5 -P 6 -p1 +%patch -P 1 -P 2 -P 3 -P 4 -P 5 -P 6 -p1 -P 7 -p1 %build autoreconf -fi From bd0416e4178f174dce58f82125f4e5ba88a2a76cadb3778d6969a470750ce261 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 7 Mar 2015 17:25:21 +0000 Subject: [PATCH 2/2] Clean spec from cruft OBS-URL: https://build.opensuse.org/package/show/Base:System/kmod?expand=0&rev=92 --- 0001-use-correct-sort-method-in-test-array.patch | 1 + kmod.spec | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/0001-use-correct-sort-method-in-test-array.patch b/0001-use-correct-sort-method-in-test-array.patch index 7cbdbe7..c6eb0d6 100644 --- a/0001-use-correct-sort-method-in-test-array.patch +++ b/0001-use-correct-sort-method-in-test-array.patch @@ -2,6 +2,7 @@ From 813357548c7f9063996783e2ac8382501e32a4ed Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Fri, 6 Mar 2015 08:57:10 +0100 Subject: [PATCH] use correct sort method in test-array +Status: mailed to upstream the pointers we get are char ** not char * --- diff --git a/kmod.spec b/kmod.spec index 636af13..d1b67d8 100644 --- a/kmod.spec +++ b/kmod.spec @@ -35,9 +35,7 @@ Patch2: 0003-libkmod-config-Recognize-allow_unsupported_modules-i.patch Patch3: 0009-libkmod-Implement-filtering-of-unsupported-modules-o.patch Patch4: 0010-modprobe-Implement-allow-unsupported-modules.patch Patch5: 0011-Do-not-filter-unsupported-modules-when-running-a-van.patch -# PATCH-MAILED-UPSTREAM: kmod-blacklist-fixtest.patch meissner@suse.de Patch6: kmod-blacklist-fixtest.patch -# PATCH-MAILED-UPSTREAM: 0001-use-correct-sort-method-in-test-array.patch meissner@suse.de bsc#920930 Patch7: 0001-use-correct-sort-method-in-test-array.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf @@ -103,7 +101,7 @@ in %lname. %prep %setup -q -%patch -P 1 -P 2 -P 3 -P 4 -P 5 -P 6 -p1 -P 7 -p1 +%patch -P 1 -P 2 -P 3 -P 4 -P 5 -P 6 -P 7 -p1 %build autoreconf -fi