summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/kbd
diff options
context:
space:
mode:
authorMingde (Matthew) Zeng <matthew.zeng@windriver.com>2020-01-22 15:20:03 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-27 16:48:08 +0000
commit1e709614b5d2d0b27b981dc622cb949ef43b241f (patch)
treeb840b9aaa508714c268a0a0469f3da2864c482aa /meta/recipes-core/kbd
parenta708aa347dbd36a7090d4ab14cf000ae8289f11e (diff)
downloadpoky-1e709614b5d2d0b27b981dc622cb949ef43b241f.tar.gz
kbd: make libkbdfile-test08 ptest work for multilib
This patch fixes kbd ptest libkbdfile-test08 failure in 64-bit images. ```sh root@intel-x86-64:/usr/lib64/kbd/ptest# ./run-ptest make: Entering directory '/usr/lib64/kbd/ptest/tests' make[1]: Entering directory '/usr/lib64/kbd/ptest/tests' PASS: libkbdfile-test01 PASS: libkbdfile-test02 PASS: libkbdfile-test03 PASS: libkbdfile-test04 PASS: libkbdfile-test05 PASS: libkbdfile-test06 PASS: libkbdfile-test07 FAIL: libkbdfile-test08 PASS: libkbdfile-test09 ... ``` `DATADIR` and `ABS_DATADIR` are compile flags defined in ./kbd/tests/Makefile.am. `DATADIR` is the relative directory of kbd, i.e `./kbd/ptest/tests` whereas `ABS_DATADIR` is the full directory path, i.e `/usr/lib/kbd/ptest/tests`. The latter has a problem when building ptests for a 64-bit image, because the tests folder is located at `/usr/lib64/kbd/ptest/tests` instead. Therefore `ABS_DATADIR` is changed to `DATADIR`, also consistent with what *every other* kbd test is doing. The test searches DATADIR recursively for a file named `test0.map`, but it finds the wrong file at `/findfile/test_0/keymaps/test0.map`, while it actually needs `/findfile/test_0/keymaps/i386/qwerty/test0.map`. Thus appending `/i386` to `dirpath` so that `libkbdfile-test08.c` finds the right test file. (From OE-Core rev: bdcda2c4ff3c96f686b8bd30cd17361ff3722a0f) Signed-off-by: Matthew Zeng<Matthew.Zeng@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/kbd')
-rw-r--r--meta/recipes-core/kbd/kbd/0001-Use-DATADIR-and-append-i386-to-fix-libkbdfile-test08.patch45
-rw-r--r--meta/recipes-core/kbd/kbd_2.2.0.bb1
2 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-core/kbd/kbd/0001-Use-DATADIR-and-append-i386-to-fix-libkbdfile-test08.patch b/meta/recipes-core/kbd/kbd/0001-Use-DATADIR-and-append-i386-to-fix-libkbdfile-test08.patch
new file mode 100644
index 0000000000..dc5236063b
--- /dev/null
+++ b/meta/recipes-core/kbd/kbd/0001-Use-DATADIR-and-append-i386-to-fix-libkbdfile-test08.patch
@@ -0,0 +1,45 @@
1From 4c12f76f4177cfd560cf708a16774ebfadbd41a5 Mon Sep 17 00:00:00 2001
2From: "Mingde (Matthew) Zeng" <matthew.zeng@windriver.com>
3Date: Wed, 22 Jan 2020 11:02:17 -0500
4Subject: [PATCH] Use DATADIR and append i386 to fix libkbdfile-test08 ptest
5 failure
6
7Replace ABS_DATADIR with DATADIR and append i386 to dirpath.
8
9Upstream-Status: Inappropriate [OE specific]
10
11This OE specific patch applies to kbd v2.2.0 for now, the upstream
12made drastic changes since v2.2.0, in fact they got rid of ABS_DATADIR
13in commit 5b6df5c along with a series of other commits which may or
14may not fix this issue. We will find out in future releases.
15
16Signed-off-by: Matthew Zeng<Matthew.Zeng@windriver.com>
17---
18 tests/libkbdfile-test08.c | 6 +++---
19 1 file changed, 3 insertions(+), 3 deletions(-)
20
21diff --git a/tests/libkbdfile-test08.c b/tests/libkbdfile-test08.c
22index bf41707..5e287f1 100644
23--- a/tests/libkbdfile-test08.c
24+++ b/tests/libkbdfile-test08.c
25@@ -14,14 +14,14 @@ main(int __attribute__((unused)) argc, char **argv)
26 if (!fp)
27 kbd_error(EXIT_FAILURE, 0, "unable to create kbdfile");
28
29- const char *const dirpath[] = { "", DATADIR "/findfile/test_0/keymaps/**", 0 };
30+ const char *const dirpath[] = { "", DATADIR "/findfile/test_0/keymaps/i386/**", 0 };
31 const char *const suffixes[] = { "", ".map", ".kmap", 0 };
32
33- const char *expect = ABS_DATADIR "/findfile/test_0/keymaps/i386/qwerty/test0.map";
34+ const char *expect = DATADIR "/findfile/test_0/keymaps/i386/qwerty/test0.map";
35
36 int rc = 0;
37
38- rc = kbdfile_find((char *)(ABS_DATADIR "/findfile/test_0/keymaps/i386/qwerty/test0"), (char **) dirpath, (char **) suffixes, fp);
39+ rc = kbdfile_find((char *)"test0", (char **) dirpath, (char **) suffixes, fp);
40
41 if (rc != 0)
42 kbd_error(EXIT_FAILURE, 0, "unable to find file");
43--
442.24.1
45
diff --git a/meta/recipes-core/kbd/kbd_2.2.0.bb b/meta/recipes-core/kbd/kbd_2.2.0.bb
index df9b0bb90b..e13cea7634 100644
--- a/meta/recipes-core/kbd/kbd_2.2.0.bb
+++ b/meta/recipes-core/kbd/kbd_2.2.0.bb
@@ -16,6 +16,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/${BP}.tar.xz \
16 file://run-ptest \ 16 file://run-ptest \
17 ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'file://set-proper-path-of-resources.patch', '', d)} \ 17 ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'file://set-proper-path-of-resources.patch', '', d)} \
18 file://0001-analyze.l-add-missing-string-format.patch \ 18 file://0001-analyze.l-add-missing-string-format.patch \
19 file://0001-Use-DATADIR-and-append-i386-to-fix-libkbdfile-test08.patch \
19 " 20 "
20 21
21SRC_URI[md5sum] = "d1d7ae0b5fb875dc082731e09cd0c8bc" 22SRC_URI[md5sum] = "d1d7ae0b5fb875dc082731e09cd0c8bc"