public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] rpc01: fix $TCbin and $TCtmp
@ 2013-11-06  2:25 Simon Xu
  2013-11-06  5:28 ` [LTP] [PATCH V2] rpc01: fix $TCbin and $TCtmp and data file names Simon Xu
  0 siblings, 1 reply; 12+ messages in thread
From: Simon Xu @ 2013-11-06  2:25 UTC (permalink / raw)
  To: ltp-list

The values of TCbin and TCtmp should be swapped, and `rpc1' is in TCbin,
not TCtmp.

Signed-off-by: Simon Xu <xu.simon@oracle.com>
---
 testcases/network/rpc/basic_tests/rpc01/rpc01 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/testcases/network/rpc/basic_tests/rpc01/rpc01 b/testcases/network/rpc/basic_tests/rpc01/rpc01
index ef97a95..c16493c 100755
--- a/testcases/network/rpc/basic_tests/rpc01/rpc01
+++ b/testcases/network/rpc/basic_tests/rpc01/rpc01
@@ -36,9 +36,9 @@
 $trace_logic
 this_file=${0##*/}
 TC=${TC:=rpc01}
-TCbin=${TCbin:=`pwd`}
+TCbin=${TCbin:=$LTPROOT/testcases/bin}
 TCdat=${TCdat:=$TCbin/datafiles}
-TCtmp=${TCtmp:=$LTPROOT/testcases/bin}
+TCtmp=${TCtmp:=`pwd`}
 NUMLOOPS=${NUMLOOPS:=3}
 RHOST=${RHOST:=`hostname`}
 CLEANUP=${CLEANUP:="ON"}
@@ -68,7 +68,7 @@ do_test()
     do
       for FILE in $DATAFILES
       do
-	$TCtmp/rpc1 -s $RHOST -f $TCdat/$FILE
+	$TCbin/rpc1 -s $RHOST -f $TCdat/$FILE
 	[ $? -eq 0 ] || end_testcase "Fail on using $FILE"
       done
       COUNT=`expr $COUNT + 1`
-- 
1.8.4.2


------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* [LTP] [PATCH V2] rpc01: fix $TCbin and $TCtmp and data file names
  2013-11-06  2:25 [LTP] [PATCH] rpc01: fix $TCbin and $TCtmp Simon Xu
@ 2013-11-06  5:28 ` Simon Xu
  2013-11-07 16:25   ` chrubis
  2013-11-08  6:17   ` [LTP] [PATCH V3] rpc01: fix $TCbin and $TCtmp " Simon Xu
  0 siblings, 2 replies; 12+ messages in thread
From: Simon Xu @ 2013-11-06  5:28 UTC (permalink / raw)
  To: ltp-list

The values of TCbin and TCtmp should be swapped, and `rpc1' is in TCbin,
not TCtmp.  Also correct the file names 'file.1' and 'file.2' which do not
exist.

Signed-off-by: Simon Xu <xu.simon@oracle.com>
---
 testcases/network/rpc/basic_tests/rpc01/rpc01 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/testcases/network/rpc/basic_tests/rpc01/rpc01 b/testcases/network/rpc/basic_tests/rpc01/rpc01
index ef97a95..8594835 100755
--- a/testcases/network/rpc/basic_tests/rpc01/rpc01
+++ b/testcases/network/rpc/basic_tests/rpc01/rpc01
@@ -36,13 +36,13 @@
 $trace_logic
 this_file=${0##*/}
 TC=${TC:=rpc01}
-TCbin=${TCbin:=`pwd`}
+TCbin=${TCbin:=$LTPROOT/testcases/bin}
 TCdat=${TCdat:=$TCbin/datafiles}
-TCtmp=${TCtmp:=$LTPROOT/testcases/bin}
+TCtmp=${TCtmp:=`pwd`}
 NUMLOOPS=${NUMLOOPS:=3}
 RHOST=${RHOST:=`hostname`}
 CLEANUP=${CLEANUP:="ON"}
-DATAFILES=${DATAFILES:="file.1 file.2"}
+DATAFILES=${DATAFILES:="bin.med bin.sm"}
 
 #=============================================================================
 # FUNCTION NAME:        do_test
@@ -68,7 +68,7 @@ do_test()
     do
       for FILE in $DATAFILES
       do
-	$TCtmp/rpc1 -s $RHOST -f $TCdat/$FILE
+	$TCbin/rpc1 -s $RHOST -f $TCdat/$FILE
 	[ $? -eq 0 ] || end_testcase "Fail on using $FILE"
       done
       COUNT=`expr $COUNT + 1`
-- 
1.8.4.2


------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [PATCH V2] rpc01: fix $TCbin and $TCtmp and data file names
  2013-11-06  5:28 ` [LTP] [PATCH V2] rpc01: fix $TCbin and $TCtmp and data file names Simon Xu
@ 2013-11-07 16:25   ` chrubis
       [not found]     ` <527C45FD.3090008@oracle.com>
  2013-11-08  6:17   ` [LTP] [PATCH V3] rpc01: fix $TCbin and $TCtmp " Simon Xu
  1 sibling, 1 reply; 12+ messages in thread
From: chrubis @ 2013-11-07 16:25 UTC (permalink / raw)
  To: Simon Xu; +Cc: ltp-list

Hi!
> The values of TCbin and TCtmp should be swapped, and `rpc1' is in TCbin,
> not TCtmp.  Also correct the file names 'file.1' and 'file.2' which do not
> exist.
> 
> Signed-off-by: Simon Xu <xu.simon@oracle.com>
> ---
>  testcases/network/rpc/basic_tests/rpc01/rpc01 | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/testcases/network/rpc/basic_tests/rpc01/rpc01 b/testcases/network/rpc/basic_tests/rpc01/rpc01
> index ef97a95..8594835 100755
> --- a/testcases/network/rpc/basic_tests/rpc01/rpc01
> +++ b/testcases/network/rpc/basic_tests/rpc01/rpc01
> @@ -36,13 +36,13 @@
>  $trace_logic
>  this_file=${0##*/}
>  TC=${TC:=rpc01}
> -TCbin=${TCbin:=`pwd`}
> +TCbin=${TCbin:=$LTPROOT/testcases/bin}
>  TCdat=${TCdat:=$TCbin/datafiles}
> -TCtmp=${TCtmp:=$LTPROOT/testcases/bin}
> +TCtmp=${TCtmp:=`pwd`}
>  NUMLOOPS=${NUMLOOPS:=3}
>  RHOST=${RHOST:=`hostname`}
>  CLEANUP=${CLEANUP:="ON"}
> -DATAFILES=${DATAFILES:="file.1 file.2"}
> +DATAFILES=${DATAFILES:="bin.med bin.sm"}
>  
>  #=============================================================================
>  # FUNCTION NAME:        do_test
> @@ -68,7 +68,7 @@ do_test()
>      do
>        for FILE in $DATAFILES
>        do
> -	$TCtmp/rpc1 -s $RHOST -f $TCdat/$FILE
> +	$TCbin/rpc1 -s $RHOST -f $TCdat/$FILE

The runltp script adds $LTPROOT/testcases/bin to path so you should
reduce this only to rpc1 and it should work.

The runltp script also sets $TMPDIR as temporary directory.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* [LTP] [PATCH V3] rpc01: fix $TCbin and $TCtmp and add Makefile for datafiles
  2013-11-06  5:28 ` [LTP] [PATCH V2] rpc01: fix $TCbin and $TCtmp and data file names Simon Xu
  2013-11-07 16:25   ` chrubis
@ 2013-11-08  6:17   ` Simon Xu
  1 sibling, 0 replies; 12+ messages in thread
From: Simon Xu @ 2013-11-08  6:17 UTC (permalink / raw)
  To: ltp-list

1) The values of TCbin and TCtmp should be swapped, and `rpc1' is in TCbin,
   not TCtmp.
2) The files in datafiles dir are needed in the test but they are not
   installed.  Create a Makefile in datafiles to install the files.

Signed-off-by: Simon Xu <xu.simon@oracle.com>
---
 testcases/network/rpc/basic_tests/rpc01/Makefile   |  4 ++-
 .../rpc/basic_tests/rpc01/datafiles/Makefile       | 29 ++++++++++++++++++++++
 testcases/network/rpc/basic_tests/rpc01/rpc01      |  6 ++---
 3 files changed, 35 insertions(+), 4 deletions(-)
 create mode 100644 testcases/network/rpc/basic_tests/rpc01/datafiles/Makefile

diff --git a/testcases/network/rpc/basic_tests/rpc01/Makefile b/testcases/network/rpc/basic_tests/rpc01/Makefile
index ba3fe0a..732d816 100644
--- a/testcases/network/rpc/basic_tests/rpc01/Makefile
+++ b/testcases/network/rpc/basic_tests/rpc01/Makefile
@@ -29,4 +29,6 @@ CPPFLAGS		+= -Wno-error
 
 INSTALL_TARGETS		:= rpc01
 
-include $(top_srcdir)/include/mk/generic_leaf_target.mk
+SUBDIRS			:= datafiles
+
+include $(top_srcdir)/include/mk/generic_trunk_target.mk
diff --git a/testcases/network/rpc/basic_tests/rpc01/datafiles/Makefile b/testcases/network/rpc/basic_tests/rpc01/datafiles/Makefile
new file mode 100644
index 0000000..92370e6
--- /dev/null
+++ b/testcases/network/rpc/basic_tests/rpc01/datafiles/Makefile
@@ -0,0 +1,29 @@
+#
+#    network/rpc/basic_tests/rpc01/datafiles Makefile.
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License along
+#    with this program; if not, write to the Free Software Foundation, Inc.,
+#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+#    Simon Xu <xu.simon@oracle.com> Nov 8 2013
+#
+
+top_srcdir		?= ../../../../../..
+
+include $(top_srcdir)/include/mk/env_pre.mk
+
+INSTALL_DIR		:= testcases/bin/datafiles
+
+INSTALL_TARGETS		:= file*
+
+include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/network/rpc/basic_tests/rpc01/rpc01 b/testcases/network/rpc/basic_tests/rpc01/rpc01
index ef97a95..c16493c 100755
--- a/testcases/network/rpc/basic_tests/rpc01/rpc01
+++ b/testcases/network/rpc/basic_tests/rpc01/rpc01
@@ -36,9 +36,9 @@
 $trace_logic
 this_file=${0##*/}
 TC=${TC:=rpc01}
-TCbin=${TCbin:=`pwd`}
+TCbin=${TCbin:=$LTPROOT/testcases/bin}
 TCdat=${TCdat:=$TCbin/datafiles}
-TCtmp=${TCtmp:=$LTPROOT/testcases/bin}
+TCtmp=${TCtmp:=`pwd`}
 NUMLOOPS=${NUMLOOPS:=3}
 RHOST=${RHOST:=`hostname`}
 CLEANUP=${CLEANUP:="ON"}
@@ -68,7 +68,7 @@ do_test()
     do
       for FILE in $DATAFILES
       do
-	$TCtmp/rpc1 -s $RHOST -f $TCdat/$FILE
+	$TCbin/rpc1 -s $RHOST -f $TCdat/$FILE
 	[ $? -eq 0 ] || end_testcase "Fail on using $FILE"
       done
       COUNT=`expr $COUNT + 1`
-- 
1.8.4.2


------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [PATCH V2] rpc01: fix $TCbin and $TCtmp and data file names
       [not found]     ` <527C45FD.3090008@oracle.com>
@ 2013-11-11 14:15       ` chrubis
  2013-11-19  6:14         ` [LTP] [PATCH V4] rpc01: fix paths and add Makefile for datafiles Simon Xu
  0 siblings, 1 reply; 12+ messages in thread
From: chrubis @ 2013-11-11 14:15 UTC (permalink / raw)
  To: Simon Xu; +Cc: ltp-list

Hi!
> >> The values of TCbin and TCtmp should be swapped, and `rpc1' is in TCbin,
> >> not TCtmp.  Also correct the file names 'file.1' and 'file.2' which do not
> >> exist.
> >>
> >> Signed-off-by: Simon Xu <xu.simon@oracle.com>
> >> ---
> >>   testcases/network/rpc/basic_tests/rpc01/rpc01 | 8 ++++----
> >>   1 file changed, 4 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/testcases/network/rpc/basic_tests/rpc01/rpc01 b/testcases/network/rpc/basic_tests/rpc01/rpc01
> >> index ef97a95..8594835 100755
> >> --- a/testcases/network/rpc/basic_tests/rpc01/rpc01
> >> +++ b/testcases/network/rpc/basic_tests/rpc01/rpc01
> >> @@ -36,13 +36,13 @@
> >>   $trace_logic
> >>   this_file=${0##*/}
> >>   TC=${TC:=rpc01}
> >> -TCbin=${TCbin:=`pwd`}
> >> +TCbin=${TCbin:=$LTPROOT/testcases/bin}
> >>   TCdat=${TCdat:=$TCbin/datafiles}
> >> -TCtmp=${TCtmp:=$LTPROOT/testcases/bin}
> >> +TCtmp=${TCtmp:=`pwd`}
> >>   NUMLOOPS=${NUMLOOPS:=3}
> >>   RHOST=${RHOST:=`hostname`}
> >>   CLEANUP=${CLEANUP:="ON"}
> >> -DATAFILES=${DATAFILES:="file.1 file.2"}
> >> +DATAFILES=${DATAFILES:="bin.med bin.sm"}
> >>   
> >>   #=============================================================================
> >>   # FUNCTION NAME:        do_test
> >> @@ -68,7 +68,7 @@ do_test()
> >>       do
> >>         for FILE in $DATAFILES
> >>         do
> >> -	$TCtmp/rpc1 -s $RHOST -f $TCdat/$FILE
> >> +	$TCbin/rpc1 -s $RHOST -f $TCdat/$FILE
> > The runltp script adds $LTPROOT/testcases/bin to path so you should
> > reduce this only to rpc1 and it should work.
> >
> > The runltp script also sets $TMPDIR as temporary directory.
> 
> Yes this fix is only for rpc01.  And it seems that rpc01 is not designed 
> for runltp script, but for networktests.sh, which uses TCtmp and TCbin.

The test rpc01 is listed in runtest/rpc and runtest/stress.part3 files, i.e. it
is possible to execute these tests by runltp script.

Moreover all the tests in LTP should follow the same arangement of temp
directory, test binaries directory, etc.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* [LTP]  [PATCH V4] rpc01: fix paths and add Makefile for datafiles
  2013-11-11 14:15       ` chrubis
@ 2013-11-19  6:14         ` Simon Xu
  2013-11-25 13:39           ` Simon Xu
  2013-11-26 14:49           ` chrubis
  0 siblings, 2 replies; 12+ messages in thread
From: Simon Xu @ 2013-11-19  6:14 UTC (permalink / raw)
  To: ltp-list

1) fix $TCbin
2) eliminate $TCtmp, use $TMPDIR instead
3) The files in datafiles dir are needed in the test but they are not
   installed.  Create a Makefile in datafiles to install the files.

Signed-off-by: Simon Xu <xu.simon@oracle.com>
---
 testcases/network/rpc/basic_tests/rpc01/Makefile   |  4 ++-
 .../rpc/basic_tests/rpc01/datafiles/Makefile       | 29 ++++++++++++++++++++++
 testcases/network/rpc/basic_tests/rpc01/rpc01      |  9 +++----
 3 files changed, 36 insertions(+), 6 deletions(-)
 create mode 100644 testcases/network/rpc/basic_tests/rpc01/datafiles/Makefile

diff --git a/testcases/network/rpc/basic_tests/rpc01/Makefile b/testcases/network/rpc/basic_tests/rpc01/Makefile
index ba3fe0a..732d816 100644
--- a/testcases/network/rpc/basic_tests/rpc01/Makefile
+++ b/testcases/network/rpc/basic_tests/rpc01/Makefile
@@ -29,4 +29,6 @@ CPPFLAGS		+= -Wno-error
 
 INSTALL_TARGETS		:= rpc01
 
-include $(top_srcdir)/include/mk/generic_leaf_target.mk
+SUBDIRS			:= datafiles
+
+include $(top_srcdir)/include/mk/generic_trunk_target.mk
diff --git a/testcases/network/rpc/basic_tests/rpc01/datafiles/Makefile b/testcases/network/rpc/basic_tests/rpc01/datafiles/Makefile
new file mode 100644
index 0000000..92370e6
--- /dev/null
+++ b/testcases/network/rpc/basic_tests/rpc01/datafiles/Makefile
@@ -0,0 +1,29 @@
+#
+#    network/rpc/basic_tests/rpc01/datafiles Makefile.
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License along
+#    with this program; if not, write to the Free Software Foundation, Inc.,
+#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+#    Simon Xu <xu.simon@oracle.com> Nov 8 2013
+#
+
+top_srcdir		?= ../../../../../..
+
+include $(top_srcdir)/include/mk/env_pre.mk
+
+INSTALL_DIR		:= testcases/bin/datafiles
+
+INSTALL_TARGETS		:= file*
+
+include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/network/rpc/basic_tests/rpc01/rpc01 b/testcases/network/rpc/basic_tests/rpc01/rpc01
index ef97a95..7eed86d 100755
--- a/testcases/network/rpc/basic_tests/rpc01/rpc01
+++ b/testcases/network/rpc/basic_tests/rpc01/rpc01
@@ -36,9 +36,8 @@
 $trace_logic
 this_file=${0##*/}
 TC=${TC:=rpc01}
-TCbin=${TCbin:=`pwd`}
+TCbin=${TCbin:=$LTPROOT/testcases/bin}
 TCdat=${TCdat:=$TCbin/datafiles}
-TCtmp=${TCtmp:=$LTPROOT/testcases/bin}
 NUMLOOPS=${NUMLOOPS:=3}
 RHOST=${RHOST:=`hostname`}
 CLEANUP=${CLEANUP:="ON"}
@@ -68,7 +67,7 @@ do_test()
     do
       for FILE in $DATAFILES
       do
-	$TCtmp/rpc1 -s $RHOST -f $TCdat/$FILE
+	rpc1 -s $RHOST -f $TCdat/$FILE
 	[ $? -eq 0 ] || end_testcase "Fail on using $FILE"
       done
       COUNT=`expr $COUNT + 1`
@@ -90,9 +89,9 @@ do_cleanup()
     $trace_logic
 
     if [ "$CLEANUP" = "ON" ]; then
-	if [ -f $TCtmp/core ]; then
+	if [ -f $TMPDIR/core ]; then
 	   echo "Core file is saved in /tmp"
-	   mv $TCtmp/core /tmp
+	   mv $TMPDIR/core /tmp
 	fi
 
 	# Kill server
-- 
1.8.4.2


------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [PATCH V4] rpc01: fix paths and add Makefile for datafiles
  2013-11-19  6:14         ` [LTP] [PATCH V4] rpc01: fix paths and add Makefile for datafiles Simon Xu
@ 2013-11-25 13:39           ` Simon Xu
  2013-11-26 14:49           ` chrubis
  1 sibling, 0 replies; 12+ messages in thread
From: Simon Xu @ 2013-11-25 13:39 UTC (permalink / raw)
  To: ltp-list

Could anyone help to review?

Thanks
Simon

On 2013/11/19 14:14, Simon Xu wrote:
> 1) fix $TCbin
> 2) eliminate $TCtmp, use $TMPDIR instead
> 3) The files in datafiles dir are needed in the test but they are not
>     installed.  Create a Makefile in datafiles to install the files.
>
> Signed-off-by: Simon Xu <xu.simon@oracle.com>
> ---
>   testcases/network/rpc/basic_tests/rpc01/Makefile   |  4 ++-
>   .../rpc/basic_tests/rpc01/datafiles/Makefile       | 29 ++++++++++++++++++++++
>   testcases/network/rpc/basic_tests/rpc01/rpc01      |  9 +++----
>   3 files changed, 36 insertions(+), 6 deletions(-)
>   create mode 100644 testcases/network/rpc/basic_tests/rpc01/datafiles/Makefile
>
> diff --git a/testcases/network/rpc/basic_tests/rpc01/Makefile b/testcases/network/rpc/basic_tests/rpc01/Makefile
> index ba3fe0a..732d816 100644
> --- a/testcases/network/rpc/basic_tests/rpc01/Makefile
> +++ b/testcases/network/rpc/basic_tests/rpc01/Makefile
> @@ -29,4 +29,6 @@ CPPFLAGS		+= -Wno-error
>   
>   INSTALL_TARGETS		:= rpc01
>   
> -include $(top_srcdir)/include/mk/generic_leaf_target.mk
> +SUBDIRS			:= datafiles
> +
> +include $(top_srcdir)/include/mk/generic_trunk_target.mk
> diff --git a/testcases/network/rpc/basic_tests/rpc01/datafiles/Makefile b/testcases/network/rpc/basic_tests/rpc01/datafiles/Makefile
> new file mode 100644
> index 0000000..92370e6
> --- /dev/null
> +++ b/testcases/network/rpc/basic_tests/rpc01/datafiles/Makefile
> @@ -0,0 +1,29 @@
> +#
> +#    network/rpc/basic_tests/rpc01/datafiles Makefile.
> +#
> +#    This program is free software; you can redistribute it and/or modify
> +#    it under the terms of the GNU General Public License as published by
> +#    the Free Software Foundation; either version 2 of the License, or
> +#    (at your option) any later version.
> +#
> +#    This program is distributed in the hope that it will be useful,
> +#    but WITHOUT ANY WARRANTY; without even the implied warranty of
> +#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +#    GNU General Public License for more details.
> +#
> +#    You should have received a copy of the GNU General Public License along
> +#    with this program; if not, write to the Free Software Foundation, Inc.,
> +#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
> +#
> +#    Simon Xu <xu.simon@oracle.com> Nov 8 2013
> +#
> +
> +top_srcdir		?= ../../../../../..
> +
> +include $(top_srcdir)/include/mk/env_pre.mk
> +
> +INSTALL_DIR		:= testcases/bin/datafiles
> +
> +INSTALL_TARGETS		:= file*
> +
> +include $(top_srcdir)/include/mk/generic_leaf_target.mk
> diff --git a/testcases/network/rpc/basic_tests/rpc01/rpc01 b/testcases/network/rpc/basic_tests/rpc01/rpc01
> index ef97a95..7eed86d 100755
> --- a/testcases/network/rpc/basic_tests/rpc01/rpc01
> +++ b/testcases/network/rpc/basic_tests/rpc01/rpc01
> @@ -36,9 +36,8 @@
>   $trace_logic
>   this_file=${0##*/}
>   TC=${TC:=rpc01}
> -TCbin=${TCbin:=`pwd`}
> +TCbin=${TCbin:=$LTPROOT/testcases/bin}
>   TCdat=${TCdat:=$TCbin/datafiles}
> -TCtmp=${TCtmp:=$LTPROOT/testcases/bin}
>   NUMLOOPS=${NUMLOOPS:=3}
>   RHOST=${RHOST:=`hostname`}
>   CLEANUP=${CLEANUP:="ON"}
> @@ -68,7 +67,7 @@ do_test()
>       do
>         for FILE in $DATAFILES
>         do
> -	$TCtmp/rpc1 -s $RHOST -f $TCdat/$FILE
> +	rpc1 -s $RHOST -f $TCdat/$FILE
>   	[ $? -eq 0 ] || end_testcase "Fail on using $FILE"
>         done
>         COUNT=`expr $COUNT + 1`
> @@ -90,9 +89,9 @@ do_cleanup()
>       $trace_logic
>   
>       if [ "$CLEANUP" = "ON" ]; then
> -	if [ -f $TCtmp/core ]; then
> +	if [ -f $TMPDIR/core ]; then
>   	   echo "Core file is saved in /tmp"
> -	   mv $TCtmp/core /tmp
> +	   mv $TMPDIR/core /tmp
>   	fi
>   
>   	# Kill server


------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [PATCH V4] rpc01: fix paths and add Makefile for datafiles
  2013-11-19  6:14         ` [LTP] [PATCH V4] rpc01: fix paths and add Makefile for datafiles Simon Xu
  2013-11-25 13:39           ` Simon Xu
@ 2013-11-26 14:49           ` chrubis
       [not found]             ` <52955FA1.7020909@oracle.com>
  1 sibling, 1 reply; 12+ messages in thread
From: chrubis @ 2013-11-26 14:49 UTC (permalink / raw)
  To: Simon Xu; +Cc: ltp-list

Hi!
> +include $(top_srcdir)/include/mk/generic_trunk_target.mk
> diff --git a/testcases/network/rpc/basic_tests/rpc01/datafiles/Makefile b/testcases/network/rpc/basic_tests/rpc01/datafiles/Makefile
> new file mode 100644
> index 0000000..92370e6
> --- /dev/null
> +++ b/testcases/network/rpc/basic_tests/rpc01/datafiles/Makefile
> @@ -0,0 +1,29 @@
> +#
> +#    network/rpc/basic_tests/rpc01/datafiles Makefile.
> +#
> +#    This program is free software; you can redistribute it and/or modify
> +#    it under the terms of the GNU General Public License as published by
> +#    the Free Software Foundation; either version 2 of the License, or
> +#    (at your option) any later version.
> +#
> +#    This program is distributed in the hope that it will be useful,
> +#    but WITHOUT ANY WARRANTY; without even the implied warranty of
> +#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +#    GNU General Public License for more details.
> +#
> +#    You should have received a copy of the GNU General Public License along
> +#    with this program; if not, write to the Free Software Foundation, Inc.,
> +#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
> +#
> +#    Simon Xu <xu.simon@oracle.com> Nov 8 2013
> +#
> +
> +top_srcdir		?= ../../../../../..
> +
> +include $(top_srcdir)/include/mk/env_pre.mk
> +
> +INSTALL_DIR		:= testcases/bin/datafiles

We allready have a testcases/data/ directory that is used by the unzip
testcase, what about using this one instead?

> +INSTALL_TARGETS		:= file*

Can you please also rename the data files so that it's clear that they
are part of the rpc test? Something like rpc01_file1 rpc01_file2 or
similar should do. Or we can start stacking the files into
subdirectories named after the testcase, i.e.
testcases/data/rpc01/file1

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [PATCH V4] rpc01: fix paths and add Makefile for datafiles
       [not found]             ` <52955FA1.7020909@oracle.com>
@ 2013-11-27 11:49               ` chrubis
       [not found]                 ` <52971586.5090009@oracle.com>
  0 siblings, 1 reply; 12+ messages in thread
From: chrubis @ 2013-11-27 11:49 UTC (permalink / raw)
  To: Simon Xu; +Cc: ltp-list

Hi!
> testcases/bin/datafiles is used by several tests
> 
> ~/devel/ltp/testcases/network > grep -r datafiles *
> Makefile:DIR                    := datafiles
> nfs/nfslock01/nfslock01:#           datafiles are compared.
> nfs/nfs02/nfs02:TCdat=${TCdat:=$TCbin/datafiles}
> rpc/basic_tests/rpc01/rpc01:TCdat=${TCdat:=$TCbin/datafiles}
> tcp_cmds/ftp/ftp01:    TCdat=${TCdat:-$LTPROOT/datafiles}
> tcp_cmds/Makefile:INSTALL_DEPS          := ../datafiles/bin.sm
> tcp_cmds/Makefile:../datafiles/bin.sm:
> tcp_cmds/rcp/rcp01: TCdat=${TCdat:-$LTPROOT/testcases/bin/datafiles}
> tcp_cmds/Makefile.inc:#    network/tcp_cmds datafiles dependent include 
> Makefile.
> tcp_cmds/Makefile.inc:MAKE_DEPS         := 
> $(GENERATE_FILE_DIR)/datafiles/bin.sm
> tcp_cmds/rdist/rdist01: TCdat=${TCdat:-$LTPROOT/testcases/bin/datafiles}
> tcp_cmds/sendfile/sendfile01: 
> TCdat=${TCdat:-$LTPROOT/testcases/bin/datafiles}

Ah, I guess there are at least two more places where tests install their
data files. I've looked around and found a few in testcases/bin/ :(

> I think we better change all of them or do nothing.

Right. I want to have one single place to store test datafiles and
ideally to be easy to figure out which files belogs to which testcases.
Once this is defined we can fix all the testcases as well.

What about this:

1. Testcases datafiles are stored in a TESTNAME_data directory
   where TESTNAME is name of the test or a group of test (if
   the files are used by more than one test)

2. The whole directory gets installed somewhere in the
   /opt/ltp/testcases/, be it testcases/bin/datafiles or
   testcases/datafiles.

What do you think?

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* [LTP]  [PATCH V5] rpc01: fix paths and add Makefile for datafiles
       [not found]                 ` <52971586.5090009@oracle.com>
@ 2013-11-28 10:10                   ` Simon Xu
  2013-12-02 17:59                     ` chrubis
  2013-11-28 10:20                   ` [LTP] [PATCH V4] " chrubis
  1 sibling, 1 reply; 12+ messages in thread
From: Simon Xu @ 2013-11-28 10:10 UTC (permalink / raw)
  To: ltp-list

Signed-off-by: Simon Xu <xu.simon@oracle.com>
---
 testcases/network/rpc/basic_tests/rpc01/Makefile   |  4 ++-
 .../rpc/basic_tests/rpc01/datafiles/Makefile       | 29 ++++++++++++++++++++++
 testcases/network/rpc/basic_tests/rpc01/rpc01      | 11 ++++----
 3 files changed, 37 insertions(+), 7 deletions(-)
 create mode 100644 testcases/network/rpc/basic_tests/rpc01/datafiles/Makefile

diff --git a/testcases/network/rpc/basic_tests/rpc01/Makefile b/testcases/network/rpc/basic_tests/rpc01/Makefile
index ba3fe0a..732d816 100644
--- a/testcases/network/rpc/basic_tests/rpc01/Makefile
+++ b/testcases/network/rpc/basic_tests/rpc01/Makefile
@@ -29,4 +29,6 @@ CPPFLAGS		+= -Wno-error
 
 INSTALL_TARGETS		:= rpc01
 
-include $(top_srcdir)/include/mk/generic_leaf_target.mk
+SUBDIRS			:= datafiles
+
+include $(top_srcdir)/include/mk/generic_trunk_target.mk
diff --git a/testcases/network/rpc/basic_tests/rpc01/datafiles/Makefile b/testcases/network/rpc/basic_tests/rpc01/datafiles/Makefile
new file mode 100644
index 0000000..7be4942
--- /dev/null
+++ b/testcases/network/rpc/basic_tests/rpc01/datafiles/Makefile
@@ -0,0 +1,29 @@
+#
+#    network/rpc/basic_tests/rpc01/datafiles Makefile.
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License along
+#    with this program; if not, write to the Free Software Foundation, Inc.,
+#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+#    Simon Xu <xu.simon@oracle.com> Nov 8 2013
+#
+
+top_srcdir		?= ../../../../../..
+
+include $(top_srcdir)/include/mk/env_pre.mk
+
+INSTALL_DIR		:= testcases/data/rpc01
+
+INSTALL_TARGETS		:= file*
+
+include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/network/rpc/basic_tests/rpc01/rpc01 b/testcases/network/rpc/basic_tests/rpc01/rpc01
index fd236b1..8ed69b0 100755
--- a/testcases/network/rpc/basic_tests/rpc01/rpc01
+++ b/testcases/network/rpc/basic_tests/rpc01/rpc01
@@ -36,9 +36,8 @@
 $trace_logic
 this_file=${0##*/}
 TC=${TC:=rpc01}
-TCbin=${TCbin:=`pwd`}
-TCdat=${TCdat:=$TCbin/datafiles}
-TCtmp=${TCtmp:=$LTPROOT/testcases/bin}
+TCbin=${TCbin:=$LTPROOT/testcases/bin}
+TCdat=${TCdat:=$LTPROOT/testcases/data/rpc01}
 NUMLOOPS=${NUMLOOPS:=3}
 RHOST=${RHOST:=`hostname`}
 CLEANUP=${CLEANUP:="ON"}
@@ -71,7 +70,7 @@ do_test()
     do
       for FILE in $DATAFILES
       do
-	$TCtmp/rpc1 -s $RHOST -f $TCdat/$FILE
+	rpc1 -s $RHOST -f $TCdat/$FILE
 	[ $? -eq 0 ] || end_testcase "Fail on using $FILE"
       done
       COUNT=`expr $COUNT + 1`
@@ -93,9 +92,9 @@ do_cleanup()
     $trace_logic
 
     if [ "$CLEANUP" = "ON" ]; then
-	if [ -f $TCtmp/core ]; then
+	if [ -f $TMPDIR/core ]; then
 	   echo "Core file is saved in /tmp"
-	   mv $TCtmp/core /tmp
+	   mv $TMPDIR/core /tmp
 	fi
 
 	# Kill server
-- 
1.8.4.2


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [PATCH V4] rpc01: fix paths and add Makefile for datafiles
       [not found]                 ` <52971586.5090009@oracle.com>
  2013-11-28 10:10                   ` [LTP] [PATCH V5] " Simon Xu
@ 2013-11-28 10:20                   ` chrubis
  1 sibling, 0 replies; 12+ messages in thread
From: chrubis @ 2013-11-28 10:20 UTC (permalink / raw)
  To: Simon Xu; +Cc: ltp-list

Hi!
> > Ah, I guess there are at least two more places where tests install their
> > data files. I've looked around and found a few in testcases/bin/ :(
> >
> >> I think we better change all of them or do nothing.
> > Right. I want to have one single place to store test datafiles and
> > ideally to be easy to figure out which files belogs to which testcases.
> > Once this is defined we can fix all the testcases as well.
> >
> > What about this:
> >
> > 1. Testcases datafiles are stored in a TESTNAME_data directory
> >     where TESTNAME is name of the test or a group of test (if
> >     the files are used by more than one test)
> >
> > 2. The whole directory gets installed somewhere in the
> >     /opt/ltp/testcases/, be it testcases/bin/datafiles or
> >     testcases/datafiles.
> >
> > What do you think?
> 
> What about testcases/data/TESTNAME?

OK with me.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [PATCH V5] rpc01: fix paths and add Makefile for datafiles
  2013-11-28 10:10                   ` [LTP] [PATCH V5] " Simon Xu
@ 2013-12-02 17:59                     ` chrubis
  0 siblings, 0 replies; 12+ messages in thread
From: chrubis @ 2013-12-02 17:59 UTC (permalink / raw)
  To: Simon Xu; +Cc: ltp-list

Hi!
> Signed-off-by: Simon Xu <xu.simon@oracle.com>
> ---
>  testcases/network/rpc/basic_tests/rpc01/Makefile   |  4 ++-
>  .../rpc/basic_tests/rpc01/datafiles/Makefile       | 29 ++++++++++++++++++++++
>  testcases/network/rpc/basic_tests/rpc01/rpc01      | 11 ++++----
>  3 files changed, 37 insertions(+), 7 deletions(-)
>  create mode 100644 testcases/network/rpc/basic_tests/rpc01/datafiles/Makefile

Pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

end of thread, other threads:[~2013-12-02 17:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-06  2:25 [LTP] [PATCH] rpc01: fix $TCbin and $TCtmp Simon Xu
2013-11-06  5:28 ` [LTP] [PATCH V2] rpc01: fix $TCbin and $TCtmp and data file names Simon Xu
2013-11-07 16:25   ` chrubis
     [not found]     ` <527C45FD.3090008@oracle.com>
2013-11-11 14:15       ` chrubis
2013-11-19  6:14         ` [LTP] [PATCH V4] rpc01: fix paths and add Makefile for datafiles Simon Xu
2013-11-25 13:39           ` Simon Xu
2013-11-26 14:49           ` chrubis
     [not found]             ` <52955FA1.7020909@oracle.com>
2013-11-27 11:49               ` chrubis
     [not found]                 ` <52971586.5090009@oracle.com>
2013-11-28 10:10                   ` [LTP] [PATCH V5] " Simon Xu
2013-12-02 17:59                     ` chrubis
2013-11-28 10:20                   ` [LTP] [PATCH V4] " chrubis
2013-11-08  6:17   ` [LTP] [PATCH V3] rpc01: fix $TCbin and $TCtmp " Simon Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox