* Re: [LTP] [PATCH] file: add the new output format of C program file
[not found] <1343270673-8363-1-git-send-email-gaowanlong@cn.fujitsu.com>
@ 2012-07-26 4:24 ` Zhouping Liu
2012-07-26 5:10 ` Caspar Zhang
1 sibling, 0 replies; 3+ messages in thread
From: Zhouping Liu @ 2012-07-26 4:24 UTC (permalink / raw)
To: Wanlong Gao; +Cc: LTP
----- Original Message -----
> From: "Wanlong Gao" <gaowanlong@cn.fujitsu.com>
> To: "LTP" <ltp-list@lists.sourceforge.net>
> Sent: Thursday, July 26, 2012 10:44:33 AM
> Subject: [LTP] [PATCH] file: add the new output format of C program file
>
> New output format of file command for C program file is like below,
> $ file src/guestfs.c
> src/guestfs.c: C source, ASCII text
>
Looks good for me.
Reviewed-by: Zhouping Liu <zliu@redhat.com>
> Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
> ---
> testcases/commands/ade/file/file_test.sh | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/testcases/commands/ade/file/file_test.sh
> b/testcases/commands/ade/file/file_test.sh
> index 70420e3..8a4e9b5 100755
> --- a/testcases/commands/ade/file/file_test.sh
> +++ b/testcases/commands/ade/file/file_test.sh
> @@ -314,10 +314,16 @@ then
> $LTPBIN/tst_resm TPASS "file: Recognised C program text
> correctly"
> rm -f $LTPTMP/cprog.c
> else
> - $LTPBIN/tst_res TFAIL $LTPTMP/file.out \
> - "file: Failed to Recognize C program text correctly.
> Reason:"
> - TFAILCNT=$(( $TFAILCNT+1 ))
> -
> + grep "C source, ASCII text" $LTPTMP/file.out > /dev/null
> 2>&1
> + if [ $? -eq 0 ]
> + then
> + $LTPBIN/tst_resm TPASS "file: Recognised C program text
> correctly"
> + rm -f $LTPTMP/cprog.c
> + else
> + $LTPBIN/tst_res TFAIL $LTPTMP/file.out \
> + "file: Failed to Recognize C program text
> correctly. Reason:"
> + TFAILCNT=$(( $TFAILCNT+1 ))
> + fi
> fi
> else
> $LTPBIN/tst_resm TFAIL "file: Failed to recognize C programi
> text"
> --
> 1.7.12.rc0
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond.
> Discussions
> will include endpoint security, mobile security and the latest in
> malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
>
--
Thanks,
Zhouping
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [LTP] [PATCH] file: add the new output format of C program file
[not found] <1343270673-8363-1-git-send-email-gaowanlong@cn.fujitsu.com>
2012-07-26 4:24 ` [LTP] [PATCH] file: add the new output format of C program file Zhouping Liu
@ 2012-07-26 5:10 ` Caspar Zhang
2012-07-26 13:31 ` Wanlong Gao
1 sibling, 1 reply; 3+ messages in thread
From: Caspar Zhang @ 2012-07-26 5:10 UTC (permalink / raw)
To: Wanlong Gao; +Cc: LTP
On 07/26/2012 10:44 AM, Wanlong Gao wrote:
> New output format of file command for C program file is like below,
> $ file src/guestfs.c
> src/guestfs.c: C source, ASCII text
>
> Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Reviewed-by: Caspar Zhang <caspar@casparzhang.com>
> ---
> testcases/commands/ade/file/file_test.sh | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/testcases/commands/ade/file/file_test.sh b/testcases/commands/ade/file/file_test.sh
> index 70420e3..8a4e9b5 100755
> --- a/testcases/commands/ade/file/file_test.sh
> +++ b/testcases/commands/ade/file/file_test.sh
> @@ -314,10 +314,16 @@ then
> $LTPBIN/tst_resm TPASS "file: Recognised C program text correctly"
> rm -f $LTPTMP/cprog.c
> else
> - $LTPBIN/tst_res TFAIL $LTPTMP/file.out \
> - "file: Failed to Recognize C program text correctly. Reason:"
> - TFAILCNT=$(( $TFAILCNT+1 ))
> -
> + grep "C source, ASCII text" $LTPTMP/file.out > /dev/null 2>&1
> + if [ $? -eq 0 ]
> + then
> + $LTPBIN/tst_resm TPASS "file: Recognised C program text correctly"
> + rm -f $LTPTMP/cprog.c
> + else
> + $LTPBIN/tst_res TFAIL $LTPTMP/file.out \
> + "file: Failed to Recognize C program text correctly. Reason:"
> + TFAILCNT=$(( $TFAILCNT+1 ))
> + fi
> fi
> else
> $LTPBIN/tst_resm TFAIL "file: Failed to recognize C programi text"
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 3+ messages in thread