Skip to contentSkip to conversation

syscalls/ipc/Makefile.inc: changed LIB to LIBIPC

PATCH In review Stanislav Kholmanskikh 2 participants 3 messages Nov 8, 2013 – Nov 13, 2013 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH v2 1/2 syscalls/ipc/Makefile.inc: changed LIB to LIBIPC

Both lib.mk and testcases/kernel/syscalls/ipc/Makefile.inc set LIB. It confuses make when both failes are included into a leaf Makefile.

Renamed LIB to LIBIPC in Makefile.inc.

The idea is by Cyril Hrubis <[email protected]>

---
 testcases/kernel/syscalls/ipc/Makefile.inc |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
testcases/kernel/syscalls/ipc/Makefile.inc +3 -3
index a468e93..c7890a9 100644
@@ -25,15 +25,15 @@
 LDLIBS			+= -lipc
 LIBDIR			:= ../lib
 
-LIB			:= $(LIBDIR)/libipc.a
+LIBIPC			:= $(LIBDIR)/libipc.a
 
 $(LIBDIR):
 	mkdir -p "$@"
 
-$(LIB): $(LIBDIR)
+$(LIBIPC): $(LIBDIR)
 	$(MAKE) -C $^ -f "$(abs_srcdir)/$^/Makefile" all
 
-MAKE_DEPS		:= $(LIB)
+MAKE_DEPS		:= $(LIBIPC)
 
 CPPFLAGS		+= -I$(abs_srcdir)/$(LIBDIR)
 
Signature · 13 lines
1.7.1


------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#2 lore raw

PATCH v2 2/2 msgctl{08, 09, 10, 11}: cleanup

In reply to a message not in the archive

* Moved common functions, definitions to libmsgctl.h, libmsgctl.c.
* Changed tst_* in the children with printf + exit (or return).
* Some cleanup.

---
 testcases/kernel/syscalls/ipc/msgctl/Makefile    |   15 +
 testcases/kernel/syscalls/ipc/msgctl/libmsgctl.c |  148 +++++++++
 testcases/kernel/syscalls/ipc/msgctl/libmsgctl.h |   39 +++
 testcases/kernel/syscalls/ipc/msgctl/msgctl08.c  |  281 +++++-------------
 testcases/kernel/syscalls/ipc/msgctl/msgctl09.c  |  348 ++++++----------------
 testcases/kernel/syscalls/ipc/msgctl/msgctl10.c  |  282 +++++-------------
 testcases/kernel/syscalls/ipc/msgctl/msgctl11.c  |  339 +++++----------------
 7 files changed, 518 insertions(+), 934 deletions(-)
 create mode 100644 testcases/kernel/syscalls/ipc/msgctl/libmsgctl.c
 create mode 100644 testcases/kernel/syscalls/ipc/msgctl/libmsgctl.h
testcases/kernel/syscalls/ipc/msgctl/Makefile +15 -0
index f467389..aedfda6 100644
@@ -19,5 +19,20 @@
 top_srcdir              ?= ../../../../..
 
 include $(top_srcdir)/include/mk/testcases.mk
+
+LIBSRCS := libmsgctl.c
+INTERNAL_LIB := libmsgctl.a
+
+LDFLAGS += -L$(abs_builddir)
+LDLIBS += -lmsgctl
+
+MAKE_TARGETS := $(patsubst %.c,%,$(wildcard msgctl??.c))
+MAKE_TARGET_OBJS := $(addsuffix .o,$(MAKE_TARGETS))
+
+$(MAKE_TARGET_OBJS): $(INTERNAL_LIB)
+
+.INTERMEDIATE: $(MAKE_TARGET_OBJS)
+
 include $(abs_srcdir)/../Makefile.inc
+include $(top_srcdir)/include/mk/lib.mk
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
testcases/kernel/syscalls/ipc/msgctl/libmsgctl.c new file +148 -0

148 lines not on this page · raw message

testcases/kernel/syscalls/ipc/msgctl/libmsgctl.h new file +39 -0
new file mode 100644
index 0000000..e1afeab
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) International Business Machines  Corp., 2002
+ * Copyright (c) 2013 Oracle and/or its affiliates. All Rights Reserved.
+ *
+ * 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 __LIBMSGCTL_H__
+#define __LIBMSGCTL_H__
+
+#define FAIL	1
+#define PASS	0
+
+struct mbuffer {
+	long type;
+	struct {
+		char len;
+		char pbytes[99];
+	} data;
+};
+
+int doreader(long key, int tid, long type, int child, int nreps);
+int dowriter(long key, int tid, long type, int child, int nreps);
+int fill_buffer(char *buf, char val, int size);
+int verify(char *buf, char val, int size, int child);
+
+#endif /*__LIBMSGCTL_H__ */
testcases/kernel/syscalls/ipc/msgctl/msgctl08.c +73 -208

393 lines not on this page · raw message

testcases/kernel/syscalls/ipc/msgctl/msgctl09.c +87 -261

519 lines not on this page · raw message

testcases/kernel/syscalls/ipc/msgctl/msgctl10.c +73 -209

390 lines not on this page · raw message

testcases/kernel/syscalls/ipc/msgctl/msgctl11.c +83 -256

504 lines not on this page · raw message

Signature · 13 lines
1.7.1


------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#3 lore raw

Re: [LTP] [PATCH V2 2/2] msgctl{08, 09, 10, 11}: cleanup

Hi!

Quoted 3 lines

* Moved common functions, definitions to libmsgctl.h, libmsgctl.c.
* Changed tst_* in the children with printf + exit (or return).
* Some cleanup.

I've removed two more dumbious comments:

-static void sig_handler(int signo); /* signal catching function */
+static void sig_handler(int signo);

from msgctl08.c and msgctl10.c and pushed, thanks.

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list