Accepting request 289854 from Base:System

- 0001-use-correct-sort-method-in-test-array.patch: use correct test
  bsc#920930

OBS-URL: https://build.opensuse.org/request/show/289854
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kmod?expand=0&rev=30
This commit is contained in:
Dominique Leuenberger 2015-03-16 05:55:53 +00:00 committed by Git OBS Bridge
commit bcf2e27856
3 changed files with 50 additions and 1 deletions

View File

@ -0,0 +1,42 @@
From 813357548c7f9063996783e2ac8382501e32a4ed Mon Sep 17 00:00:00 2001
From: Marcus Meissner <meissner@suse.de>
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 *
---
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

View File

@ -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

View File

@ -36,6 +36,7 @@ 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
Patch6: kmod-blacklist-fixtest.patch
Patch7: 0001-use-correct-sort-method-in-test-array.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf
BuildRequires: automake
@ -100,7 +101,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 -P 7 -p1
%build
autoreconf -fi