blob: 314487aef67c4bda94c9d17440d683bb742fe245 [file] [log] [blame]
Andrew Geisslerc5535c92023-01-27 16:10:19 -06001From b84ecc2e3e56a25a3efd56c8942ad6bab3ff9ba1 Mon Sep 17 00:00:00 2001
Andrew Geissler517393d2023-01-13 08:55:19 -06002From: Changqing Li <changqing.li@windriver.com>
3Date: Fri, 2 Dec 2022 15:35:40 +0800
4Subject: [PATCH] tests/toolbox.inc.sh: update regex for getting endian
5
6Update regex for getting endian in following condition:
7/proc/777/exe: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2
8
Patrick Williamsb9af8752023-01-30 13:28:01 -06009Upstream-Status: Submitted [Submitted to keyrings@vger.kernel.org ]
Andrew Geissler517393d2023-01-13 08:55:19 -060010
11Signed-off-by: Changqing Li <changqing.li@windriver.com>
12---
13 tests/toolbox.inc.sh | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/tests/toolbox.inc.sh b/tests/toolbox.inc.sh
Andrew Geisslerc5535c92023-01-27 16:10:19 -060017index 8bf0db6f6d87..7ea2f253ba7d 100644
Andrew Geissler517393d2023-01-13 08:55:19 -060018--- a/tests/toolbox.inc.sh
19+++ b/tests/toolbox.inc.sh
20@@ -13,10 +13,10 @@
21 echo === $OUTPUTFILE ===
22
23 endian=`file -L /proc/$$/exe`
Andrew Geisslerc5535c92023-01-27 16:10:19 -060024-if expr "$endian" : '.* MSB \+\(pie executable\|executable\|shared object\).*' >&/dev/null
25+if expr "$endian" : '.* MSB .*\(pie executable\|executable\|shared object\).*' >&/dev/null
Andrew Geissler517393d2023-01-13 08:55:19 -060026 then
27 endian=BE
Andrew Geisslerc5535c92023-01-27 16:10:19 -060028-elif expr "$endian" : '.* LSB \+\(pie executable\|executable\|shared object\).*' >&/dev/null
29+elif expr "$endian" : '.* LSB .*\(pie executable\|executable\|shared object\).*' >&/dev/null
Andrew Geissler517393d2023-01-13 08:55:19 -060030 then
31 endian=LE
32 else
33--
Andrew Geisslerc5535c92023-01-27 16:10:19 -0600342.39.0
Andrew Geissler517393d2023-01-13 08:55:19 -060035