public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] realtime: fix broken build configuration files and warnings
@ 2009-10-23 12:16 gowrishankar
  2009-10-23 15:44 ` Garrett Cooper
  0 siblings, 1 reply; 6+ messages in thread
From: gowrishankar @ 2009-10-23 12:16 UTC (permalink / raw)
  To: subrata; +Cc: ltp-list

[-- Attachment #1: Type: text/plain, Size: 515 bytes --]

Hi Subrata,
Please accept the patch below.

Thanks,
Gowri
--
[PATCH] realtime: fix broken build configuration files and warnings

Patch below fixes the recent changes applied over realtime tests
build structure. These changes left the realtime tests in broken
state with missing includes and libraries. Now tests can be built
just like other tests in LTP.

Signed-off-by: Gowrishankar <gowrishankar.m@in.ibm.com>
Tested-by: Gowrishankar <gowrishankar.m@in.ibm.com>
Acked-by: Sripathi Kodi <sripathik@in.ibm.com>
--

[-- Attachment #2: build.patch --]
[-- Type: text/x-patch, Size: 4899 bytes --]

Index: ltp.tmp/testcases/realtime/Makefile
===================================================================
--- ltp.tmp.orig/testcases/realtime/Makefile	2009-10-22 20:43:55.000000000 +0530
+++ ltp.tmp/testcases/realtime/Makefile	2009-10-22 23:11:31.000000000 +0530
@@ -24,4 +24,22 @@
 
 include $(top_srcdir)/include/mk/env_pre.mk
 include $(abs_srcdir)/config.mk
+
+LIBDIR			:= lib
+FILTER_OUT_DIRS 	:= $(LIBDIR)
+LIB			:= $(LIBDIR)/librealtime.a
+
+$(LIBDIR):
+	mkdir -p "$@"
+
+$(LIB): $(LIBDIR)
+	$(MAKE) -C $^ -f "$(abs_srcdir)/$(LIBDIR)/Makefile" all
+
+trunk-all: $(LIB)
+
+trunk-clean:: | lib-clean
+
+lib-clean:: $(LIBDIR)
+	$(MAKE) -C $^ -f "$(abs_srcdir)/$(LIBDIR)/Makefile" clean
+
 include $(top_srcdir)/include/mk/generic_trunk_target.mk
Index: ltp.tmp/testcases/realtime/lib/Makefile
===================================================================
--- ltp.tmp.orig/testcases/realtime/lib/Makefile	2009-10-22 20:45:49.000000000 +0530
+++ ltp.tmp/testcases/realtime/lib/Makefile	2009-10-22 20:51:10.000000000 +0530
@@ -23,7 +23,8 @@
 top_srcdir		?= ../../..
 
 include $(top_srcdir)/include/mk/env_pre.mk
+include ../config.mk
 
 LIB			:= librealtime.a
 
-include $(top_srcdir)/include/mk/generic_leaf_target.mk
+include $(top_srcdir)/include/mk/lib.mk
Index: ltp.tmp/testcases/realtime/config.mk
===================================================================
--- ltp.tmp.orig/testcases/realtime/config.mk	2009-10-22 21:40:42.000000000 +0530
+++ ltp.tmp/testcases/realtime/config.mk	2009-10-22 22:57:20.000000000 +0530
@@ -20,9 +20,25 @@
 # Garrett Cooper, September 2009
 #
 
+# Check kernel/glibc support for PI and Robust mutexes and cache
+# the result.
 
-# Default stuff common to all testcases
+realtimedir = $(abs_top_srcdir)/testcases/realtime
+
+ifeq ($(shell [ -e $(realtimedir)/.config ] && echo yes), yes)
+	HAVE_PI_MUTEX := $(shell grep HAVE_PI_MUTEX $(realtimedir)/.config | \
+				 awk '{print $$2}')
+	HAVE_ROBUST_MUTEX := $(shell grep HAVE_ROBUST_MUTEX $(realtimedir)/.config | \
+				     awk '{print $$2}')
+else
+	HAVE_PI_MUTEX := $(shell sh $(realtimedir)/scripts/check_pi.sh)
+	HAVE_ROBUST_MUTEX:= $(shell sh $(realtimedir)/scripts/check_robust.sh)
+	dummy := $(shell echo "HAVE_PI_MUTEX $(HAVE_PI_MUTEX)" > $(realtimedir)/.config; \
+		 echo "HAVE_ROBUST_MUTEX $(HAVE_ROBUST_MUTEX)" >> $(realtimedir)/.config)
+endif
 
-CPPFLAGS += -I$(abs_top_srcdir)/testcases/realtime/include -D_GNU_SOURCE
+# Default stuff common to all testcases
+CPPFLAGS += -I$(realtimedir)/include -D_GNU_SOURCE
 CFLAGS   += -Wall
-LDLIBS   += -lrealtime -lpthread -lrt -lm
+LDLIBS   += -L$(realtimedir)/lib -lrealtime -lpthread -lrt -lm
+
Index: ltp.tmp/testcases/realtime/func/pi-tests/Makefile
===================================================================
--- ltp.tmp.orig/testcases/realtime/func/pi-tests/Makefile	2009-10-22 21:19:51.000000000 +0530
+++ ltp.tmp/testcases/realtime/func/pi-tests/Makefile	2009-10-22 21:43:33.000000000 +0530
@@ -24,4 +24,19 @@
 
 include $(top_srcdir)/include/mk/env_pre.mk
 include $(abs_srcdir)/../../config.mk
+
+TARGETS = testpi-0
+
+ifeq ($(HAVE_PI_MUTEX), yes)
+	TARGETS += testpi-1 testpi-2 testpi-4 testpi-5 testpi-7
+endif
+
+ifeq ($(HAVE_ROBUST_MUTEX), yes)
+	TARGETS += testpi-6 sbrk_mutex
+endif
+
+MAKE_TARGETS = $(TARGETS)
+CLEAN_TARGETS = $(TARGETS)
+
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
+
Index: ltp.tmp/testcases/realtime/perf/Makefile
===================================================================
--- ltp.tmp.orig/testcases/realtime/perf/Makefile	2009-10-22 22:03:44.000000000 +0530
+++ ltp.tmp/testcases/realtime/perf/Makefile	2009-10-22 22:03:50.000000000 +0530
@@ -20,7 +20,7 @@
 # Garrett Cooper, September 2009
 #
 
-top_srcdir		?= ../../../..
+top_srcdir		?= ../../..
 
 include $(top_srcdir)/include/mk/env_pre.mk
 include $(abs_srcdir)/../config.mk
Index: ltp.tmp/testcases/realtime/stress/Makefile
===================================================================
--- ltp.tmp.orig/testcases/realtime/stress/Makefile	2009-10-22 22:04:15.000000000 +0530
+++ ltp.tmp/testcases/realtime/stress/Makefile	2009-10-22 22:04:28.000000000 +0530
@@ -20,7 +20,7 @@
 # Garrett Cooper, September 2009
 #
 
-top_srcdir		?= ../../../..
+top_srcdir		?= ../../..
 
 include $(top_srcdir)/include/mk/env_pre.mk
 include $(abs_srcdir)/../config.mk
Index: ltp.tmp/testcases/realtime/lib/libstats.c
===================================================================
--- ltp.tmp.orig/testcases/realtime/lib/libstats.c	2009-10-22 22:40:24.000000000 +0530
+++ ltp.tmp/testcases/realtime/lib/libstats.c	2009-10-23 11:31:49.000000000 +0530
@@ -75,7 +75,7 @@
 {
 	int myindex = ++data->index;
 	if (myindex >= data->size) {
-		debug(DBG_ERR, "Number of elements cannot be more than %d\n",
+		debug(DBG_ERR, "Number of elements cannot be more than %ld\n",
 				data->size);
 		data->index--;
 		return -1;

[-- Attachment #3: Type: text/plain, Size: 399 bytes --]

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference

[-- Attachment #4: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

end of thread, other threads:[~2009-10-26 20:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-23 12:16 [LTP] [PATCH] realtime: fix broken build configuration files and warnings gowrishankar
2009-10-23 15:44 ` Garrett Cooper
2009-10-23 21:50   ` Garrett Cooper
2009-10-25 10:42     ` Garrett Cooper
2009-10-26 12:20       ` gowrishankar
2009-10-26 20:22         ` Garrett Cooper

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