From: gowrishankar <gomuthuk@linux.vnet.ibm.com>
To: subrata@linux.vnet.ibm.com
Cc: ltp-list@lists.sf.net
Subject: [LTP] [PATCH] realtime: fix broken build configuration files and warnings
Date: Fri, 23 Oct 2009 17:46:06 +0530 [thread overview]
Message-ID: <4AE19E86.8070100@linux.vnet.ibm.com> (raw)
[-- 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
next reply other threads:[~2009-10-23 13:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-23 12:16 gowrishankar [this message]
2009-10-23 15:44 ` [LTP] [PATCH] realtime: fix broken build configuration files and warnings 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
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=4AE19E86.8070100@linux.vnet.ibm.com \
--to=gomuthuk@linux.vnet.ibm.com \
--cc=ltp-list@lists.sf.net \
--cc=subrata@linux.vnet.ibm.com \
/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