* [LTP] [PATCH 1/3] runtest/stress.part3: fix cmd for the rpc01 test case
@ 2013-12-23 15:25 Stanislav Kholmanskikh
2013-12-23 15:25 ` [LTP] [PATCH 2/3] rpc01: moved common functions to a lib Stanislav Kholmanskikh
2014-02-05 10:45 ` [LTP] [PATCH 1/3] runtest/stress.part3: fix cmd for the rpc01 test case Stanislav Kholmanskikh
0 siblings, 2 replies; 11+ messages in thread
From: Stanislav Kholmanskikh @ 2013-12-23 15:25 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
Patch 9a7031ab2778600249947882d9f00acc9bcc1310 fixed some paths in
the rpc01 test script, so we shouldn't set TCbin before calling.
Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
---
runtest/stress.part3 | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/runtest/stress.part3 b/runtest/stress.part3
index eac28d0..caa9a60 100644
--- a/runtest/stress.part3
+++ b/runtest/stress.part3
@@ -884,7 +884,7 @@ hangup01 hangup01
mc_cmds mc_cmds
mc_opts export TCsrc=$LTPROOT/testcases/network/multicast/mc_opts; mc_opts
-rpc01 export TCbin=$LTPROOT/testcases/network/rpc/basic_tests/rpc01; rpc01
+rpc01 rpc01
run_rpc_tests.sh export TCbin=$LTPROOT/testcases/network/rpc/rpc-tirpc-full-test-suite; run_rpc_tests.sh
perf_lan perf_lan
--
1.7.1
------------------------------------------------------------------------------
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=84349831&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] 11+ messages in thread
* [LTP] [PATCH 2/3] rpc01: moved common functions to a lib
2013-12-23 15:25 [LTP] [PATCH 1/3] runtest/stress.part3: fix cmd for the rpc01 test case Stanislav Kholmanskikh
@ 2013-12-23 15:25 ` Stanislav Kholmanskikh
2013-12-23 15:25 ` [LTP] [PATCH 3/3] rpc01: fix compile-time warnings Stanislav Kholmanskikh
2014-04-07 18:12 ` [LTP] [PATCH 2/3] rpc01: moved common functions to a lib chrubis
2014-02-05 10:45 ` [LTP] [PATCH 1/3] runtest/stress.part3: fix cmd for the rpc01 test case Stanislav Kholmanskikh
1 sibling, 2 replies; 11+ messages in thread
From: Stanislav Kholmanskikh @ 2013-12-23 15:25 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
"Decipher"-functions xdr_receive_data and xdr_send_data are used
by both rpc_server and rpc1, so moved them to a separate library.
Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
---
testcases/network/rpc/basic_tests/rpc01/Makefile | 10 ++++-
testcases/network/rpc/basic_tests/rpc01/librpc01.c | 49 ++++++++++++++++++++
testcases/network/rpc/basic_tests/rpc01/librpc01.h | 34 ++++++++++++++
testcases/network/rpc/basic_tests/rpc01/rpc1.c | 39 +---------------
.../network/rpc/basic_tests/rpc01/rpc_server.c | 39 +---------------
5 files changed, 94 insertions(+), 77 deletions(-)
create mode 100644 testcases/network/rpc/basic_tests/rpc01/librpc01.c
create mode 100644 testcases/network/rpc/basic_tests/rpc01/librpc01.h
diff --git a/testcases/network/rpc/basic_tests/rpc01/Makefile b/testcases/network/rpc/basic_tests/rpc01/Makefile
index 732d816..68ea85e 100644
--- a/testcases/network/rpc/basic_tests/rpc01/Makefile
+++ b/testcases/network/rpc/basic_tests/rpc01/Makefile
@@ -28,7 +28,15 @@ include $(top_srcdir)/include/mk/env_pre.mk
CPPFLAGS += -Wno-error
INSTALL_TARGETS := rpc01
-
SUBDIRS := datafiles
+LIBSRCS := $(abs_srcdir)/librpc01.c
+INTERNAL_LIB := librpc01.a
+LDFLAGS += -L$(abs_srcdir)
+LDLIBS += -lrpc01
+
+MAKE_TARGETS := rpc1 rpc_server
+$(MAKE_TARGETS): $(INTERNAL_LIB)
+
include $(top_srcdir)/include/mk/generic_trunk_target.mk
+include $(top_srcdir)/include/mk/lib.mk
diff --git a/testcases/network/rpc/basic_tests/rpc01/librpc01.c b/testcases/network/rpc/basic_tests/rpc01/librpc01.c
new file mode 100644
index 0000000..b726aa0
--- /dev/null
+++ b/testcases/network/rpc/basic_tests/rpc01/librpc01.c
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2013 Linux Test Project.
+ *
+ * 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 would 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 the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <rpc/xdr.h>
+#include "librpc01.h"
+
+int xdr_receive_data(XDR *xdrs, struct data **buffer)
+{
+ struct data *bp;
+ int i, rc;
+ char *p;
+
+ bp = *buffer = (struct data *)malloc(sizeof(struct data));
+ rc = xdr_long(xdrs, &(bp->address));
+ rc = rc && xdr_long(xdrs, &bp->request_id);
+ rc = rc && xdr_long(xdrs, &bp->data_length);
+ p = (*buffer)->data = (char *)malloc(bp->data_length);
+ for (i = 0; rc && i < bp->data_length; p++, i++)
+ rc = xdr_char(xdrs, p);
+ return rc;
+}
+
+int xdr_send_data(XDR *xdrs, struct data *buffer)
+{
+ int i, rc;
+ char *p;
+
+ rc = xdr_long(xdrs, &buffer->address);
+ rc = rc && xdr_long(xdrs, &buffer->request_id);
+ rc = rc && xdr_long(xdrs, &buffer->data_length);
+ for (i = 0, p = buffer->data; rc && i < buffer->data_length; i++, p++)
+ rc = xdr_char(xdrs, p);
+ return rc;
+}
diff --git a/testcases/network/rpc/basic_tests/rpc01/librpc01.h b/testcases/network/rpc/basic_tests/rpc01/librpc01.h
new file mode 100644
index 0000000..aae3901
--- /dev/null
+++ b/testcases/network/rpc/basic_tests/rpc01/librpc01.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2013 Linux Test Project.
+ *
+ * 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 would 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 the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __LIBRPC_H__
+#define __LIBRPC_H__
+
+#include <rpc/xdr.h>
+
+struct data {
+ long address;
+ long request_id;
+ long data_length;
+ char *data;
+};
+
+int xdr_receive_data(XDR *xdrs, struct data **buffer);
+int xdr_send_data(XDR *xdrs, struct data *buffer);
+
+#endif /* __LIBRPC_H__ */
diff --git a/testcases/network/rpc/basic_tests/rpc01/rpc1.c b/testcases/network/rpc/basic_tests/rpc01/rpc1.c
index 946cb21..57a338e 100644
--- a/testcases/network/rpc/basic_tests/rpc01/rpc1.c
+++ b/testcases/network/rpc/basic_tests/rpc01/rpc1.c
@@ -9,6 +9,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include "librpc01.h"
int program = 2000333;
int version = 10;
@@ -17,15 +18,6 @@ char *file_name = NULL;
char host_name[100];
long host_address;
-struct data {
- long address;
- long request_id;
- long data_length;
- char *data;
-};
-
-int xdr_receive_data(XDR *, struct data **);
-int xdr_send_data(XDR *, struct data *);
void do_compare(int, char *, struct data *, char *);
void usage_error(char *program_name);
@@ -187,35 +179,6 @@ void do_compare(int rpc_rc, char *msg, struct data *buffer, char *ret_data)
}
}
-int xdr_receive_data(XDR * xdrs, struct data **buffer)
-{
- struct data *bp;
- int i, rc;
- char *p;
-
- bp = *buffer = (struct data *)malloc(sizeof(struct data));
- rc = xdr_long(xdrs, &(bp->address));
- rc = rc && xdr_long(xdrs, &bp->request_id);
- rc = rc && xdr_long(xdrs, &bp->data_length);
- p = (*buffer)->data = (char *)malloc(bp->data_length);
- for (i = 0; rc && i < bp->data_length; p++, i++)
- rc = xdr_char(xdrs, p);
- return (rc);
-}
-
-int xdr_send_data(XDR * xdrs, struct data *buffer)
-{
- int i, rc;
- char *p;
-
- rc = xdr_long(xdrs, &buffer->address);
- rc = rc && xdr_long(xdrs, &buffer->request_id);
- rc = rc && xdr_long(xdrs, &buffer->data_length);
- for (i = 0, p = buffer->data; rc && i < buffer->data_length; i++, p++)
- rc = xdr_char(xdrs, p);
- return (rc);
-}
-
void usage_error(char *program_name)
{
fprintf(stderr,
diff --git a/testcases/network/rpc/basic_tests/rpc01/rpc_server.c b/testcases/network/rpc/basic_tests/rpc01/rpc_server.c
index 4fdff8e..e0b5001 100644
--- a/testcases/network/rpc/basic_tests/rpc01/rpc_server.c
+++ b/testcases/network/rpc/basic_tests/rpc01/rpc_server.c
@@ -6,6 +6,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <rpc/rpc.h>
+#include "librpc01.h"
int debug = 0;
int program = 2000333;
@@ -13,17 +14,8 @@ int version = 10;
char host_name[100];
long host_address;
-struct data {
- long address;
- long request_id;
- long data_length;
- char *data;
-};
-
void breakpoint(void);
void service_request(struct svc_req *rqstp, SVCXPRT * transp);
-int xdr_receive_data(XDR * xdrs, struct data **buffer);
-int xdr_send_data(XDR * xdrs, struct data *buffer);
int main(int argc, char *argv[])
{
@@ -125,35 +117,6 @@ void service_request(struct svc_req *rqstp, SVCXPRT * transp)
}
}
-int xdr_receive_data(XDR * xdrs, struct data **buffer)
-{
- struct data *bp;
- int i, rc;
- char *p;
-
- bp = *buffer = (struct data *)malloc(sizeof(struct data));
- rc = xdr_long(xdrs, &(bp->address));
- rc = rc && xdr_long(xdrs, &bp->request_id);
- rc = rc && xdr_long(xdrs, &bp->data_length);
- p = (*buffer)->data = (char *)malloc(bp->data_length);
- for (i = 0; rc && i < bp->data_length; p++, i++)
- rc = xdr_char(xdrs, p);
- return (rc);
-}
-
-int xdr_send_data(XDR * xdrs, struct data *buffer)
-{
- int i, rc;
- char *p;
-
- rc = xdr_long(xdrs, &buffer->address);
- rc = rc && xdr_long(xdrs, &buffer->request_id);
- rc = rc && xdr_long(xdrs, &buffer->data_length);
- for (i = 0, p = buffer->data; rc && i < buffer->data_length; i++, p++)
- rc = xdr_char(xdrs, p);
- return (rc);
-}
-
void breakpoint(void)
{
if (debug)
--
1.7.1
------------------------------------------------------------------------------
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=84349831&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] 11+ messages in thread
* [LTP] [PATCH 3/3] rpc01: fix compile-time warnings
2013-12-23 15:25 ` [LTP] [PATCH 2/3] rpc01: moved common functions to a lib Stanislav Kholmanskikh
@ 2013-12-23 15:25 ` Stanislav Kholmanskikh
2014-02-05 12:08 ` chrubis
2014-04-07 18:12 ` [LTP] [PATCH 2/3] rpc01: moved common functions to a lib chrubis
1 sibling, 1 reply; 11+ messages in thread
From: Stanislav Kholmanskikh @ 2013-12-23 15:25 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
And also removed host_address logic from rpc_server (since it is not
used there anyway).
Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
---
testcases/network/rpc/basic_tests/rpc01/librpc01.c | 4 ++--
testcases/network/rpc/basic_tests/rpc01/librpc01.h | 4 ++--
testcases/network/rpc/basic_tests/rpc01/rpc1.c | 15 +++++++++------
.../network/rpc/basic_tests/rpc01/rpc_server.c | 17 ++++++-----------
4 files changed, 19 insertions(+), 21 deletions(-)
diff --git a/testcases/network/rpc/basic_tests/rpc01/librpc01.c b/testcases/network/rpc/basic_tests/rpc01/librpc01.c
index b726aa0..447b7cd 100644
--- a/testcases/network/rpc/basic_tests/rpc01/librpc01.c
+++ b/testcases/network/rpc/basic_tests/rpc01/librpc01.c
@@ -19,7 +19,7 @@
#include <rpc/xdr.h>
#include "librpc01.h"
-int xdr_receive_data(XDR *xdrs, struct data **buffer)
+bool_t xdr_receive_data(XDR *xdrs, struct data **buffer)
{
struct data *bp;
int i, rc;
@@ -35,7 +35,7 @@ int xdr_receive_data(XDR *xdrs, struct data **buffer)
return rc;
}
-int xdr_send_data(XDR *xdrs, struct data *buffer)
+bool_t xdr_send_data(XDR *xdrs, struct data *buffer)
{
int i, rc;
char *p;
diff --git a/testcases/network/rpc/basic_tests/rpc01/librpc01.h b/testcases/network/rpc/basic_tests/rpc01/librpc01.h
index aae3901..0fa7969 100644
--- a/testcases/network/rpc/basic_tests/rpc01/librpc01.h
+++ b/testcases/network/rpc/basic_tests/rpc01/librpc01.h
@@ -28,7 +28,7 @@ struct data {
char *data;
};
-int xdr_receive_data(XDR *xdrs, struct data **buffer);
-int xdr_send_data(XDR *xdrs, struct data *buffer);
+bool_t xdr_receive_data(XDR *xdrs, struct data **buffer);
+bool_t xdr_send_data(XDR *xdrs, struct data *buffer);
#endif /* __LIBRPC_H__ */
diff --git a/testcases/network/rpc/basic_tests/rpc01/rpc1.c b/testcases/network/rpc/basic_tests/rpc01/rpc1.c
index 57a338e..570c39c 100644
--- a/testcases/network/rpc/basic_tests/rpc01/rpc1.c
+++ b/testcases/network/rpc/basic_tests/rpc01/rpc1.c
@@ -125,8 +125,9 @@ int main(int argc, char *argv[])
*p = getc(fp);
fclose(fp);
- rc = callrpc(server, program, version, 1, xdr_send_data, &buffer,
- xdr_receive_data, &return_buffer);
+ rc = callrpc(server, program, version, 1, (xdrproc_t)xdr_send_data,
+ (char *)&buffer, (xdrproc_t)xdr_receive_data,
+ (char *)&return_buffer);
do_compare(rc, "callrpc", &buffer, return_buffer->data);
server_sin.sin_port = 0;
@@ -140,8 +141,9 @@ int main(int argc, char *argv[])
}
timeout.tv_usec = 0;
timeout.tv_sec = 30;
- rc = (int)clnt_call(clnt, 1, xdr_send_data, &buffer,
- xdr_receive_data, &return_buffer, timeout);
+ rc = (int)clnt_call(clnt, 1, (xdrproc_t)xdr_send_data,
+ (char *)&buffer, (xdrproc_t)xdr_receive_data,
+ (char *)&return_buffer, timeout);
clnt_destroy(clnt);
do_compare(rc, "udp transport", &buffer, return_buffer->data);
@@ -154,8 +156,9 @@ int main(int argc, char *argv[])
}
timeout.tv_usec = 0;
timeout.tv_sec = 30;
- rc = (int)clnt_call(clnt, 1, xdr_send_data, &buffer,
- xdr_receive_data, &return_buffer, timeout);
+ rc = (int)clnt_call(clnt, 1, (xdrproc_t)xdr_send_data,
+ (char *)&buffer, (xdrproc_t)xdr_receive_data,
+ (char *)&return_buffer, timeout);
clnt_destroy(clnt);
do_compare(rc, "tcp transport", &buffer, return_buffer->data);
diff --git a/testcases/network/rpc/basic_tests/rpc01/rpc_server.c b/testcases/network/rpc/basic_tests/rpc01/rpc_server.c
index e0b5001..61c383b 100644
--- a/testcases/network/rpc/basic_tests/rpc01/rpc_server.c
+++ b/testcases/network/rpc/basic_tests/rpc01/rpc_server.c
@@ -11,8 +11,6 @@
int debug = 0;
int program = 2000333;
int version = 10;
-char host_name[100];
-long host_address;
void breakpoint(void);
void service_request(struct svc_req *rqstp, SVCXPRT * transp);
@@ -20,7 +18,6 @@ void service_request(struct svc_req *rqstp, SVCXPRT * transp);
int main(int argc, char *argv[])
{
SVCXPRT *transp;
- struct hostent *hp;
int i, n;
for (i = 1; i < argc; i++) {
@@ -70,7 +67,7 @@ int main(int argc, char *argv[])
close(i);
open("/dev/null", O_RDONLY);
open("/dev/null", O_WRONLY);
- dup(1);
+ i = dup(1);
if ((i = open("/dev/tty", O_RDWR)) >= 0) {
ioctl(i, TIOCNOTTY, 0);
@@ -78,10 +75,6 @@ int main(int argc, char *argv[])
}
}
- gethostname(host_name, 100);
- if (hp = gethostbyname(host_name))
- host_address = *((long *)hp->h_addr_list[0]);
-
pmap_unset(program, version);
transp = svcudp_create(RPC_ANYSOCK);
svc_register(transp, program, version, service_request, IPPROTO_UDP);
@@ -97,7 +90,7 @@ void service_request(struct svc_req *rqstp, SVCXPRT * transp)
switch (rqstp->rq_proc) {
case 0:
- svc_sendreply(transp, xdr_void, (char *)0);
+ svc_sendreply(transp, (xdrproc_t)xdr_void, (char *)0);
breakpoint();
return;
@@ -105,8 +98,10 @@ void service_request(struct svc_req *rqstp, SVCXPRT * transp)
exit(0);
case 1:
- svc_getargs(transp, xdr_receive_data, (unsigned char *)&buffer);
- svc_sendreply(transp, xdr_send_data, (unsigned char *)buffer);
+ svc_getargs(transp, (xdrproc_t)xdr_receive_data,
+ (char *)&buffer);
+ svc_sendreply(transp, (xdrproc_t)xdr_send_data,
+ (char *)buffer);
free(buffer->data);
free(buffer);
return;
--
1.7.1
------------------------------------------------------------------------------
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=84349831&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] 11+ messages in thread
* Re: [LTP] [PATCH 1/3] runtest/stress.part3: fix cmd for the rpc01 test case
2013-12-23 15:25 [LTP] [PATCH 1/3] runtest/stress.part3: fix cmd for the rpc01 test case Stanislav Kholmanskikh
2013-12-23 15:25 ` [LTP] [PATCH 2/3] rpc01: moved common functions to a lib Stanislav Kholmanskikh
@ 2014-02-05 10:45 ` Stanislav Kholmanskikh
2014-02-05 12:10 ` chrubis
1 sibling, 1 reply; 11+ messages in thread
From: Stanislav Kholmanskikh @ 2014-02-05 10:45 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
On 12/23/2013 07:25 PM, Stanislav Kholmanskikh wrote:
> Patch 9a7031ab2778600249947882d9f00acc9bcc1310 fixed some paths in
> the rpc01 test script, so we shouldn't set TCbin before calling.
>
> Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
> ---
Hello!
Could anybody review this series of patches?
Thanks.
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&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] 11+ messages in thread
* Re: [LTP] [PATCH 3/3] rpc01: fix compile-time warnings
2013-12-23 15:25 ` [LTP] [PATCH 3/3] rpc01: fix compile-time warnings Stanislav Kholmanskikh
@ 2014-02-05 12:08 ` chrubis
0 siblings, 0 replies; 11+ messages in thread
From: chrubis @ 2014-02-05 12:08 UTC (permalink / raw)
To: Stanislav Kholmanskikh; +Cc: vasily.isaenko, ltp-list
Hi!
> And also removed host_address logic from rpc_server (since it is not
> used there anyway).
I've removed a few useless (char *) cast (mostly pointers from malloc())
and changed (char *)0 to NULL and commited, thanks.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&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] 11+ messages in thread
* Re: [LTP] [PATCH 1/3] runtest/stress.part3: fix cmd for the rpc01 test case
2014-02-05 10:45 ` [LTP] [PATCH 1/3] runtest/stress.part3: fix cmd for the rpc01 test case Stanislav Kholmanskikh
@ 2014-02-05 12:10 ` chrubis
2014-02-05 12:11 ` chrubis
0 siblings, 1 reply; 11+ messages in thread
From: chrubis @ 2014-02-05 12:10 UTC (permalink / raw)
To: Stanislav Kholmanskikh; +Cc: vasily.isaenko, ltp-list
Hi!
>
> Could anybody review this series of patches?
Pushed, (with additional cleanup for the second one), sorry for the
delay.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&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] 11+ messages in thread
* Re: [LTP] [PATCH 1/3] runtest/stress.part3: fix cmd for the rpc01 test case
2014-02-05 12:10 ` chrubis
@ 2014-02-05 12:11 ` chrubis
0 siblings, 0 replies; 11+ messages in thread
From: chrubis @ 2014-02-05 12:11 UTC (permalink / raw)
To: Stanislav Kholmanskikh; +Cc: vasily.isaenko, ltp-list
Hi!
> > Could anybody review this series of patches?
>
> Pushed, (with additional cleanup for the second one), sorry for the
^
third one
(the one that fixes the warnings)
> delay.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&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] 11+ messages in thread
* Re: [LTP] [PATCH 2/3] rpc01: moved common functions to a lib
2013-12-23 15:25 ` [LTP] [PATCH 2/3] rpc01: moved common functions to a lib Stanislav Kholmanskikh
2013-12-23 15:25 ` [LTP] [PATCH 3/3] rpc01: fix compile-time warnings Stanislav Kholmanskikh
@ 2014-04-07 18:12 ` chrubis
[not found] ` <5343A0AC.6010803@oracle.com>
1 sibling, 1 reply; 11+ messages in thread
From: chrubis @ 2014-04-07 18:12 UTC (permalink / raw)
To: Stanislav Kholmanskikh; +Cc: vasily.isaenko, ltp-list
Hi!
> diff --git a/testcases/network/rpc/basic_tests/rpc01/Makefile b/testcases/network/rpc/basic_tests/rpc01/Makefile
> index 732d816..68ea85e 100644
> --- a/testcases/network/rpc/basic_tests/rpc01/Makefile
> +++ b/testcases/network/rpc/basic_tests/rpc01/Makefile
> @@ -28,7 +28,15 @@ include $(top_srcdir)/include/mk/env_pre.mk
> CPPFLAGS += -Wno-error
>
> INSTALL_TARGETS := rpc01
> -
> SUBDIRS := datafiles
>
> +LIBSRCS := $(abs_srcdir)/librpc01.c
> +INTERNAL_LIB := librpc01.a
> +LDFLAGS += -L$(abs_srcdir)
> +LDLIBS += -lrpc01
> +
> +MAKE_TARGETS := rpc1 rpc_server
> +$(MAKE_TARGETS): $(INTERNAL_LIB)
> +
> include $(top_srcdir)/include/mk/generic_trunk_target.mk
> +include $(top_srcdir)/include/mk/lib.mk
There is a problem with this change. Including both trunk target and lib
makes the install phase to install the MAKE_TARGETS both to
/testcases/bin and /usr/lib{,64}/ (because each of them installs
MAKE_TARGETS to INSTALL_DIR).
Given that there may be other problems with this setup I would rather
move the library to a subdirectory with it's own Makefile. What do you
think?
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 11+ messages in thread
* [LTP] [PATCH] rpc01: moved the library into a separate directory
[not found] ` <5343A0AC.6010803@oracle.com>
@ 2014-04-08 7:12 ` Stanislav Kholmanskikh
2014-04-08 11:41 ` chrubis
2014-04-08 9:56 ` [LTP] [PATCH 2/3] rpc01: moved common functions to a lib chrubis
1 sibling, 1 reply; 11+ messages in thread
From: Stanislav Kholmanskikh @ 2014-04-08 7:12 UTC (permalink / raw)
To: ltp-list; +Cc: vasily.isaenko
Cyril Hrubis noticed that including both
* lib.mk and
* generic_trunk_target.mk
in one Makefile results in a situation when MAKE_TARGETS are installed twice,
into /testcases/bin and /lib.
Therefore we are moving the library into a separate directory.
Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
---
testcases/network/rpc/basic_tests/rpc01/Makefile | 22 +++++++--
.../network/rpc/basic_tests/rpc01/lib/Makefile | 25 ++++++++++
.../network/rpc/basic_tests/rpc01/lib/librpc01.c | 49 ++++++++++++++++++++
.../network/rpc/basic_tests/rpc01/lib/librpc01.h | 34 ++++++++++++++
testcases/network/rpc/basic_tests/rpc01/librpc01.c | 49 --------------------
testcases/network/rpc/basic_tests/rpc01/librpc01.h | 34 --------------
6 files changed, 125 insertions(+), 88 deletions(-)
create mode 100644 testcases/network/rpc/basic_tests/rpc01/lib/Makefile
create mode 100644 testcases/network/rpc/basic_tests/rpc01/lib/librpc01.c
create mode 100644 testcases/network/rpc/basic_tests/rpc01/lib/librpc01.h
delete mode 100644 testcases/network/rpc/basic_tests/rpc01/librpc01.c
delete mode 100644 testcases/network/rpc/basic_tests/rpc01/librpc01.h
diff --git a/testcases/network/rpc/basic_tests/rpc01/Makefile b/testcases/network/rpc/basic_tests/rpc01/Makefile
index 7815cbb..af945bc 100644
--- a/testcases/network/rpc/basic_tests/rpc01/Makefile
+++ b/testcases/network/rpc/basic_tests/rpc01/Makefile
@@ -30,13 +30,25 @@ CPPFLAGS += -Wno-error
INSTALL_TARGETS := rpc01
SUBDIRS := datafiles
-LIBSRCS := $(abs_srcdir)/librpc01.c
-INTERNAL_LIB := librpc01.a
-LDFLAGS += -L$(abs_builddir)
+CPPFLAGS += -I$(abs_srcdir)/lib
+LDFLAGS += -L$(abs_builddir)/lib
LDLIBS += -lrpc01
+LIBDIR := lib
+LIB := $(LIBDIR)/librpc01.a
+
+$(LIBDIR):
+ mkdir -p "$@"
+
+$(LIB): $(LIBDIR)
+ $(MAKE) -C $^ -f "$(abs_srcdir)/$^/Makefile" all
+
+trunk-clean:: | lib-clean
+
+lib-clean:: $(LIBDIR)
+ $(MAKE) -C $^ -f "$(abs_srcdir)/$^/Makefile" clean
+
MAKE_TARGETS := rpc1 rpc_server
-$(MAKE_TARGETS): $(INTERNAL_LIB)
+MAKE_DEPS := $(LIB)
include $(top_srcdir)/include/mk/generic_trunk_target.mk
-include $(top_srcdir)/include/mk/lib.mk
diff --git a/testcases/network/rpc/basic_tests/rpc01/lib/Makefile b/testcases/network/rpc/basic_tests/rpc01/lib/Makefile
new file mode 100644
index 0000000..387b5dc
--- /dev/null
+++ b/testcases/network/rpc/basic_tests/rpc01/lib/Makefile
@@ -0,0 +1,25 @@
+#
+# Copyright (c) 2014 Linux Test Project.
+#
+# 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.
+#
+
+top_srcdir ?= ../../../../../..
+
+include $(top_srcdir)/include/mk/env_pre.mk
+
+INTERNAL_LIB := librpc01.a
+
+include $(top_srcdir)/include/mk/lib.mk
diff --git a/testcases/network/rpc/basic_tests/rpc01/lib/librpc01.c b/testcases/network/rpc/basic_tests/rpc01/lib/librpc01.c
new file mode 100644
index 0000000..d2810d8
--- /dev/null
+++ b/testcases/network/rpc/basic_tests/rpc01/lib/librpc01.c
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2013 Linux Test Project.
+ *
+ * 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 would 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 the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <rpc/xdr.h>
+#include "librpc01.h"
+
+bool_t xdr_receive_data(XDR *xdrs, struct data **buffer)
+{
+ struct data *bp;
+ int i, rc;
+ char *p;
+
+ bp = *buffer = (struct data *)malloc(sizeof(struct data));
+ rc = xdr_long(xdrs, &(bp->address));
+ rc = rc && xdr_long(xdrs, &bp->request_id);
+ rc = rc && xdr_long(xdrs, &bp->data_length);
+ p = (*buffer)->data = malloc(bp->data_length);
+ for (i = 0; rc && i < bp->data_length; p++, i++)
+ rc = xdr_char(xdrs, p);
+ return rc;
+}
+
+bool_t xdr_send_data(XDR *xdrs, struct data *buffer)
+{
+ int i, rc;
+ char *p;
+
+ rc = xdr_long(xdrs, &buffer->address);
+ rc = rc && xdr_long(xdrs, &buffer->request_id);
+ rc = rc && xdr_long(xdrs, &buffer->data_length);
+ for (i = 0, p = buffer->data; rc && i < buffer->data_length; i++, p++)
+ rc = xdr_char(xdrs, p);
+ return rc;
+}
diff --git a/testcases/network/rpc/basic_tests/rpc01/lib/librpc01.h b/testcases/network/rpc/basic_tests/rpc01/lib/librpc01.h
new file mode 100644
index 0000000..0fa7969
--- /dev/null
+++ b/testcases/network/rpc/basic_tests/rpc01/lib/librpc01.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2013 Linux Test Project.
+ *
+ * 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 would 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 the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __LIBRPC_H__
+#define __LIBRPC_H__
+
+#include <rpc/xdr.h>
+
+struct data {
+ long address;
+ long request_id;
+ long data_length;
+ char *data;
+};
+
+bool_t xdr_receive_data(XDR *xdrs, struct data **buffer);
+bool_t xdr_send_data(XDR *xdrs, struct data *buffer);
+
+#endif /* __LIBRPC_H__ */
diff --git a/testcases/network/rpc/basic_tests/rpc01/librpc01.c b/testcases/network/rpc/basic_tests/rpc01/librpc01.c
deleted file mode 100644
index d2810d8..0000000
--- a/testcases/network/rpc/basic_tests/rpc01/librpc01.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2013 Linux Test Project.
- *
- * 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 would 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 the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <rpc/xdr.h>
-#include "librpc01.h"
-
-bool_t xdr_receive_data(XDR *xdrs, struct data **buffer)
-{
- struct data *bp;
- int i, rc;
- char *p;
-
- bp = *buffer = (struct data *)malloc(sizeof(struct data));
- rc = xdr_long(xdrs, &(bp->address));
- rc = rc && xdr_long(xdrs, &bp->request_id);
- rc = rc && xdr_long(xdrs, &bp->data_length);
- p = (*buffer)->data = malloc(bp->data_length);
- for (i = 0; rc && i < bp->data_length; p++, i++)
- rc = xdr_char(xdrs, p);
- return rc;
-}
-
-bool_t xdr_send_data(XDR *xdrs, struct data *buffer)
-{
- int i, rc;
- char *p;
-
- rc = xdr_long(xdrs, &buffer->address);
- rc = rc && xdr_long(xdrs, &buffer->request_id);
- rc = rc && xdr_long(xdrs, &buffer->data_length);
- for (i = 0, p = buffer->data; rc && i < buffer->data_length; i++, p++)
- rc = xdr_char(xdrs, p);
- return rc;
-}
diff --git a/testcases/network/rpc/basic_tests/rpc01/librpc01.h b/testcases/network/rpc/basic_tests/rpc01/librpc01.h
deleted file mode 100644
index 0fa7969..0000000
--- a/testcases/network/rpc/basic_tests/rpc01/librpc01.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2013 Linux Test Project.
- *
- * 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 would 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 the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __LIBRPC_H__
-#define __LIBRPC_H__
-
-#include <rpc/xdr.h>
-
-struct data {
- long address;
- long request_id;
- long data_length;
- char *data;
-};
-
-bool_t xdr_receive_data(XDR *xdrs, struct data **buffer);
-bool_t xdr_send_data(XDR *xdrs, struct data *buffer);
-
-#endif /* __LIBRPC_H__ */
--
1.7.1
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [LTP] [PATCH 2/3] rpc01: moved common functions to a lib
[not found] ` <5343A0AC.6010803@oracle.com>
2014-04-08 7:12 ` [LTP] [PATCH] rpc01: moved the library into a separate directory Stanislav Kholmanskikh
@ 2014-04-08 9:56 ` chrubis
1 sibling, 0 replies; 11+ messages in thread
From: chrubis @ 2014-04-08 9:56 UTC (permalink / raw)
To: Stanislav Kholmanskikh; +Cc: vasily.isaenko, ltp-list
Hi!
> But why to /usr/lib{,64}?
That depends on parameters passed to configure, in this case that was
rpmbuild %configure macro and rpm build system that reported unpackaged
files.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [LTP] [PATCH] rpc01: moved the library into a separate directory
2014-04-08 7:12 ` [LTP] [PATCH] rpc01: moved the library into a separate directory Stanislav Kholmanskikh
@ 2014-04-08 11:41 ` chrubis
0 siblings, 0 replies; 11+ messages in thread
From: chrubis @ 2014-04-08 11:41 UTC (permalink / raw)
To: Stanislav Kholmanskikh; +Cc: vasily.isaenko, ltp-list
Hi!
> Cyril Hrubis noticed that including both
> * lib.mk and
> * generic_trunk_target.mk
> in one Makefile results in a situation when MAKE_TARGETS are installed twice,
> into /testcases/bin and /lib.
I've also removed the:
CPPFLAGS += -Wno-error
That does not seem to be needed anymore and pushed, thanks.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2014-04-08 11:42 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-23 15:25 [LTP] [PATCH 1/3] runtest/stress.part3: fix cmd for the rpc01 test case Stanislav Kholmanskikh
2013-12-23 15:25 ` [LTP] [PATCH 2/3] rpc01: moved common functions to a lib Stanislav Kholmanskikh
2013-12-23 15:25 ` [LTP] [PATCH 3/3] rpc01: fix compile-time warnings Stanislav Kholmanskikh
2014-02-05 12:08 ` chrubis
2014-04-07 18:12 ` [LTP] [PATCH 2/3] rpc01: moved common functions to a lib chrubis
[not found] ` <5343A0AC.6010803@oracle.com>
2014-04-08 7:12 ` [LTP] [PATCH] rpc01: moved the library into a separate directory Stanislav Kholmanskikh
2014-04-08 11:41 ` chrubis
2014-04-08 9:56 ` [LTP] [PATCH 2/3] rpc01: moved common functions to a lib chrubis
2014-02-05 10:45 ` [LTP] [PATCH 1/3] runtest/stress.part3: fix cmd for the rpc01 test case Stanislav Kholmanskikh
2014-02-05 12:10 ` chrubis
2014-02-05 12:11 ` chrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox