linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] selftests: kmod: worked on errors which breaks the overall execution of the test script. i have manually edited for v2 of the patch by changing the date and also commit log.
@ 2019-01-31 18:31 Jeffrin Jose T
  2019-02-11 21:40 ` Luis Chamberlain
  0 siblings, 1 reply; 4+ messages in thread
From: Jeffrin Jose T @ 2019-01-31 18:31 UTC (permalink / raw)
  To: mcgrof, shuah; +Cc: linux-kernel, linux-kselftest, akpm, Jeffrin Jose T

The kmod.sh script breaks because an array is passed as input
instead of a single element input.This patch takes elements
one at a time and passed as input to the condition statement
which in turn fixes the error.There was an issue which had
the need for passing a single digit to the condition statement
which is fixed using regular expression.
Distribution: Debian GNU/Linux buster/sid
Bash Version: 5.0.0(1)-release

Signed-off-by: Jeffrin Jose T <jeffrin@rajagiritech.edu.in>
---
 tools/testing/selftests/kmod/kmod.sh | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/kmod/kmod.sh b/tools/testing/selftests/kmod/kmod.sh
index 0a76314b4414..49b273c3646e 100755
--- a/tools/testing/selftests/kmod/kmod.sh
+++ b/tools/testing/selftests/kmod/kmod.sh
@@ -526,9 +526,12 @@ function run_all_tests()
 		TEST_ID=${i%:*:*}
 		ENABLED=$(get_test_enabled $TEST_ID)
 		TEST_COUNT=$(get_test_count $TEST_ID)
-		if [[ $ENABLED -eq "1" ]]; then
-			test_case $TEST_ID $TEST_COUNT
-		fi
+		for j in $ENABLED ; do
+		         CHECK=${j#*:*:}
+			 if [[ $CHECK -eq "1" ]]; then
+			     test_case $TEST_ID $TEST_COUNT
+			 fi
+		done
 	done
 }
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] selftests: kmod: worked on errors which breaks the overall execution of the test script. i have manually edited for v2 of the patch by changing the date and also commit log.
  2019-01-31 18:31 [PATCH v2] selftests: kmod: worked on errors which breaks the overall execution of the test script. i have manually edited for v2 of the patch by changing the date and also commit log Jeffrin Jose T
@ 2019-02-11 21:40 ` Luis Chamberlain
  2019-02-14 18:26   ` [PATCH v2] error message found related Jeffrin Thalakkottoor
  0 siblings, 1 reply; 4+ messages in thread
From: Luis Chamberlain @ 2019-02-11 21:40 UTC (permalink / raw)
  To: Jeffrin Jose T; +Cc: shuah, linux-kernel, linux-kselftest, akpm

Your subject is too long.

On Fri, Feb 01, 2019 at 12:01:09AM +0530, Jeffrin Jose T wrote:
> The kmod.sh script breaks because an array is passed as input
> instead of a single element input.This patch takes elements
> one at a time and passed as input to the condition statement
> which in turn fixes the error.There was an issue which had
> the need for passing a single digit to the condition statement
> which is fixed using regular expression.
> Distribution: Debian GNU/Linux buster/sid
> Bash Version: 5.0.0(1)-release

I just tried Debian unstabe with bash 5.0-2 and the issue is not
present there. Debian testing was on 4.4.18-3.1 for me prior to
the upgrade.

*both* work fine.

Please upgrade bash?

  Luis

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] error message found related
  2019-02-11 21:40 ` Luis Chamberlain
@ 2019-02-14 18:26   ` Jeffrin Thalakkottoor
  2019-03-14 14:20     ` Luis Chamberlain
  0 siblings, 1 reply; 4+ messages in thread
From: Jeffrin Thalakkottoor @ 2019-02-14 18:26 UTC (permalink / raw)
  To: Luis Chamberlain; +Cc: Shuah Khan, lkml, linux-kselftest, Andrew Morton

> Your subject is too long.
ok . i have changed it


> Please upgrade bash?
anyway now i have an upgraded one.

here  is a clipping related to the error
---------------------x-------------------x----------------
Thu Feb 14 23:49:13 IST 2019
Running test: kmod_test_0007 - run #4
kmod_test_0005: OK! - loading kmod test
kmod_test_0005: OK! - Return value: 0 (SUCCESS), expected SUCCESS
kmod_test_0006: OK! - loading kmod test
kmod_test_0006: OK! - Return value: 0 (SUCCESS), expected SUCCESS
./kmod.sh: line 529: [[: 1 0002:3:1 0003:1:1 0004:1:1 0005:10:1
0006:10:1 0007:5:1 0008:150:1 0009:150:1: syntax error in expression
(error token is "0002:3:1 0003:1:1 0004:1:1 0005:10:1 0006:10:1
0007:5:1 0008:150:1 0009:150:1")
./kmod.sh: line 529: [[: 1 0002:3:1 0003:1:1 0004:1:1 0005:10:1
0006:10:1 0007:5:1 0008:150:1 0009:150:1: syntax error in expression
(error token is "0002:3:1 0003:1:1 0004:1:1 0005:10:1 0006:10:1
0007:5:1 0008:150:1 0009:150:1")
Test completed
$
------------------x---------------------x----------------------




-- 
software engineer
rajagiri school of engineering and technology

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] error message found related
  2019-02-14 18:26   ` [PATCH v2] error message found related Jeffrin Thalakkottoor
@ 2019-03-14 14:20     ` Luis Chamberlain
  0 siblings, 0 replies; 4+ messages in thread
From: Luis Chamberlain @ 2019-03-14 14:20 UTC (permalink / raw)
  To: Jeffrin Thalakkottoor; +Cc: Shuah Khan, lkml, linux-kselftest, Andrew Morton

On Thu, Feb 14, 2019 at 11:56:46PM +0530, Jeffrin Thalakkottoor wrote:
> > Your subject is too long.
> ok . i have changed it
> 
> 
> > Please upgrade bash?
> anyway now i have an upgraded one.
> 
> here  is a clipping related to the error
> ---------------------x-------------------x----------------
> Thu Feb 14 23:49:13 IST 2019
> Running test: kmod_test_0007 - run #4
> kmod_test_0005: OK! - loading kmod test
> kmod_test_0005: OK! - Return value: 0 (SUCCESS), expected SUCCESS
> kmod_test_0006: OK! - loading kmod test
> kmod_test_0006: OK! - Return value: 0 (SUCCESS), expected SUCCESS
> ./kmod.sh: line 529: [[: 1 0002:3:1 0003:1:1 0004:1:1 0005:10:1
> 0006:10:1 0007:5:1 0008:150:1 0009:150:1: syntax error in expression
> (error token is "0002:3:1 0003:1:1 0004:1:1 0005:10:1 0006:10:1
> 0007:5:1 0008:150:1 0009:150:1")
> ./kmod.sh: line 529: [[: 1 0002:3:1 0003:1:1 0004:1:1 0005:10:1
> 0006:10:1 0007:5:1 0008:150:1 0009:150:1: syntax error in expression
> (error token is "0002:3:1 0003:1:1 0004:1:1 0005:10:1 0006:10:1
> 0007:5:1 0008:150:1 0009:150:1")
> Test completed
> $

I do not see this at all. Does anyone else see it?

  Luis

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-03-14 14:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-31 18:31 [PATCH v2] selftests: kmod: worked on errors which breaks the overall execution of the test script. i have manually edited for v2 of the patch by changing the date and also commit log Jeffrin Jose T
2019-02-11 21:40 ` Luis Chamberlain
2019-02-14 18:26   ` [PATCH v2] error message found related Jeffrin Thalakkottoor
2019-03-14 14:20     ` Luis Chamberlain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).