summaryrefslogtreecommitdiff
blob: 18344b94940edc55e90d1ecf60db3a5daeda1809 (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
36
37
38
39
40
41
42
43
patch from upstream

https://bugs.gentoo.org/426424

From f0d9a8c15f1525d0404077f32fddccb606a61bac Mon Sep 17 00:00:00 2001
From: Tyler Hicks <tyhicks@canonical.com>
Date: Mon, 24 Feb 2014 18:52:41 -0600
Subject: [PATCH] TEST: Make endianness detection work with file 5.14

The 5.14 release of file outputs an extra space after [LM]SB:

$ ./src/file -m magic/magic.mgc -L /proc/$$/exe
/proc/12755/exe: ELF 64-bit LSB  executable, ...

This was due to the elf magic file containing some trailing spaces in
the 5.14 release.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: David Howells <dhowells@redhat.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 cbc49e0fce23..fe3c7f71299a 100644
--- a/tests/toolbox.inc.sh
+++ b/tests/toolbox.inc.sh
@@ -17,10 +17,10 @@ includes=${includes%/*}/
 echo === $OUTPUTFILE ===
 
 endian=`file -L /proc/$$/exe`
-if expr "$endian" : '.* MSB executable.*' >&/dev/null
+if expr "$endian" : '.* MSB \+executable.*' >&/dev/null
 then
     endian=BE
-elif expr "$endian" : '.* LSB executable.*' >&/dev/null
+elif expr "$endian" : '.* LSB \+executable.*' >&/dev/null
 then
     endian=LE
 else
-- 
2.11.0