aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-security/keyutils/files/0001-tests-toolbox.inc.sh-update-regex-for-getting-endian.patch
blob: 314487aef67c4bda94c9d17440d683bb742fe245 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From b84ecc2e3e56a25a3efd56c8942ad6bab3ff9ba1 Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Fri, 2 Dec 2022 15:35:40 +0800
Subject: [PATCH] tests/toolbox.inc.sh: update regex for getting endian

Update regex for getting endian in following condition:
/proc/777/exe: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2

Upstream-Status: Submitted [Submitted to keyrings@vger.kernel.org ]

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 tests/toolbox.inc.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/toolbox.inc.sh b/tests/toolbox.inc.sh
index 8bf0db6f6d87..7ea2f253ba7d 100644
--- a/tests/toolbox.inc.sh
+++ b/tests/toolbox.inc.sh
@@ -13,10 +13,10 @@
 echo === $OUTPUTFILE ===
 
 endian=`file -L /proc/$$/exe`
-if expr "$endian" : '.* MSB \+\(pie executable\|executable\|shared object\).*' >&/dev/null
+if expr "$endian" : '.* MSB .*\(pie executable\|executable\|shared object\).*' >&/dev/null
 then
     endian=BE
-elif expr "$endian" : '.* LSB \+\(pie executable\|executable\|shared object\).*' >&/dev/null
+elif expr "$endian" : '.* LSB .*\(pie executable\|executable\|shared object\).*' >&/dev/null
 then
     endian=LE
 else
-- 
2.39.0