Skip to contentSkip to conversation

Fix bug of script implemented tests

PATCH In review Bian Naimeng 3 participants 4 messages Feb 23, 2011 – Feb 24, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix bug of script implemented tests

Tests implemented by script will fail, because they try to invoke a inexistent binary file.

[root@Linux sigaddset]# ./1-1.sh
./1-1.sh: line 20: conformance/interfaces/sigaddset/1-core-buildonly.test: No such file or directory

It's a widespread problem on the latest LTP.

---
 .../conformance/interfaces/sigaddset/1-1.sh        |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
testcases/open_posix_testsuite/conformance/interfaces/sigaddset/1-1.sh +1 -1
index e12c69e..e77ed54 100755
@@ -17,4 +17,4 @@
 
 # Calling 1-core-buildonly.test with a 0 parameter initializes to an
 # empty set.
-conformance/interfaces/sigaddset/1-core-buildonly.test 0
+./1-core 0
Signature · 14 lines
1.7.0.4



------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#1 lore raw
Quoted 6 lines · Bian Naimeng

Tests implemented by script will fail, because they try to invoke a inexistent binary file.

[root@Linux sigaddset]# ./1-1.sh
./1-1.sh: line 20: conformance/interfaces/sigaddset/1-core-buildonly.test: No such file or directory

It's a widespread problem on the latest LTP.

It's a problem, but it isn't a disaster (28 scripts in all is small in comparison to the number of C tests). This sed fixed things on FreeBSD at least, but it isn't that hard to convert over to the GNU/sed format of calling sed though:

$ find [cms]* -name '*.sh' | xargs grep -l buildonly | xargs -J % sed
-i .bk -E -e 's,^[cfs].+[^/]/(.+)\.test,\./\1,g' -e
's,\-buildonly\.test,,g' %

I've committed the end result after verifying that git diff's output was sane.

Thanks,
-Garrett

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#2 lore raw

Hi Garrett,

Garrett Cooper said the following on 2011-2-23 15:48:

Quoted 6 lines
$ find [cms]* -name '*.sh' | xargs grep -l buildonly | xargs -J % sed
-i .bk -E -e 's,^[cfs].+[^/]/(.+)\.test,\./\1,g' -e
's,\-buildonly\.test,,g' %

I've committed the end result after verifying that git diff's output was sane.

There are four cases, and they have same problem.
The following patch can fix the bug.

---
 .../conformance/interfaces/sigaddset/4-1.sh        |    2 +-
 .../conformance/interfaces/sigaddset/4-2.sh        |    2 +-
 .../conformance/interfaces/sigaddset/4-3.sh        |    2 +-
 .../conformance/interfaces/sigaddset/4-4.sh        |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
testcases/open_posix_testsuite/conformance/interfaces/sigaddset/4-1.sh +1 -1
index cb29ca9..32dc8a9 100755
@@ -9,4 +9,4 @@
 #   Test various methods of adding invalid signals to sigaddset().
 # 
 
-conformance/interfaces/sigaddset/4-core.run-test 1
+./4-core 1
testcases/open_posix_testsuite/conformance/interfaces/sigaddset/4-2.sh +1 -1
index 5ab480d..708fe1a 100755
@@ -10,4 +10,4 @@
 #   Test various methods of adding invalid signals to sigaddset().
 # 
 
-conformance/interfaces/sigaddset/4-core.run-test 2
+./4-core 2
testcases/open_posix_testsuite/conformance/interfaces/sigaddset/4-3.sh +1 -1
index 644512f..ad4fee1 100755
@@ -9,4 +9,4 @@
 #   Test various methods of adding invalid signals to sigaddset().
 # 
 
-conformance/interfaces/sigaddset/4-core.run-test 3
+./4-core 3
testcases/open_posix_testsuite/conformance/interfaces/sigaddset/4-4.sh +1 -1
index ca8523f..c33d8fb 100755
@@ -9,4 +9,4 @@
 #   Test various methods of adding invalid signals to sigaddset().
 # 
 
-conformance/interfaces/sigaddset/4-core.run-test 4
+./4-core 4
Signature · 17 lines
1.7.1

-- 
Best Regards,
Peng Haitao


------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#3 lore raw
Quoted 7 lines · Peng Haitao

Hi Garrett,

Garrett Cooper said the following on 2011-2-23 15:48:

Quoted 4 lines
$ find [cms]* -name '*.sh' | xargs grep -l buildonly | xargs -J % sed
-i .bk -E -e 's,^[cfs].+[^/]/(.+)\.test,\./\1,g' -e
's,\-buildonly\.test,,g' %
Quoted 5 lines
Quoted 2 lines

I've committed the end result after verifying that git diff's output was sane.

There are four cases, and they have same problem.
The following patch can fix the bug.

Committed -- thanks!
-Garrett

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list