realtime: fix broken build configuration files and warnings
PATCH 1/1 realtime: fix broken build configuration files and warnings
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.
--
testcases/realtime/Makefile +18 -0
@@ -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
testcases/realtime/lib/Makefile +2 -1
@@ -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
testcases/realtime/config.mk +19 -3
@@ -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 +
testcases/realtime/func/pi-tests/Makefile +15 -0
@@ -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 +
testcases/realtime/perf/Makefile +1 -1
@@ -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
testcases/realtime/stress/Makefile +1 -1
@@ -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
testcases/realtime/lib/libstats.c +1 -1
@@ -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 ;
------------------------------------------------------------------------------
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
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 5 lines · gowrishankar
Hi Subrata,
Please accept the patch below.Thanks,
Gowri
I'll get back to you on this in a day Gowri... there are some
things I wanted to note.
Thanks,
-Garrett
------------------------------------------------------------------------------
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
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 10 lines · Garrett Cooper
Quoted 5 lines · gowrishankar
Hi Subrata,
Please accept the patch below.Thanks,
GowriI'll get back to you on this in a day Gowri... there are some things I wanted to note.
Hi Gowri,
I've reviewed the changes and checked in the ones that were OK,
and definitely needed to be fixed. There are a few items that I'm unsure about with your proposed changes in the Makefiles that need to be discussed:
1. I'm trying to make sure that out-of-build-tree functionality isn't broken. In order to do that, as you see I had to use abs_builddir and abs_srcdir, instead of just realtimedir.
2. config.mk shouldn't be included by lib/Makefile -- otherwise I have to add LDLIBS += -lrealtime to all Makefiles that require that library. So by virtue of laziness and keeping things common, it's best just to add the required variables and includes in lib/Makefile. This patch has been attached as realtime-makefile-fixes.diff. Now, for the other part that I don't agree with 100%, but I agree
needs fixing:
Index: func/pi-tests/Makefile
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/realtime/func/pi-tests/Makefile,v retrieving revision 1.2
pi-tests/Makefile 23 Oct 2009 21:36:02 -0000 renamed from pi-tests/Makefile 9 Oct 2009 17:56:07 -0000 1.2 +11 -0
@@ -24,4 +24,15 @@ include $(top_srcdir)/include/mk/env_pre.mk include $(abs_srcdir)/../../config.mk + +MAKE_TARGETS := testpi-0 + +ifeq ($(HAVE_PI_MUTEX), yes) +MAKE_TARGETS += testpi-1 testpi-2 testpi-4 testpi-5 testpi-7 +endif + +ifeq ($(HAVE_ROBUST_MUTEX), yes) +MAKE_TARGETS += testpi-6 sbrk_mutex +endif +
I agree that these should be toggable or built appropriate to
whether or not the system has this kind of functionality. The method used to determine whether or not a system has this functionality is questionable though, and I believe all of this can be established through additional autoconf tests added to the $(abs_top_srcdir)/m4 -- do you agree with this?
Is the realtime test suite this made available as a separate
package outside of LTP in-house at IBM, or is it strictly available with LTP?
Once these build integration issues are resolved, should it be
enabled by default, or still remain an optional package to build and execute?
Should this component have a runtest file as well so it can be
integrated into the execution portion of LTP?
Finally, I also discovered some QA issues with rt-migrate.c (diff
attached as well); I patterned the code to match the other tests. Do you agree with the fixes?
Thanks!
-Garrett
Index: config.mk
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/realtime/config.mk,v retrieving revision 1.8
config.mk +9 -3
@@ -22,7 +22,13 @@ # Default stuff common to all testcases +# +# THIS IS NOT TO BE INCLUDED WITH lib!!! -CPPFLAGS += -I$(abs_top_srcdir)/testcases/realtime/include -D_GNU_SOURCE -CFLAGS += -Wall -LDLIBS += -lrealtime -lpthread -lrt -lm +realtime_builddir := $(abs_top_builddir)/testcases/realtime +realtime_srcdir := $(abs_top_srcdir)/testcases/realtime + +CPPFLAGS += -I$(realtime_srcdir)/include +CFLAGS += -D_GNU_SOURCE +LDLIBS += -lrealtime -lpthread -lrt -lm +LDFLAGS += -L$(realtime_builddir)/lib
Index: lib/Makefile
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/realtime/lib/Makefile,v retrieving revision 1.4
Makefile +7 -1
@@ -24,6 +24,12 @@ include $(top_srcdir)/include/mk/env_pre.mk +CPPFLAGS += -I$(abs_srcdir)/../include + +CFLAGS += -D_GNU_SOURCE + +LDLIBS += -lrealtime -lpthread -lrt -lm + LIB := librealtime.a -include $(top_srcdir)/include/mk/generic_leaf_target.mk +include $(top_srcdir)/include/mk/lib.mk
Index: func/rt-migrate/rt-migrate.c
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/realtime/func/rt-migrate/rt-migrate.c,v retrieving revision 1.1
rt-migrate/rt-migrate.c +40 -18
87 lines not on this page · raw message
------------------------------------------------------------------------------
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
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 60 lines · Garrett Cooper
Quoted 10 lines · Garrett Cooper
Quoted 5 lines · gowrishankar
Hi Subrata,
Please accept the patch below.Thanks,
GowriI'll get back to you on this in a day Gowri... there are some things I wanted to note.
Hi Gowri,
I've reviewed the changes and checked in the ones that were OK, and definitely needed to be fixed. There are a few items that I'm unsure about with your proposed changes in the Makefiles that need to be discussed:
1. I'm trying to make sure that out-of-build-tree functionality isn't broken. In order to do that, as you see I had to useabs_builddirandabs_srcdir, instead of just realtimedir.
2. config.mk shouldn't be included by lib/Makefile -- otherwise I have to add LDLIBS += -lrealtime to all Makefiles that require that library. So by virtue of laziness and keeping things common, it's best just to add the required variables and includes in lib/Makefile. This patch has been attached as realtime-makefile-fixes.diff. Now, for the other part that I don't agree with 100%, but I agree needs fixing:Index: func/pi-tests/Makefile
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/realtime/func/pi-tests/Makefile,v retrieving revision 1.2
diff -u -r1.2Makefilepi-tests/Makefile 23 Oct 2009 21:36:02 -0000 renamed from pi-tests/Makefile 9 Oct 2009 17:56:07 -0000 1.2 +0
-0@@ -24,4 +24,15 @@include $(top_srcdir)/include/mk/env_pre.mk
include $(abs_srcdir)/../../config.mkpi-tests/Makefile 23 Oct 2009 21:36:02 -0000 renamed from pi-tests/Makefile 9 Oct 2009 17:56:07 -0000 1.2 +11
-0+ +MAKE_TARGETS := testpi-0 + +ifeq ($(HAVE_PI_MUTEX), yes) +MAKE_TARGETS += testpi-1 testpi-2 testpi-4 testpi-5 testpi-7 +endif + +ifeq ($(HAVE_ROBUST_MUTEX), yes) +MAKE_TARGETS += testpi-6 sbrk_mutex +endif +I agree that these should be toggable or built appropriate to whether or not the system has this kind of functionality. The method used to determine whether or not a system has this functionality is questionable though, and I believe all of this can be established through additional autoconf tests added to the $(abs_top_srcdir)/m4 -- do you agree with this?
Is the realtime test suite this made available as a separate package outside of LTP in-house at IBM, or is it strictly available with LTP?
Quoted 8 lines
Once these build integration issues are resolved, should it be enabled by default, or still remain an optional package to build and execute?
Should this component have a runtest file as well so it can be integrated into the execution portion of LTP?
Finally, I also discovered some QA issues withrt-migrate.c(diff attached as well); I patterned the code to match the other tests. Do you agree with the fixes?
Gowri,
I read more about the project and determined what the scope was,
so I created and integrated testcases/realtime into the rest of the autoconf infrastructure, but as a subcomponent in LTP.
So if you check out LTP from HEAD as of a few moments ago, you'll
discover that all of the issues you reported have been fixed (AFAIK) and all of the unnecessary autoconf-like scripts and additional autoconf-related files and directories have been cleaned out.
The directions for compiling realtime by itself are the same as
the rest of LTP:
make autotools
./configure
make all
make install
This is only required when doing this as a subcomponent, as this
is already handled with the same commands above issued from the top-level LTP source directory.
HTH,
-Garrett
------------------------------------------------------------------------------
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
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 70 lines · Garrett Cooper
Quoted 58 lines · Garrett Cooper
Quoted 9 lines · Garrett Cooper
Quoted 5 lines · gowrishankar
Hi Subrata,
Please accept the patch below.Thanks,
GowriI'll get back to you on this in a day Gowri... there are some
things I wanted to note.Hi Gowri,
I've reviewed the changes and checked in the ones that were OK,
and definitely needed to be fixed. There are a few items that I'm unsure about with your proposed changes in the Makefiles that need to be discussed:
1. I'm trying to make sure that out-of-build-tree functionality isn't broken. In order to do that, as you see I had to useabs_builddirandabs_srcdir, instead of just realtimedir.
2. config.mk shouldn't be included by lib/Makefile -- otherwise I have to add LDLIBS += -lrealtime to all Makefiles that require that library. So by virtue of laziness and keeping things common, it's best just to add the required variables and includes in lib/Makefile. This patch has been attached as realtime-makefile-fixes.diff. Now, for the other part that I don't agree with 100%, but I agree
needs fixing:Index: func/pi-tests/Makefile
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/realtime/func/pi-tests/Makefile,v retrieving revision 1.2
diff -u -r1.2Makefilepi-tests/Makefile 23 Oct 2009 21:36:02 -0000 renamed from pi-tests/Makefile 9 Oct 2009 17:56:07 -0000 1.2 +11
-0@@ -24,4 +24,15 @@ include $(top_srcdir)/include/mk/env_pre.mk include $(abs_srcdir)/../../config.mk + +MAKE_TARGETS := testpi-0 + +ifeq ($(HAVE_PI_MUTEX), yes) +MAKE_TARGETS += testpi-1 testpi-2 testpi-4 testpi-5 testpi-7 +endif + +ifeq ($(HAVE_ROBUST_MUTEX), yes) +MAKE_TARGETS += testpi-6 sbrk_mutex +endif +I agree that these should be toggable or built appropriate to
whether or not the system has this kind of functionality. The method used to determine whether or not a system has this functionality is questionable though, and I believe all of this can be established through additional autoconf tests added to the $(abs_top_srcdir)/m4 -- do you agree with this?
Is the realtime test suite this made available as a separate
package outside of LTP in-house at IBM, or is it strictly available with LTP?Quoted 8 lines
Once these build integration issues are resolved, should it be
enabled by default, or still remain an optional package to build and execute?
Should this component have a runtest file as well so it can be
integrated into the execution portion of LTP?
Finally, I also discovered some QA issues withrt-migrate.c(diff
attached as well); I patterned the code to match the other tests. Do you agree with the fixes?Gowri,
I read more about the project and determined what the scope was,
Quoted 9 lines
so I created and integrated testcases/realtime into the rest of the autoconf infrastructure, but as a subcomponent in LTP.
So if you check out LTP from HEAD as of a few moments ago, you'll
discover that all of the issues you reported have been fixed (AFAIK) and all of the unnecessary autoconf-like scripts and additional autoconf-related files and directories have been cleaned out.
The directions for compiling realtime by itself are the same as
the rest of LTP:
Garrett,
First of all, thanks a lot for assisting me in getting RT tests neatly built. Seems like, you are missing macro files:
aclocal: couldn't open directory `/test/ltp/testcases/realtime/m4': No such file or directory
Can you please checkin those as well.
Thanks,
Gowri
Quoted 11 lines
make autotools
./configure
make all
make installThis is only required when doing this as a subcomponent, as this
is already handled with the same commands above issued from the top-level LTP source directory.
HTH,
-Garrett
------------------------------------------------------------------------------
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
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 88 lines · gowrishankar
Quoted 78 lines · Garrett Cooper
Quoted 64 lines · Garrett Cooper
Quoted 4 lines · Garrett Cooper
Quoted 1 line · gowrishankar
Quoted 8 lines
Quoted 5 lines
Hi Subrata,
Please accept the patch below.Thanks,
GowriI'll get back to you on this in a day Gowri... there are some things I wanted to note.
Hi Gowri,
I've reviewed the changes and checked in the ones that were OK, and definitely needed to be fixed. There are a few items that I'm unsure about with your proposed changes in the Makefiles that need to be discussed:
1. I'm trying to make sure that out-of-build-tree functionality isn't broken. In order to do that, as you see I had to useabs_builddirandabs_srcdir, instead of just realtimedir.
2. config.mk shouldn't be included by lib/Makefile -- otherwise I have to add LDLIBS += -lrealtime to all Makefiles that require that library. So by virtue of laziness and keeping things common, it's best just to add the required variables and includes in lib/Makefile. This patch has been attached as realtime-makefile-fixes.diff. Now, for the other part that I don't agree with 100%, but I agree needs fixing:Index: func/pi-tests/Makefile
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/realtime/func/pi-tests/Makefile,v retrieving revision 1.2
diff -u -r1.2Makefilepi-tests/Makefile 23 Oct 2009 21:36:02 -0000 renamed from pi-tests/Makefile 9 Oct 2009 17:56:07 -0000 1.2 +0
-0@@ -24,4 +24,15 @@include $(top_srcdir)/include/mk/env_pre.mk
include $(abs_srcdir)/../../config.mkpi-tests/Makefile 23 Oct 2009 21:36:02 -0000 renamed from pi-tests/Makefile 9 Oct 2009 17:56:07 -0000 1.2 +11
-0+ +MAKE_TARGETS := testpi-0 + +ifeq ($(HAVE_PI_MUTEX), yes) +MAKE_TARGETS += testpi-1 testpi-2 testpi-4 testpi-5 testpi-7 +endif + +ifeq ($(HAVE_ROBUST_MUTEX), yes) +MAKE_TARGETS += testpi-6 sbrk_mutex +endif +I agree that these should be toggable or built appropriate to whether or not the system has this kind of functionality. The method used to determine whether or not a system has this functionality is questionable though, and I believe all of this can be established through additional autoconf tests added to the $(abs_top_srcdir)/m4 -- do you agree with this?
Is the realtime test suite this made available as a separate package outside of LTP in-house at IBM, or is it strictly available with LTP?Quoted 8 lines
Once these build integration issues are resolved, should it be enabled by default, or still remain an optional package to build and execute?
Should this component have a runtest file as well so it can be integrated into the execution portion of LTP?
Finally, I also discovered some QA issues withrt-migrate.c(diff attached as well); I patterned the code to match the other tests. Do you agree with the fixes?Gowri,
I read more about the project and determined what the scope was,Quoted 9 lines
so I created and integrated testcases/realtime into the rest of the autoconf infrastructure, but as a subcomponent in LTP.
So if you check out LTP from HEAD as of a few moments ago, you'll discover that all of the issues you reported have been fixed (AFAIK) and all of the unnecessary autoconf-like scripts and additional autoconf-related files and directories have been cleaned out. The directions for compiling realtime by itself are the same as the rest of LTP:
Quoted 8 lines
Garrett,
First of all, thanks a lot for assisting me in getting RT tests neatly built. Seems like, you are missing macro files:aclocal: couldn't open directory `/test/ltp/testcases/realtime/m4': No such file or directory
Can you please checkin those as well.
Hi Gowri,
The macros and the files are there already -- configure just
hasn't been run yet, because config.mk doesn't exist. I'll try tweaking some stuff a bit and will get back in ~30 mins. Thanks,
-Garrett
Quoted 5 lines
Quoted 5 lines
make autotools
./configure
make all
make install
Quoted 8 lines
Quoted 6 lines
This is only required when doing this as a subcomponent, as this is already handled with the same commands above issued from the top-level LTP source directory.
HTH,
-Garrett
------------------------------------------------------------------------------
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
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list