Hi,

This patch fixes the following error when running sched_cli_serv test
case via runltp by making the path of the data file as a runtime 
option and giving an absolute path of it.

# ./runltp -p -d /tmp -l /tmp/1.log -o /tmp/2.log -f sched

# cat 2.log
...
<<<test_start>>>
tag=sched_cli_serv stime=1231923084
cmdline="run_sched_cliserv.sh"
contacts=""
analysis=exit
initiation_status="ok"
<<<test_output>>>
fopen: No such file or directory
/mnt/tests/kernel/distribution/ltp/20081031/ltp-full-20081031/testcases
/bin/run_sched_cliserv.sh: line 6:  5206 Terminated              pthserv
<<<execution_status>>>
duration=0 termination_type=exited termination_id=1 corefile=no
cutime=1 cstime=1
<<<test_end>>>
...

Signed-off-by: CAI Qian <caiq...@cclom.cn>

--- ltp-full-20081031/testcases/kernel/sched/clisrv/run_sched_cliserv.sh.orig   
2009-01-15 01:38:32.000000000 -0500
+++ ltp-full-20081031/testcases/kernel/sched/clisrv/run_sched_cliserv.sh        
2009-01-15 03:16:44.000000000 -0500
@@ -1,7 +1,7 @@
-#!/bin/sh
+#!/bin/sh -x
 
 pthserv &
-pthcli 127.0.0.1
+pthcli 127.0.0.1 $LTPROOT/testcases/bin/data
 clientCode=$?
 killall pthserv
 serverCode=$?

--- ltp-full-20081031/testcases/kernel/sched/clisrv/pthcli.c.orig       
2009-01-15 01:35:38.000000000 -0500
+++ ltp-full-20081031/testcases/kernel/sched/clisrv/pthcli.c    2009-01-15 
03:10:50.000000000 -0500
@@ -104,9 +104,9 @@
     struct sockaddr_in serv_addr;
 
     pname = argv[0];
-    if (argc < 2) 
+    if (argc < 3) 
     {
-       printf("\nusage: %s ip#\n", pname);
+       printf("\nusage: %s ip data\n", pname);
        exit(1);
     }
 
@@ -141,7 +141,7 @@
        exit(1);
     }
 #ifdef _LINUX
-    if ((input = fopen("./data", "r")) == NULL) 
+    if ((input = fopen(argv[2], "r")) == NULL) 
     {
        perror("fopen");
         return(errno);


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to