Hi,

This patch fixes file_test failure on s390(x).

Signed-off-by: Jeff Burke <[EMAIL PROTECTED]>
Signed-off-by: CAI Qian <[EMAIL PROTECTED]>

--- testcases/commands/ade/file/file_test.sh.orig       2008-10-21 
03:58:10.000000000 -0400
+++ testcases/commands/ade/file/file_test.sh    2008-10-21 04:11:46.000000000 
-0400
@@ -249,7 +249,9 @@
 # Check ppc architecture
   TEST_ARCH=LSB   # Assume the architecture is Intel
 
-  if uname -m | grep
'\(m68k\)\|\(sparc\)\|\(powerpc\)\|\(ppc\)\|\(mips\b\)\|\(mipseb\)\|\(sh.eb\)'; 
then
+  if uname -m |
+    grep -qe '\(m68k\)\|\(sparc\)\|\(mips\b\)\|\(mipseb\)\|\(sh.eb\)' \
+         -e '\(powerpc\)\|\(ppc\)\|\(s390\)'; then
      TEST_ARCH=MSB
   fi
 
@@ -506,6 +508,15 @@
 
 $LTPBIN/tst_resm TINFO "TEST #10: file command recognizes $KERNEL file"
 
+# S390 Work around for vmlinuz file type
+# Applesoft BASIC:
+#
+# This is incredibly sloppy, but will be true if the program was
+# written at its usual memory location of 2048 and its first line
+# number is less than 256.  Yuck.
+#0       belong&0xff00ff 0x80000 Applesoft BASIC program data
+#>2      leshort         x       \b, first line number %d
+
 # Red Hat creates a user-mode-linux vmlinuz file (ends in .uml) - ignore it
 KERNFILE=$(find /boot ! -type l -name "$KERNEL*" | grep -v '.uml' | tail -1)
 file $KERNFILE > $LTPTMP/file.out 2>&1
@@ -521,6 +532,7 @@
     grep -iq "kernel" $LTPTMP/file.out && MATCHED="y"
     grep -iq "compressed data" $LTPTMP/file.out && MATCHED="y"
     grep -iq "x86 boot sector" $LTPTMP/file.out && MATCHED="y"
+    grep -iq "Applesoft BASIC" $LTPTMP/file.out && MATCHED="y"
     if [ -n "$MATCHED" ]
     then
         $LTPBIN/tst_resm TPASS "file: Recognised $KERNEL file correctly"



-------------------------------------------------------------------------
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