diff mbox series

[17/17] fs-test: fix false positive error at Test Case 12

Message ID 20180720025723.6736-18-takahiro.akashi@linaro.org
State Superseded
Headers show
Series fs: fat: extend FAT write operations | expand

Commit Message

AKASHI Takahiro July 20, 2018, 2:57 a.m. UTC
The error message to be matched is wrong. Fix it.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
 test/fs/fs-test.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Heinrich Schuchardt July 29, 2018, 7:02 a.m. UTC | #1
On 07/20/2018 04:57 AM, AKASHI Takahiro wrote:
> The error message to be matched is wrong. Fix it.
> 
> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> ---
>  test/fs/fs-test.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/test/fs/fs-test.sh b/test/fs/fs-test.sh
> index 2e8d5ee4df..7b0c5ea56f 100755
> --- a/test/fs/fs-test.sh
> +++ b/test/fs/fs-test.sh
> @@ -522,7 +522,7 @@ function check_results() {
>  		"TC11: 1MB write to $3.w - content verified"
>  
>  	# Check lookup of 'dot' directory
> -	grep -A4 "Test Case 12 " "$1" | grep -q 'Unable to write file'
> +	grep -A4 "Test Case 12 " "$1" | grep -q 'Unable to write'
>  	pass_fail "TC12: 1MB write to . - write denied"
>  
>  	# Check directory traversal
> 

Tom suggested in
https://lists.denx.de/pipermail/u-boot/2018-July/336378.html that the
comment headers in test/fs/fs-test.sh should be updated to reflect the
total number of passes and fails.

Best regards

Heinrich
AKASHI Takahiro July 31, 2018, 7:55 a.m. UTC | #2
On Sun, Jul 29, 2018 at 09:02:00AM +0200, Heinrich Schuchardt wrote:
> On 07/20/2018 04:57 AM, AKASHI Takahiro wrote:
> > The error message to be matched is wrong. Fix it.
> > 
> > Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> > ---
> >  test/fs/fs-test.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/test/fs/fs-test.sh b/test/fs/fs-test.sh
> > index 2e8d5ee4df..7b0c5ea56f 100755
> > --- a/test/fs/fs-test.sh
> > +++ b/test/fs/fs-test.sh
> > @@ -522,7 +522,7 @@ function check_results() {
> >  		"TC11: 1MB write to $3.w - content verified"
> >  
> >  	# Check lookup of 'dot' directory
> > -	grep -A4 "Test Case 12 " "$1" | grep -q 'Unable to write file'
> > +	grep -A4 "Test Case 12 " "$1" | grep -q 'Unable to write'
> >  	pass_fail "TC12: 1MB write to . - write denied"
> >  
> >  	# Check directory traversal
> > 
> 
> Tom suggested in
> https://lists.denx.de/pipermail/u-boot/2018-July/336378.html that the
> comment headers in test/fs/fs-test.sh should be updated to reflect the
> total number of passes and fails.

Thank you for this heads-up.
I'm now trying to rewrite fs-test.sh (at least part of it) on top of
py.test framework.
It will take some time as I'm still learning how to write tests for py.test.

-Takahiro AKASHI


> Best regards
> 
> Heinrich
diff mbox series

Patch

diff --git a/test/fs/fs-test.sh b/test/fs/fs-test.sh
index 2e8d5ee4df..7b0c5ea56f 100755
--- a/test/fs/fs-test.sh
+++ b/test/fs/fs-test.sh
@@ -522,7 +522,7 @@  function check_results() {
 		"TC11: 1MB write to $3.w - content verified"
 
 	# Check lookup of 'dot' directory
-	grep -A4 "Test Case 12 " "$1" | grep -q 'Unable to write file'
+	grep -A4 "Test Case 12 " "$1" | grep -q 'Unable to write'
 	pass_fail "TC12: 1MB write to . - write denied"
 
 	# Check directory traversal