On May 5, 2010, at 11:58 PM, Subrata Modak wrote:

> Subject: LTPś file_test fails
> 
> Issues Description below:
> ====================================
> # vi runtest/file_test
> file export TCdat=$LTPROOT/testcases/bin; file_test.sh
> <EOF>
> 
> Run LTP with the following command:
> # ./runltp -f file_test
> <<<test_output>>>
> file01      0  TINFO  :  TEST #1: file command recogizes ASCII text files
> file01      1  TPASS  :  file: Recognised ASCII file correctly
> file02      0  TINFO  :  TEST #2: file command recognizes bash shell scripts
> file02      2  TPASS  :  file: Recognised bash shell script correctly
> file03      0  TINFO  :  TEST #3: file command recognizes korn shell scripts
> file03      3  TPASS  :  file: recognised korn shell script
> file04      0  TINFO  :  TEST #4: file command recognizes C shell scripts
> file04      4  TPASS  :  file: Recognised C shell script correctly
> file05      0  TINFO  :  TEST #5: file command recognizes C programs text
> file05      5  TPASS  :  file: Recognised C program text correctly
> file06      0  TINFO  :  TEST #6: file command recognizes ELF executables
> file06      6  TPASS  :  file: Recognized ELF binary executable
> file07      0  TINFO  :  TEST #7: file command recognizes tar files.
> file07      7  TPASS  :  file: Recognised tar files
> file08      0  TINFO  :  TEST #8: file command recognizes tar zip files
> file08      8  TPASS  :  file: Recognised tar zip file
> file09      0  TINFO  :  TEST #9: file command recognizes RPM files
> file09      9  TFAIL  :  file: Failed to Recognize RPM file. Reason:
> /root/rpmbuild/SRPMS/cprog-0.0.7-3.src.rpm: RPM v3.0 src
> file10      0  TINFO  :  TEST #10: file command recognizes vmlinu file
> file10     10  TPASS  :  file: Recognised vmlinu file correctly
> <<<execution_status>>>
> initiation_status="ok"
> duration=0 termination_type=exited termination_id=1 corefile=no
> cutime=7 cstime=18
> <<<test_end>>>

        This is why:

        grep "RPM v3 src" $LTPTMP/file.out > /dev/null 2>&1

        change that to

        egrep "RPM v3(\.0)? src" $LTPTMP/file.out > /dev/null 2>&1

    -- that should work.
HTH,
-Garrett
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to