Hi,

--- Jiri Palecek <[EMAIL PROTECTED]> wrote:

> Hello,
> 
> the file_test detects MSB architectures by grepping for "power" or "ppc" in 
> /proc/cpuinfo. This is unfortunate if, on a LSB architecture, /proc/cpuinfo 
> contains the word "power_management". The attached patch should fix it.
> 
> Regards
>      Jiri Palecek
> 
> > From ad71c980668cda3c2eb96803c1cd1af936f17819 Mon Sep 17 00:00:00 2001
> From: Jiri Palecek <[EMAIL PROTECTED](none)>
> Date: Thu, 9 Oct 2008 01:50:55 +0200
> Subject: [PATCH] Implement a (hopefully) proper way of getting machine 
> endiannes in file_test.sh
> 
>   The old way tested if cpuinfo contained the word "power" for big
>   endian machine; this was easily confused by "power_management".
> ---
>  testcases/commands/ade/file/file_test.sh |    5 +----
>  1 files changed, 1 insertions(+), 4 deletions(-)
> 
> diff --git a/testcases/commands/ade/file/file_test.sh 
> b/testcases/commands/ade/file/file_test.sh
> index 79b7a2c..d9cd52f 100755
> --- a/testcases/commands/ade/file/file_test.sh
> +++ b/testcases/commands/ade/file/file_test.sh
> @@ -243,11 +243,8 @@ fi
>  
>  # Check ppc architecture
>    TEST_ARCH=LSB   # Assume the architecture is Intel
> -  PPC_MATCH=""
>  
> -  grep -q -i power /proc/cpuinfo && PPC_MATCH="y"
> -  grep -q -i ppc970 /proc/cpuinfo && PPC_MATCH="y"
> -  if [ -n "$PPC_MATCH" ]; then
> +  if uname -m | grep
> '\(m68k\)\|\(sparc\)\|\(powerpc\)\|\(ppc\)\|\(mips\b\)\|\(mipseb\)\|\(sh.eb\)';
>  then
>       TEST_ARCH=MSB
>    fi
>  

Since PPC_MATCH has been removed, you may want to remove this chunk as well.

  if [ -n "$PPC_MATCH" ]; then
     TEST_ARCH=MSB
  fi

Cai Qian

> -- 
> 1.5.6.5
> 
> Signed-off-by: Jiri Palecek <[EMAIL PROTECTED]>
> > -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/>
_______________________________________________
> Ltp-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ltp-list
> 



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to