Hello,

On Monday 20 October 2008 18:47:23 Elder Costa wrote:
> Hi. Here I am getting the following error (with Ubuntu 7.04):
>
> [EMAIL PROTECTED]:/tmp/ltp/testcases/ballista$ LANG= make -f Makefile
> WARNING: No perl detected; skipping ballista tests

This is caused by a bashism in the makefile (see patch 1).

I've compiled & ran ballista on Debian lenny, and found out some patches are 
needed to make it work. Patches 1 and 2 are fix bashisms causing failures when 
using Debian's dash.

Patch 12 fix a problem when generated the test executable source, which causes 
the last argument of the tested syscall to be repeated (eg. call chdir(char*) 
would end up as chdir(char*, char*)).

Patch 13 adds using declarations to generated sources, where needed.

Regards
    Jiri Palecek

From e8622379f5a0dec070c3b4dcb6152c3a5585b6bf Mon Sep 17 00:00:00 2001
From: Jiri Palecek <[EMAIL PROTECTED](none)>
Date: Sat, 14 Jun 2008 22:40:00 +0200
Subject: [PATCH] Fix bashism in ballista's makefile

---
 testcases/ballista/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/testcases/ballista/Makefile b/testcases/ballista/Makefile
index 12768f6..43f31d8 100644
--- a/testcases/ballista/Makefile
+++ b/testcases/ballista/Makefile
@@ -1,4 +1,4 @@
-ifeq ($(shell perl -v &> /dev/null && echo yes),yes)
+ifeq ($(shell perl -v > /dev/null 2>&1 && echo yes),yes)
 
 all: bal
 
-- 
1.5.6.5

Signed-off-by: Jiri Palecek <[EMAIL PROTECTED]>
From 774735c8a1f0a450034be307819f6d0f3e8a60aa Mon Sep 17 00:00:00 2001
From: Jiri Palecek <[EMAIL PROTECTED](none)>
Date: Mon, 11 Aug 2008 23:10:49 +0200
Subject: [PATCH] Fixed one bashism

---
 testcases/ballista/ballista/ostest_new.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/testcases/ballista/ballista/ostest_new.pl b/testcases/ballista/ballista/ostest_new.pl
index 85fbfb8..a366a84 100644
--- a/testcases/ballista/ballista/ostest_new.pl
+++ b/testcases/ballista/ballista/ostest_new.pl
@@ -285,7 +285,7 @@ while(<CALLTABLEIN>)
    close(INCLUDEFILE);
 
 # if ((system("./makeBallista  $function")/256) != 0)
- if ((system("./makeBallista  $function >& /dev/null")/256) != 0)	# if makeBallista fails, don't try to run ballista!
+ if ((system("./makeBallista  $function > /dev/null 2>&1")/256) != 0)	# if makeBallista fails, don't try to run ballista!
   {
 	print "\nmakeBallista failed for $function.  $function will not be tested -- this function may not exist on your operating system.";
 	print FAILFILE "makeBallista failed for $function.  $function will not be tested -- this function may not exist on your operating system.\n";
-- 
1.5.6.5

Signed-off-by: Jiri Palecek <[EMAIL PROTECTED]>
From cac5af439c135331c0e35b9b57d0b2ebea7a4804 Mon Sep 17 00:00:00 2001
From: Jiri Palecek <[EMAIL PROTECTED](none)>
Date: Tue, 14 Oct 2008 14:13:54 +0200
Subject: [PATCH] Corrected callGen and callGen_Standalone in ballista, so they don't duplicate the last parameter of the tested call

---
 testcases/ballista/ballista/callGen.cpp            |    2 +-
 testcases/ballista/ballista/callGen_standAlone.cpp |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/ballista/ballista/callGen.cpp b/testcases/ballista/ballista/callGen.cpp
index 62d89c8..304c099 100644
--- a/testcases/ballista/ballista/callGen.cpp
+++ b/testcases/ballista/ballista/callGen.cpp
@@ -81,7 +81,7 @@ int main(int argc,char *argv[])
   is>>fname; //get function call
 
   
-  while (!is.eof())
+  while (is >> ws, !is.eof())
     {
       is>>s;//get param?
 
diff --git a/testcases/ballista/ballista/callGen_standAlone.cpp b/testcases/ballista/ballista/callGen_standAlone.cpp
index dc7b089..eae01f8 100644
--- a/testcases/ballista/ballista/callGen_standAlone.cpp
+++ b/testcases/ballista/ballista/callGen_standAlone.cpp
@@ -90,7 +90,7 @@ int main(int argc,char *argv[])
   //cout <<"after fname set " <<fname <<endl;
 
   
-  while (!is.eof())
+  while (is >> ws, !is.eof())
     {
       is>>s;//get param?
 //      cout <<"s is set to " <<s << endl;      
-- 
1.5.6.5

Signed-off-by: Jiri Palecek <[EMAIL PROTECTED]>
From 84e99be6407854f09026fb9d71be39458e1d03d8 Mon Sep 17 00:00:00 2001
From: Jiri Palecek <[EMAIL PROTECTED](none)>
Date: Tue, 14 Oct 2008 14:51:31 +0200
Subject: [PATCH] Added using namespace std; directives to files that use unqualified names from std::

---
 testcases/ballista/ballista/compile/bparser.cpp  |    1 +
 testcases/ballista/ballista/templates/bTypes.cpp |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/testcases/ballista/ballista/compile/bparser.cpp b/testcases/ballista/ballista/compile/bparser.cpp
index 856a554..dfa39f7 100644
--- a/testcases/ballista/ballista/compile/bparser.cpp
+++ b/testcases/ballista/ballista/compile/bparser.cpp
@@ -1082,6 +1082,7 @@ void buildH()
   h1<<"#include <sys/stat.h>"<<endl;
   h1<<"#include <unistd.h>"<<endl;
   h1<<"#include "<<(char)34<<"bTypes.h"<<(char)34<<endl;
+  h1<<"using namespace std;"<<endl;
   h1.close();
 
   sprintf(s,"mv %s ./%s.h",b1,obName);
diff --git a/testcases/ballista/ballista/templates/bTypes.cpp b/testcases/ballista/ballista/templates/bTypes.cpp
index 8fdd759..a314870 100644
--- a/testcases/ballista/ballista/templates/bTypes.cpp
+++ b/testcases/ballista/ballista/templates/bTypes.cpp
@@ -51,6 +51,7 @@ IMPLEMENTATION DESIGN
 
 #include "bTypes.h"
 
+using namespace std;
 //---------------------------------------------------------------------------
 
 paramAccess::paramAccess()
-- 
1.5.6.5

Signed-off-by: Jiri Palecek <[EMAIL PROTECTED]>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to