From: Simon Xu <xu.simon@oracle.com>
To: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH V4] rpc01: fix paths and add Makefile for datafiles
Date: Mon, 25 Nov 2013 21:39:38 +0800 [thread overview]
Message-ID: <5293531A.5090402@oracle.com> (raw)
In-Reply-To: <1384841690-716-1-git-send-email-xu.simon@oracle.com>
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
next prev parent reply other threads:[~2013-11-25 13:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5293531A.5090402@oracle.com \
--to=xu.simon@oracle.com \
--cc=ltp-list@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox