Skip to contentSkip to conversation

Modified readlink command option in kbd-ptest

PATCH Khem Raj 1 participant 1 message Nov 28, 2019 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Khem Raj

author
#1 lore raw
Quoted 66 lines · Saloni Jain

From: "Aditya.Tayade" <[email protected]>

In embedded box, readlink might be provided by another providers like Busybox, which does not support '-e' option. Hence, use generic options whenever possible.
Here used 'readlink -e' option is not necessary, hence removed it and used 'readlink -f' option which fixes the below tests:
1. alt-is-meta
2. dumpkeys-fulltable

This fixes below error:
readlink: invalid option -- 'e'
BusyBox v1.27.2 (2019-10-22 14:56:17 UTC) multi-call binary.

Upstream-Status: Pending

---
 .../0001-modify-readlink-command-option.patch      | 46 ++++++++++++++++++++++
 recipes-core/kbd/kbd_%.bbappend                    |  5 +++
 2 files changed, 51 insertions(+)
 create mode 100644 recipes-core/kbd/files/0001-modify-readlink-command-option.patch
 create mode 100644 recipes-core/kbd/kbd_%.bbappend
recipes-core/kbd/files/0001-modify-readlink-command-option.patch new file +36 -0
new file mode 100644
index 0000000..df392de
@@ -0,0 +1,46 @@
+kbd-ptest: Modify readlink command option
+
+On target image, readlink binary is provided by Busybox which doesnot
+support '-e' option. Hence, modified below failing tests to
+use '-f' option instead of '-e':
+1.alt-is-meta
+2.dumpkeys-fulltable
+
+This fixes below error:
+readlink: invalid option -- 'e'
+BusyBox v1.27.2 (2019-10-22 14:56:17 UTC) multi-call binary.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Vivek Chaudhari <[email protected]>
+---
+ tests/alt-is-meta.in        | 2 +-
+ tests/dumpkeys-fulltable.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/alt-is-meta.in b/tests/alt-is-meta.in
+index ddd5ed8..0a76bd3 100755
+--- a/tests/alt-is-meta.in
++++ b/tests/alt-is-meta.in
+@@ -1,6 +1,6 @@
+ #!/bin/sh -efu
+
+-cwd="$(readlink -ev "${0%/*}")"
++cwd="$(readlink -fv "${0%/*}")"
+
+ cd "$cwd"
+
+diff --git a/tests/dumpkeys-fulltable.in b/tests/dumpkeys-fulltable.in
+index 86af9e2..ef0ef71 100755
+--- a/tests/dumpkeys-fulltable.in
++++ b/tests/dumpkeys-fulltable.in
+@@ -1,6 +1,6 @@

recipes-core/kbd/files/0001-modify-readlink-command-option.patch line 46

Quoted 10 lines
recipes-core/kbd/files/0001-modify-readlink-command-option.patch new file +10 -0
+ #!/bin/sh -efu
+
+-cwd="$(readlink -ev "${0%/*}")"
++cwd="$(readlink -fv "${0%/*}")"
+
+ cd "$cwd"
+
+--
+2.7.4
+

the patch looks ok. Please submit it to upstream kbd as well.

recipes-core/kbd/kbd_%.bbappend line 5

Quoted 11 lines
recipes-core/kbd/kbd_%.bbappend new file +5 -0
new file mode 100644
index 0000000..ee8ea98
@@ -0,0 +1,5 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI += "\
+    file://0001-modify-readlink-command-option.patch \
+"

No need to have a bbappend, please stick the patch in main recipe.

Quoted 4 lines

--
2.7.4

This message contains information that may be privileged or confidential and is the property of the KPIT Technologies Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Technologies Ltd. does not accept any liability for virus infected mails.