From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sfi-mx-4.v28.ch3.sourceforge.com ([172.29.28.124] helo=mx.sourceforge.net) by h25xhf1.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1MP7KH-0002VH-QD for ltp-list@lists.sourceforge.net; Fri, 10 Jul 2009 04:03:09 +0000 Received: from smtp103.biz.mail.in2.yahoo.com ([203.104.19.12]) by 1b2kzd1.ch3.sourceforge.com with smtp (Exim 4.69) id 1MP7K9-0003hh-Rq for ltp-list@lists.sourceforge.net; Fri, 10 Jul 2009 04:03:09 +0000 Received: from unknown (HELO Praveen) (praveen@primesoftsolutionsinc.com@[192.168.0.9]) (envelope-sender ) by 0 (qmail-ldap-1.03) with SMTP for ; 10 Jul 2009 03:56:48 -0000 From: "Praveen" Date: Fri, 10 Jul 2009 09:32:26 +0530 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_00CF_01CA0141.56505E10" Subject: [LTP] FW: FW: My first Patch List-Id: Linux Test Project General Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-list-bounces@lists.sourceforge.net Message-Id: To: subrata@linux.vnet.ibm.com Cc: ltp-list@lists.sourceforge.net, 'Nathan Straz' , 'Nate Straz' This is a multi-part message in MIME format. ------=_NextPart_000_00CF_01CA0141.56505E10 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, Apologies for the inconvenience Please find the patch attached with this email (Now "diff -uprN" is used to generate the patch) Thanks, Praveen Kumar k -----Original Message----- From: Subrata Modak [mailto:subrata@linux.vnet.ibm.com] Sent: Tuesday, July 07, 2009 9:03 PM To: Praveen Cc: ltp-list@lists.sourceforge.net; 'Naresh'; 'Nathan Straz' Subject: Re: FW: My first Patch Praveen. Please use this: diff -uprN to generate your patches. Regards-- Subrata On Tue, 2009-07-07 at 16:45 +0530, Praveen wrote: > Hi Subrata, > > > > Please find my first 'file' command test patch attached with this > email. > > > > I have added detailed description of what individual test case does at > the top > > of the test. Please feel free to review and provide me with your > comments. > > > > The 'file' command test case in LTP test suite exists in path: > > "ltp-xxx/testcases/commands/ade/file/" > > > > Thanks, > > Praveen Kumar k > > > > ------=_NextPart_000_00CF_01CA0141.56505E10 Content-Type: application/octet-stream; name="file_test.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="file_test.patch" --- file_test_old.sh 2009-07-07 14:15:51.000000000 +0530=0A= +++ file_test.sh 2009-07-07 14:05:58.000000000 +0530=0A= @@ -39,15 +39,97 @@=0A= # accordingly.=0A= =0A= =0A= -export TST_TOTAL=3D10 # Number of tests in this testcase=0A= +#=0A= +# Description of individual test cases=0A= +# ------------------------------------=0A= +#=0A= +# Test01: Test if file command recognizes ASCII text files=0A= +# -------=0A= +# 1) Write text to a known file =0A= +# 2) Use 'file' command to get the type of the known file=0A= +# Ex: file xyz.txt=0A= +# 3) Grep for the keyword "ASCII text" in the output of the =0A= +# 'file' command=0A= +# 4) Declare test as PASS if above step is successful else =0A= +# declare test as FAIL=0A= +#=0A= +# Test02: Test if file command can recognize bash shell script=0A= +# -------=0A= +# 1) Write a small bash shell script to a known file=0A= +# 2) Use 'file' command to get the type of the known file=0A= +# Ex: file xyz.sh=0A= +# 3) Grep for the keyword "Bourne-Again shell script" in =0A= +# the output of the 'file' command=0A= +# 4) Declare test as PASS if above step is successful else =0A= +# declare test as FAIL=0A= +#=0A= +# Test03: Test if file command can recognize bash shell script=0A= +# -------=0A= +# Similar test(as Test02) is performed with Korn shell script=0A= +#=0A= +# Test04: Test if file command can recognize C shell script=0A= +# -------=0A= +# Similar test(as Test02) is performed with C shell script=0A= +#=0A= +# Test05: Test if file command can recognize C program text=0A= +# -------=0A= +# Similar test(as Test02) is performed with C program text=0A= +#=0A= +# Test06: Test if file command can recognize ELF binay executables=0A= +# ------- =0A= +# 1) Grep for 'm68k' or 'sparc' or 'mips' or 'mipseb' or 'sh.eb' =0A= +# or 'powerpc' or 'ppc' or 's390' from the output of the command =0A= +# 'uname -m'=0A= +# 2) If the above step is successful, assign string 'MSB' to variable =0A= +# TARGET_ARCH else assign string 'LSB'=0A= +# 3) Write small C program to a known '.c' file=0A= +# 4) Compile it using "cc"=0A= +# Ex: cc xyz xyz.c=0A= +# 5) Use file command to get the type of the object file=0A= +# 6) Grep for the string "ELF .*-bit $TEST_ARCH executable, .*" =0A= +# in the output of the 'file' command=0A= +# 7) If the above command is successful, declare test as PASS=0A= +# else declare test as FAIL=0A= +#=0A= +# Test07: Test if file command can recognize tar files=0A= +# -------=0A= +# 1) Write text to three different files=0A= +# 2) Archive the files using "tar" command=0A= +# Ex: tar -cf ...=0A= +# 3) Use 'file' command to get the type of the archive file=0A= +# Ex: file xyz.tar=0A= +# 4) Grep for the string "tar archive" from the output of=0A= +# the above 'file' command=0A= +# 5) Declare test as PASS, if the above step is successfull else=0A= +# declare test as FAIL=0A= +#=0A= +# Test08: Test if file command can tar zip files=0A= +# -------=0A= +# 1) Write text to three different files=0A= +# 2) Archive the files using "tar" command=0A= +# Ex: tar -cf ...=0A= +# 3) Use 'gzip' command to zip tar files=0A= +# Ex: gzip -f xyz.tar=0A= +# 4) Use 'file' command to get the type of the archive file=0A= +# Ex: file xyz.tar.gz=0A= +# 5) Grep for the string "gzip compressed data, .*" from the above =0A= +# file commnand=0A= +# 6) Declare test as PASS, if the above step is successfull else=0A= +# declare test as FAIL=0A= +#=0A= =0A= +=0A= +export TST_TOTAL=3D10 # Number of tests in this testcase=0A= + =0A= if [ -z "$LTPTMP" -a -z "$TMPBASE" ]=0A= then =0A= LTPTMP=3D/tmp/=0A= else=0A= - LTPTMP=3D$TMPBASE=0A= + LTPTMP=3D$TMPBASE=0A= fi=0A= =0A= +# 'LTPBIN' where actual test cases (test binaries) reside=0A= +# 'LTPROOT' where the actual LTP test suite resides=0A= if [ -z "$LTPBIN" -a -z "$LTPROOT" ]=0A= then=0A= LTPBIN=3D./=0A= @@ -65,7 +147,7 @@ RC=3D0=0A= # Test if file command recognizes ASCII text files.=0A= =0A= export TCID=3Dfile01=0A= -export TST_COUNT=3D7=0A= +export TST_COUNT=3D1=0A= =0A= $LTPBIN/tst_resm TINFO "TEST #1: file commad recogizes ASCII text files"=0A= =0A= ------=_NextPart_000_00CF_01CA0141.56505E10 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ------=_NextPart_000_00CF_01CA0141.56505E10 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ------=_NextPart_000_00CF_01CA0141.56505E10--