rhmessaging commits: r1958 - in store/trunk/cpp: lib and 3 other directories.
by rhmessaging-commits@lists.jboss.org
Author: aconway
Date: 2008-04-22 17:10:46 -0400 (Tue, 22 Apr 2008)
New Revision: 1958
Added:
store/trunk/cpp/tests/.valgrind.supp
store/trunk/cpp/tests/.valgrindrc
store/trunk/cpp/tests/run_test
store/trunk/cpp/tests/start_broker
store/trunk/cpp/tests/stop_broker
store/trunk/cpp/tests/vg_check
Removed:
store/trunk/cpp/tests/.vg-supp
store/trunk/cpp/tests/setup
Modified:
store/trunk/cpp/configure.ac
store/trunk/cpp/lib/Makefile.am
store/trunk/cpp/tests/
store/…
[View More]trunk/cpp/tests/Makefile.am
store/trunk/cpp/tests/jrnl/
store/trunk/cpp/tests/jrnl/Makefile.am
store/trunk/cpp/tests/jrnl/jtt/
store/trunk/cpp/tests/jrnl/jtt/Makefile.am
store/trunk/cpp/tests/jrnl/jtt/args.cpp
store/trunk/cpp/tests/jrnl/jtt/args.hpp
store/trunk/cpp/tests/jrnl/jtt/test_mgr.cpp
store/trunk/cpp/tests/jrnl/run-journal-tests
store/trunk/cpp/tests/persistence.py
store/trunk/cpp/tests/system_test.sh
Log:
- Updated valgrind setup from qpid.
- Enabled valgrind for jrnl and jtt tests.
- Use temp directory for qpidd --data-dir in system_test.sh
- Use transient broker port in system_test.sh
Modified: store/trunk/cpp/configure.ac
===================================================================
--- store/trunk/cpp/configure.ac 2008-04-22 19:08:30 UTC (rev 1957)
+++ store/trunk/cpp/configure.ac 2008-04-22 21:10:46 UTC (rev 1958)
@@ -173,7 +173,7 @@
fi
# We use valgrind for the tests. See if it's available.
-AC_CHECK_PROG([VALGRIND], [valgrind], [yes])
+AC_CHECK_PROG([VALGRIND], [valgrind], [valgrind])
# Also doxygen for documentation...
AC_CHECK_PROG([do_doxygen], [doxygen], [yes])
Modified: store/trunk/cpp/lib/Makefile.am
===================================================================
--- store/trunk/cpp/lib/Makefile.am 2008-04-22 19:08:30 UTC (rev 1957)
+++ store/trunk/cpp/lib/Makefile.am 2008-04-22 21:10:46 UTC (rev 1958)
@@ -19,89 +19,88 @@
BdbMessageStore.cpp \
BindingDbt.cpp \
BufferValue.cpp \
- DataTokenImpl.cpp \
+ DataTokenImpl.cpp \
IdDbt.cpp \
IdPairDbt.cpp \
IdSequence.cpp \
JournalImpl.cpp \
PreparedTransaction.cpp \
StringDbt.cpp \
- BdbMessageStore.h \
- BindingDbt.h \
- BufferValue.h \
- Cursor.h \
- DataTokenImpl.h \
- IdDbt.h \
- IdPairDbt.h \
- IdSequence.h \
- JournalImpl.h \
- PreparedTransaction.h \
- StoreException.h \
- StringDbt.h \
- TxnCtxt.h \
- jrnl/arr_cnt.cpp \
- jrnl/cvar.cpp \
- jrnl/data_tok.cpp \
- jrnl/deq_rec.cpp \
- jrnl/enq_map.cpp \
- jrnl/enq_rec.cpp \
- jrnl/jcntl.cpp \
- jrnl/jdir.cpp \
- jrnl/jerrno.cpp \
- jrnl/jexception.cpp \
- jrnl/jinf.cpp \
- jrnl/jrec.cpp \
- jrnl/lfh.cpp \
- jrnl/nlfh.cpp \
- jrnl/pmgr.cpp \
- jrnl/rmgr.cpp \
- jrnl/slock.cpp \
- jrnl/rrfc.cpp \
- jrnl/time_ns.cpp \
- jrnl/txn_map.cpp \
- jrnl/txn_rec.cpp \
- jrnl/wmgr.cpp \
- jrnl/wrfc.cpp \
- jrnl/aio_cb.hpp \
- jrnl/arr_cnt.hpp \
- jrnl/cvar.hpp \
- jrnl/data_tok.hpp \
- jrnl/deq_hdr.hpp \
- jrnl/deq_rec.hpp \
- jrnl/enq_hdr.hpp \
- jrnl/enq_map.hpp \
- jrnl/enq_rec.hpp \
- jrnl/enums.hpp \
- jrnl/file_hdr.hpp \
- jrnl/jcfg.hpp \
- jrnl/jcntl.hpp \
- jrnl/jdir.hpp \
- jrnl/jerrno.hpp \
- jrnl/jexception.hpp \
- jrnl/jinf.hpp \
- jrnl/jrec.hpp \
- jrnl/lfh.hpp \
- jrnl/nlfh.hpp \
- jrnl/pmgr.hpp \
- jrnl/rcvdat.hpp \
- jrnl/rec_hdr.hpp \
- jrnl/rec_tail.hpp \
- jrnl/rmgr.hpp \
- jrnl/rrfc.hpp \
- jrnl/slock.hpp \
- jrnl/time_ns.hpp \
- jrnl/txn_hdr.hpp \
- jrnl/txn_map.hpp \
- jrnl/txn_rec.hpp \
- jrnl/wmgr.hpp \
- jrnl/wrfc.hpp \
- gen/qpid/management/PackageMrgstore.cpp \
- gen/qpid/management/PackageMrgstore.h \
- gen/qpid/management/Journal.cpp \
- gen/qpid/management/Journal.h \
- gen/qpid/management/Store.cpp \
- gen/qpid/management/Store.h \
- gen/qpid/management/ArgsJournalExpand.h \
+ BdbMessageStore.h \
+ BindingDbt.h \
+ BufferValue.h \
+ Cursor.h \
+ DataTokenImpl.h \
+ IdDbt.h \
+ IdPairDbt.h \
+ IdSequence.h \
+ JournalImpl.h \
+ PreparedTransaction.h \
+ StoreException.h \
+ StringDbt.h \
+ TxnCtxt.h \
+ jrnl/arr_cnt.cpp \
+ jrnl/cvar.cpp \
+ jrnl/data_tok.cpp \
+ jrnl/deq_rec.cpp \
+ jrnl/enq_map.cpp \
+ jrnl/enq_rec.cpp \
+ jrnl/jcntl.cpp \
+ jrnl/jdir.cpp \
+ jrnl/jerrno.cpp \
+ jrnl/jexception.cpp \
+ jrnl/jinf.cpp \
+ jrnl/jrec.cpp \
+ jrnl/lfh.cpp \
+ jrnl/nlfh.cpp \
+ jrnl/pmgr.cpp \
+ jrnl/rmgr.cpp \
+ jrnl/slock.cpp \
+ jrnl/rrfc.cpp \
+ jrnl/time_ns.cpp \
+ jrnl/txn_map.cpp \
+ jrnl/txn_rec.cpp \
+ jrnl/wmgr.cpp \
+ jrnl/wrfc.cpp \
+ jrnl/aio_cb.hpp \
+ jrnl/arr_cnt.hpp \
+ jrnl/cvar.hpp \
+ jrnl/data_tok.hpp \
+ jrnl/deq_hdr.hpp \
+ jrnl/deq_rec.hpp \
+ jrnl/enq_hdr.hpp \
+ jrnl/enq_map.hpp \
+ jrnl/enq_rec.hpp \
+ jrnl/enums.hpp \
+ jrnl/file_hdr.hpp \
+ jrnl/jcfg.hpp \
+ jrnl/jcntl.hpp \
+ jrnl/jdir.hpp \
+ jrnl/jerrno.hpp \
+ jrnl/jexception.hpp \
+ jrnl/jinf.hpp \
+ jrnl/jrec.hpp \
+ jrnl/lfh.hpp \
+ jrnl/nlfh.hpp \
+ jrnl/pmgr.hpp \
+ jrnl/rcvdat.hpp \
+ jrnl/rec_hdr.hpp \
+ jrnl/rec_tail.hpp \
+ jrnl/rmgr.hpp \
+ jrnl/rrfc.hpp \
+ jrnl/slock.hpp \
+ jrnl/txn_hdr.hpp \
+ jrnl/txn_map.hpp \
+ jrnl/txn_rec.hpp \
+ jrnl/wmgr.hpp \
+ jrnl/wrfc.hpp \
+ gen/qpid/management/PackageMrgstore.cpp \
+ gen/qpid/management/PackageMrgstore.h \
+ gen/qpid/management/Journal.cpp \
+ gen/qpid/management/Journal.h \
+ gen/qpid/management/Store.cpp \
+ gen/qpid/management/Store.h \
+ gen/qpid/management/ArgsJournalExpand.h \
gen/qpid/management/ArgsJournalReconfigure.h
Property changes on: store/trunk/cpp/tests
___________________________________________________________________
Name: svn:ignore
- .deps
.libs
Makefile
Makefile.in
gen.mk
qpid.log
OrderingTest
SimpleTest
TransactionalTest
TwoPhaseCommitTest
vg-log.bdb.1
vg-log.bdb.2
vg-log.bdb.3
vg-log.bdb.4
vg-log.bdb.5
vg-log.bdb.6
vg-log.bdb.7
vg-log.bdb.8
vg-log.jrnl.1
vg-log.jrnl.2
vg-log.jrnl.3
vg-log.jrnl.4
vg-log.jrnl.5
vg-log.jrnl.6
vg-log.jrnl.7
vg-log.jrnl.8
+ .deps
.libs
Makefile
Makefile.in
gen.mk
qpid.log
OrderingTest
SimpleTest
TransactionalTest
TwoPhaseCommitTest
vg-log.bdb.1
vg-log.bdb.2
vg-log.bdb.3
vg-log.bdb.4
vg-log.bdb.5
vg-log.bdb.6
vg-log.bdb.7
vg-log.bdb.8
vg-log.jrnl.1
vg-log.jrnl.2
vg-log.jrnl.3
vg-log.jrnl.4
vg-log.jrnl.5
vg-log.jrnl.6
vg-log.jrnl.7
vg-log.jrnl.8
qpidd.port
Added: store/trunk/cpp/tests/.valgrind.supp
===================================================================
--- store/trunk/cpp/tests/.valgrind.supp (rev 0)
+++ store/trunk/cpp/tests/.valgrind.supp 2008-04-22 21:10:46 UTC (rev 1958)
@@ -0,0 +1,32 @@
+{
+ Benign error in libcpg.
+ Memcheck:Param
+ socketcall.sendmsg(msg.msg_iov[i])
+ obj:*/libpthread-2.5.so
+ obj:*/libcpg.so.2.0.0
+}
+
+{
+ Uninitialised value problem in _dl_relocate (F7, F8)
+ Memcheck:Cond
+ fun:_dl_relocate_object
+ fun:*dl_*
+}
+
+{
+ False "possibly leaked" in boost program_options - global std::string var.
+ Memcheck:Leak
+ fun:_Znwj
+ fun:_ZNSs4_Rep9_S_createEjjRKSaIcE
+ obj:/usr/lib/libstdc++.so.6.0.8
+ fun:_ZNSsC1EPKcRKSaIcE
+ obj:/usr/lib/libboost_program_options.so.1.33.1
+}
+
+{
+ Bogus epoll_ctl error on i386
+ Memcheck:Param
+ epoll_ctl(event)
+ fun:epoll_ctl
+}
+
Added: store/trunk/cpp/tests/.valgrindrc
===================================================================
--- store/trunk/cpp/tests/.valgrindrc (rev 0)
+++ store/trunk/cpp/tests/.valgrindrc 2008-04-22 21:10:46 UTC (rev 1958)
@@ -0,0 +1,7 @@
+--gen-suppressions=all
+--leak-check=full
+--demangle=yes
+--suppressions=.valgrind.supp
+--num-callers=25
+--trace-children=yes
+
Deleted: store/trunk/cpp/tests/.vg-supp
===================================================================
--- store/trunk/cpp/tests/.vg-supp 2008-04-22 19:08:30 UTC (rev 1957)
+++ store/trunk/cpp/tests/.vg-supp 2008-04-22 21:10:46 UTC (rev 1958)
@@ -1,72 +0,0 @@
-{
- Benign error in libcpg.
-
- Memcheck:Param
- socketcall.sendmsg(msg.msg_iov[i])
- obj:*/libpthread-2.5.so
- obj:*/libcpg.so.2.0.0
-}
-
-{
- Uninitialised value problem in dlopen
- Memcheck:Cond
- fun:_dl_relocate_object
- fun:*dl_*
- obj:/lib64/ld-2.6.so
- obj:*
-}
-{
- False "possibly leaked" in boost program_options - global std::string var.
- Memcheck:Leak
- fun:_Znwj
- fun:_ZNSs4_Rep9_S_createEjjRKSaIcE
- obj:/usr/lib/libstdc++.so.6.0.8
- fun:_ZNSsC1EPKcRKSaIcE
- obj:/usr/lib/libboost_program_options.so.1.33.1
-}
-{
- TODO: CONFIRM BENIGN - uninit params to epoll_ctl
- Memcheck:Param
- epoll_ctl(event)
- fun:epoll_ctl
- fun:_ZN4qpid3sys14DispatchHandle10startWatchEN5boost10shared_ptrINS0_6PollerEEE
-}
-{
- TODO: CONFIRM BENIGN - uninit params to epoll_ctl
- Memcheck:Param
- epoll_ctl(event)
- fun:epoll_ctl
- fun:_ZN4qpid3sys14DispatchHandle17dispatchCallbacksENS0_6Poller9EventTypeE
-}
-{
- TODO: CONFIRM BENIGN - uninit params to epoll_ctl (on shutdown)
- Memcheck:Param
- epoll_ctl(event)
- fun:epoll_ctl
- fun:_ZN4qpid3sys16AsynchIOAcceptor8shutdownEv
-}
-{
- TODO: CONFIRM BENIGN - uninit params to epoll_ctl (on shutdown)
- Memcheck:Param
- epoll_ctl(event)
- fun:epoll_ctl
- fun:_ZN4qpid3sys14DispatchHandle12rewatchWriteEv
-}
-{
- TODO: shutdown leak, not critical but better to fix it. Unjoined thread?
- Memcheck:Leak
- fun:calloc
- fun:_dl_allocate_tls
- fun:pthread_create@@GLIBC_2.1
- fun:pthread_create@GLIBC_2.0
- fun:_ZN4qpid3sys16AsynchIOAcceptor3runEPNS0_29ConnectionInputHandlerFactoryE
-}
-
-{
- For CppUnit we have to suppress dlclose, so ignore leaks from dlopen.
- Memcheck:Cond
- fun:_dl_relocate_object
- fun:*dl_*
- obj:/lib64/ld-2.6.so
- obj:*
-}
Modified: store/trunk/cpp/tests/Makefile.am
===================================================================
--- store/trunk/cpp/tests/Makefile.am 2008-04-22 19:08:30 UTC (rev 1957)
+++ store/trunk/cpp/tests/Makefile.am 2008-04-22 21:10:46 UTC (rev 1958)
@@ -6,7 +6,7 @@
INCLUDES=-I../lib -I../lib/gen
-SUBDIRS = jrnl
+SUBDIRS = . jrnl
TESTS = \
clean.sh \
@@ -23,7 +23,7 @@
TwoPhaseCommitTest
UNIT_TEST_SRCS = unit_test.cpp unit_test.h
-UNIT_TEST_LDADD = -lboost_unit_test_framework -lbdbstore -L../lib/.libs
+UNIT_TEST_LDADD = -lboost_unit_test_framework $(top_builddir)/lib/libbdbstore.la
include gen.mk
@@ -44,4 +44,6 @@
QPID_DIR=$(QPID_DIR) \
VALGRIND=$(VALGRIND) \
abs_srcdir=$(abs_srcdir) \
- LIBBDBSTORE=$(abs_builddir)/../lib/.libs/libbdbstore.so
+ LIBBDBSTORE=$(abs_top_builddir)/lib/.libs/libbdbstore.so \
+ $(srcdir)/run_test
+
Property changes on: store/trunk/cpp/tests/jrnl
___________________________________________________________________
Name: svn:ignore
- .deps
.libs
Makefile
Makefile.in
jtest
_ut_enq_map
_ut_arr_cnt
_ut_jdir
_ut_jerrno
_ut_jexception
_ut_jinf
_ut_rec_hdr
_ut_time_ns
_ut_txn_map
_st_basic
_st_basic_txn
_st_read
_st_read_txn
+ .deps
.libs
Makefile
Makefile.in
jtest
_ut_enq_map
_ut_arr_cnt
_ut_jdir
_ut_jerrno
_ut_jexception
_ut_jinf
_ut_rec_hdr
_ut_time_ns
_ut_txn_map
_st_basic
_st_basic_txn
_st_read
_st_read_txn
.valgrind.supp
.valgrindrc
Modified: store/trunk/cpp/tests/jrnl/Makefile.am
===================================================================
--- store/trunk/cpp/tests/jrnl/Makefile.am 2008-04-22 19:08:30 UTC (rev 1957)
+++ store/trunk/cpp/tests/jrnl/Makefile.am 2008-04-22 21:10:46 UTC (rev 1958)
@@ -25,8 +25,18 @@
INCLUDES=-I../../lib
-SUBDIRS = jtt
+SUBDIRS = jtt .
+TESTS_ENVIRONMENT = \
+ VALGRIND=$(VALGRIND) \
+ $(srcdir)/../run_test
+
+all-local: .valgrindrc .valgrind.supp
+.valgrindrc: $(top_srcdir)/tests/.valgrindrc
+ cp $^ .
+.valgrind.supp: $(top_srcdir)/tests/.valgrind.supp
+ cp $^ .
+
TESTS = \
_ut_time_ns \
_ut_arr_cnt \
@@ -59,7 +69,7 @@
_st_read_txn
UNIT_TEST_SRCS = ../unit_test.cpp
-UNIT_TEST_LDADD = -lboost_unit_test_framework -lbdbstore -L../../lib/.libs
+UNIT_TEST_LDADD = -lboost_unit_test_framework ${top_builddir}/lib/libbdbstore.la
_ut_time_ns_SOURCES = _ut_time_ns.cpp $(UNIT_TEST_SRCS)
_ut_time_ns_LDFLAGS = $(UNIT_TEST_LDADD)
Property changes on: store/trunk/cpp/tests/jrnl/jtt
___________________________________________________________________
Name: svn:ignore
- jtt
Makefile
Makefile.in
_ut_data_src
_ut_jrnl_init_params
_ut_jrnl_instance
_ut_read_arg
_ut_test_case
_ut_test_case_set
_ut_test_case_result
_ut_test_case_result_agregation
.deps
.libs
+ jtt
Makefile
Makefile.in
_ut_data_src
_ut_jrnl_init_params
_ut_jrnl_instance
_ut_read_arg
_ut_test_case
_ut_test_case_set
_ut_test_case_result
_ut_test_case_result_agregation
.deps
.libs
.valgrind.supp
.valgrindrc
Modified: store/trunk/cpp/tests/jrnl/jtt/Makefile.am
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/Makefile.am 2008-04-22 19:08:30 UTC (rev 1957)
+++ store/trunk/cpp/tests/jrnl/jtt/Makefile.am 2008-04-22 21:10:46 UTC (rev 1958)
@@ -19,13 +19,20 @@
#
# The GNU Lesser General Public License is available in the file COPYING.
+AM_CXXFLAGS = -I${top_srcdir}/lib -Wall -Werror -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wvolatile-register-var -Winvalid-pch -Wno-system-headers -pedantic -pthread -DBOOST_TEST_DYN_LINK
-LIBDIR = ../../../lib
-LIBOBJDIR = ${LIBDIR}/.libs
-JRNLDIR = ${LIBDIR}/jrnl
+LINK_BDB = ${top_builddir}/lib/libbdbstore.la
-AM_CXXFLAGS = -I${LIBDIR} -Wall -Werror -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wvolatile-register-var -Winvalid-pch -Wno-system-headers -pedantic -pthread -DBOOST_TEST_DYN_LINK
+TESTS_ENVIRONMENT = \
+ VALGRIND=$(VALGRIND) \
+ $(srcdir)/../../run_test
+all-local: .valgrindrc .valgrind.supp
+.valgrindrc: $(top_srcdir)/tests/.valgrindrc
+ cp $^ .
+.valgrind.supp: $(top_srcdir)/tests/.valgrind.supp
+ cp $^ .
+
TESTS = \
_ut_data_src \
_ut_jrnl_init_params \
@@ -68,106 +75,56 @@
test_case_result_agregation.hpp \
test_case_set.hpp \
test_mgr.hpp
-jtt_LDADD = \
- ${LIBOBJDIR}/arr_cnt.o \
- ${LIBOBJDIR}/data_tok.o \
- ${LIBOBJDIR}/deq_rec.o \
- ${LIBOBJDIR}/enq_map.o \
- ${LIBOBJDIR}/enq_rec.o \
- ${LIBOBJDIR}/jcntl.o \
- ${LIBOBJDIR}/jdir.o \
- ${LIBOBJDIR}/jerrno.o \
- ${LIBOBJDIR}/jexception.o \
- ${LIBOBJDIR}/jinf.o \
- ${LIBOBJDIR}/jrec.o \
- ${LIBOBJDIR}/lfh.o \
- ${LIBOBJDIR}/nlfh.o \
- ${LIBOBJDIR}/pmgr.o \
- ${LIBOBJDIR}/rmgr.o \
- ${LIBOBJDIR}/rrfc.o \
- ${LIBOBJDIR}/time_ns.o \
- ${LIBOBJDIR}/txn_map.o \
- ${LIBOBJDIR}/txn_rec.o \
- ${LIBOBJDIR}/wmgr.o \
- ${LIBOBJDIR}/wrfc.o
-jtt_LDFLAGS = -laio -lrt -lboost_program_options
-_ut_data_src_SOURCES = _ut_data_src.cpp ../../unit_test.cpp
-_ut_data_src_LDFLAGS = -lboost_unit_test_framework -lrt
-_ut_data_src_LDADD = data_src.o \
- ${LIBOBJDIR}/jerrno.o \
- ${LIBOBJDIR}/jexception.o
+jtt_LDADD = -laio -lrt -lboost_program_options $(LINK_BDB)
-_ut_jrnl_init_params_SOURCES = _ut_jrnl_init_params.cpp ../../unit_test.cpp
-_ut_jrnl_init_params_LDFLAGS = -lboost_unit_test_framework -lrt
-_ut_jrnl_init_params_LDADD = jrnl_init_params.o
+_ut_data_src_SOURCES = _ut_data_src.cpp data_src.cpp ../../unit_test.cpp
+_ut_data_src_LDADD = -lboost_unit_test_framework -lrt $(LINK_BDB)
-_ut_read_arg_SOURCES = _ut_read_arg.cpp ../../unit_test.cpp
-_ut_read_arg_LDFLAGS = -lboost_unit_test_framework -lrt -lboost_program_options
-_ut_read_arg_LDADD = read_arg.o
+_ut_jrnl_init_params_SOURCES = _ut_jrnl_init_params.cpp ../../unit_test.cpp jrnl_init_params.cpp
+_ut_jrnl_init_params_LDADD = -lboost_unit_test_framework -lrt $(LINK_BDB)
-_ut_jrnl_instance_SOURCES = _ut_jrnl_instance.cpp ../../unit_test.cpp
-_ut_jrnl_instance_LDFLAGS = -lboost_unit_test_framework -laio -lrt -lboost_program_options
-_ut_jrnl_instance_LDADD = \
- args.o \
- data_src.o \
- jrnl_init_params.o \
- jrnl_instance.o \
- read_arg.o \
- test_case.o \
- test_case_result.o \
- test_case_result_agregation.o \
- ${LIBOBJDIR}/arr_cnt.o \
- ${LIBOBJDIR}/data_tok.o \
- ${LIBOBJDIR}/deq_rec.o \
- ${LIBOBJDIR}/enq_map.o \
- ${LIBOBJDIR}/enq_rec.o \
- ${LIBOBJDIR}/jcntl.o \
- ${LIBOBJDIR}/jdir.o \
- ${LIBOBJDIR}/jerrno.o \
- ${LIBOBJDIR}/jexception.o \
- ${LIBOBJDIR}/jinf.o \
- ${LIBOBJDIR}/jrec.o \
- ${LIBOBJDIR}/lfh.o \
- ${LIBOBJDIR}/nlfh.o \
- ${LIBOBJDIR}/pmgr.o \
- ${LIBOBJDIR}/rmgr.o \
- ${LIBOBJDIR}/rrfc.o \
- ${LIBOBJDIR}/time_ns.o \
- ${LIBOBJDIR}/txn_map.o \
- ${LIBOBJDIR}/txn_rec.o \
- ${LIBOBJDIR}/wmgr.o \
- ${LIBOBJDIR}/wrfc.o
+_ut_read_arg_SOURCES = _ut_read_arg.cpp ../../unit_test.cpp \
+ args.cpp \
+ data_src.cpp \
+ jrnl_init_params.cpp \
+ jrnl_instance.cpp \
+ read_arg.cpp \
+ test_case.cpp \
+ test_case_result.cpp \
+ test_case_result_agregation.cpp
+_ut_read_arg_LDADD = -lboost_unit_test_framework -lrt -lboost_program_options $(LINK_BDB)
-_ut_test_case_SOURCES = _ut_test_case.cpp ../../unit_test.cpp
-_ut_test_case_LDFLAGS = -lboost_unit_test_framework -lrt
-_ut_test_case_LDADD = test_case.o test_case_result.o test_case_result_agregation.o \
- ${LIBOBJDIR}/time_ns.o
+_ut_jrnl_instance_SOURCES = _ut_jrnl_instance.cpp ../../unit_test.cpp \
+ args.cpp \
+ data_src.cpp \
+ jrnl_init_params.cpp \
+ jrnl_instance.cpp \
+ read_arg.cpp \
+ test_case.cpp \
+ test_case_result.cpp \
+ test_case_result_agregation.cpp
+_ut_jrnl_instance_LDADD = -lboost_unit_test_framework -laio -lrt -lboost_program_options $(LINK_BDB)
-_ut_test_case_result_SOURCES = _ut_test_case_result.cpp ../../unit_test.cpp
-_ut_test_case_result_LDFLAGS = -lboost_unit_test_framework -lrt
-_ut_test_case_result_LDADD = test_case_result.o \
- ${LIBOBJDIR}/jerrno.o \
- ${LIBOBJDIR}/jexception.o \
- ${LIBOBJDIR}/time_ns.o
+_ut_test_case_SOURCES = _ut_test_case.cpp ../../unit_test.cpp test_case.cpp test_case_result.cpp test_case_result_agregation.cpp
+_ut_test_case_LDADD = -lboost_unit_test_framework -lrt $(LINK_BDB)
-_ut_test_case_result_agregation_SOURCES = _ut_test_case_result_agregation.cpp ../../unit_test.cpp
-_ut_test_case_result_agregation_LDFLAGS = -lboost_unit_test_framework -lrt
-_ut_test_case_result_agregation_LDADD = test_case_result.o test_case_result_agregation.o \
- ${LIBOBJDIR}/jerrno.o \
- ${LIBOBJDIR}/jexception.o \
- ${LIBOBJDIR}/time_ns.o
-_ut_test_case_set_SOURCES = _ut_test_case_set.cpp ../../unit_test.cpp
-_ut_test_case_set_LDFLAGS = -lboost_unit_test_framework -lrt
-_ut_test_case_set_LDADD = \
- test_case.o \
- test_case_set.o \
- test_case_result.o \
- test_case_result_agregation.o \
- ${LIBOBJDIR}/time_ns.o
+_ut_test_case_result_SOURCES = _ut_test_case_result.cpp ../../unit_test.cpp test_case_result.cpp
+_ut_test_case_result_LDADD = -lboost_unit_test_framework -lrt $(LINK_BDB)
+_ut_test_case_result_agregation_SOURCES = _ut_test_case_result_agregation.cpp ../../unit_test.cpp test_case_result.cpp test_case_result_agregation.cpp
+_ut_test_case_result_agregation_LDADD = -lboost_unit_test_framework -lrt $(LINK_BDB)
+
+_ut_test_case_set_SOURCES = _ut_test_case_set.cpp ../../unit_test.cpp \
+ test_case.cpp \
+ test_case_set.cpp \
+ test_case_result.cpp \
+ test_case_result_agregation.cpp
+
+_ut_test_case_set_LDADD = -lboost_unit_test_framework -lrt $(LINK_BDB)
+
EXTRA_DIST = \
jfile_chk.py \
jtt.csv \
Modified: store/trunk/cpp/tests/jrnl/jtt/args.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/args.cpp 2008-04-22 19:08:30 UTC (rev 1957)
+++ store/trunk/cpp/tests/jrnl/jtt/args.cpp 2008-04-22 21:10:46 UTC (rev 1958)
@@ -50,44 +50,45 @@
seed(0)
{
_options_descr.add_options()
- ("csv-file,c",
- po::value<std::string>(&test_case_csv_file_name)->default_value("jtt.csv"),
- "CSV file containing test cases.")
- ("format-chk", po::value<bool>(&format_chk)->zero_tokens(),
- "Check the format of each journal file.")
- ("help,h", "This help message.")
- ("keep-jrnls", po::value<bool>(&keep_jrnls)->zero_tokens(),
- "Keep all test journals.")
- ("lld-rd-num", po::value<unsigned>(&lld_rd_num)->default_value(10),
- "Number of consecutive messages to read after only dequeueing <lld-skip-num> "
- "messages during lazy-loading. Ignored if read-mode is not set to LAZYLOAD.")
- ("lld-skip-num", po::value<unsigned>(&lld_skip_num)->default_value(100),
- "Number of consecutive messages to dequeue only (without reading) prior to "
- "reading <lld-rd-num> messages. Ignored if read-mode is not set to LAZYLOAD.")
- ("num-jrnls", po::value<unsigned>(&num_jrnls)->default_value(1),
- "Number of simultaneous journal instances to test.")
- ("pause", po::value<unsigned>(&pause_secs)->default_value(0),
- "Pause in seconds between test cases (allows disk to catch up).")
- ("randomize", po::value<bool>(&randomize)->zero_tokens(),
- "Randomize the order of the test case execution.")
- ("read-mode", po::value<read_arg>(&read_mode)->default_value(read_arg::NONE),
- read_arg::descr().c_str())
- ("read-prob", po::value<unsigned>(&read_prob)->default_value(50),
- "Read probability (percent) for each message when read-mode is set to RANDOM.")
- ("recover-mode", po::value<bool>(&recover_mode)->zero_tokens(),
- "Recover journal from the previous test for each test case.")
- ("repeat", po::value<bool>(&repeat_flag)->zero_tokens(),
- "Repeat all test cases in CSV file indefinitely.")
- ("reuse-instance", po::value<bool>(&reuse_instance)->zero_tokens(),
- "Reuse journal instance for all test cases.")
- ("seed", po::value<unsigned>(&seed)->default_value(0),
- "Seed for use in random number generator.");
+ ("csv-file,c",
+ po::value<std::string>(&test_case_csv_file_name)->default_value("jtt.csv"),
+ "CSV file containing test cases.")
+ ("format-chk", po::value<bool>(&format_chk)->zero_tokens(),
+ "Check the format of each journal file.")
+ ("help,h", "This help message.")
+ ("keep-jrnls", po::value<bool>(&keep_jrnls)->zero_tokens(),
+ "Keep all test journals.")
+ ("lld-rd-num", po::value<unsigned>(&lld_rd_num)->default_value(10),
+ "Number of consecutive messages to read after only dequeueing <lld-skip-num> "
+ "messages during lazy-loading. Ignored if read-mode is not set to LAZYLOAD.")
+ ("lld-skip-num", po::value<unsigned>(&lld_skip_num)->default_value(100),
+ "Number of consecutive messages to dequeue only (without reading) prior to "
+ "reading <lld-rd-num> messages. Ignored if read-mode is not set to LAZYLOAD.")
+ ("num-jrnls", po::value<unsigned>(&num_jrnls)->default_value(1),
+ "Number of simultaneous journal instances to test.")
+ ("pause", po::value<unsigned>(&pause_secs)->default_value(0),
+ "Pause in seconds between test cases (allows disk to catch up).")
+ ("randomize", po::value<bool>(&randomize)->zero_tokens(),
+ "Randomize the order of the test case execution.")
+ ("read-mode", po::value<read_arg>(&read_mode)->default_value(read_arg::NONE),
+ read_arg::descr().c_str())
+ ("read-prob", po::value<unsigned>(&read_prob)->default_value(50),
+ "Read probability (percent) for each message when read-mode is set to RANDOM.")
+ ("recover-mode", po::value<bool>(&recover_mode)->zero_tokens(),
+ "Recover journal from the previous test for each test case.")
+ ("repeat", po::value<bool>(&repeat_flag)->zero_tokens(),
+ "Repeat all test cases in CSV file indefinitely.")
+ ("reuse-instance", po::value<bool>(&reuse_instance)->zero_tokens(),
+ "Reuse journal instance for all test cases.")
+ ("seed", po::value<unsigned>(&seed)->default_value(0),
+ "Seed for use in random number generator.")
+ ("path", po::value<std::string>(&jtt_path));
+
}
bool
args::parse(int argc, char** argv) // return true if error, false if ok
{
- get_jtt_path(argv[0]);
try
{
po::store(po::parse_command_line(argc, argv, _options_descr), _vmap);
@@ -137,20 +138,6 @@
return false;
}
-void
-args::get_jtt_path(const char* argv0)
-{
- std::string s(argv0);
- std::size_t pos = s.rfind("/jtt");
- assert(pos != std::string::npos);
- if (pos > 1)
- {
- std::size_t start = s.substr(0, 2).compare("./") == 0 ? 2 : 0;
- std::size_t len = s.size() - start - 3;
- jtt_path = s.substr(start, len);
- }
-}
-
bool
args::usage() const
{
Modified: store/trunk/cpp/tests/jrnl/jtt/args.hpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/args.hpp 2008-04-22 19:08:30 UTC (rev 1957)
+++ store/trunk/cpp/tests/jrnl/jtt/args.hpp 2008-04-22 21:10:46 UTC (rev 1958)
@@ -56,7 +56,6 @@
args(std::string opt_title);
bool parse(int argc, char** argv); // return true if error, false if ok
- void get_jtt_path(const char* argv0);
bool usage() const; // return true
void print_args() const;
void print_flags() const;
Modified: store/trunk/cpp/tests/jrnl/jtt/test_mgr.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/test_mgr.cpp 2008-04-22 19:08:30 UTC (rev 1957)
+++ store/trunk/cpp/tests/jrnl/jtt/test_mgr.cpp 2008-04-22 21:10:46 UTC (rev 1958)
@@ -101,7 +101,9 @@
for (ji_list_citr jii=_ji_list.begin(); jii!=_ji_list.end(); jii++)
{
jrnl_init_params::shared_ptr jpp = (*jii)->params();
- std::string path = _args.jtt_path.size() ? _args.jtt_path : "./";
+ std::string path = _args.jtt_path;
+ if (path.empty()) path = ".";
+ if (path[path.size()-1] != '/') path += "/";
std::ostringstream oss;
oss << path << "jfile_chk.py -q";
oss << " -d " << jpp->jdir();
Modified: store/trunk/cpp/tests/jrnl/run-journal-tests
===================================================================
--- store/trunk/cpp/tests/jrnl/run-journal-tests 2008-04-22 19:08:30 UTC (rev 1957)
+++ store/trunk/cpp/tests/jrnl/run-journal-tests 2008-04-22 21:10:46 UTC (rev 1958)
@@ -1,7 +1,5 @@
#!/bin/sh
-. ../setup
-
fail=0
num_jrnls=1
@@ -9,19 +7,19 @@
echo
echo "===== Mode 1: New journal instance, no recover ====="
rm -rf /tmp/test_0*
-$pwd/jtt/jtt --csv $pwd/jtt/jtt.csv --format-chk --num-jrnls $num_jrnls || fail = 1
+jtt/jtt --path jtt --csv jtt/jtt.csv --format-chk --num-jrnls $num_jrnls || fail=1
echo
echo "===== Mode 2: Re-use journal instance, no recover ====="
rm -rf /tmp/test_0*
-$pwd/jtt/jtt --csv $pwd/jtt/jtt.csv --reuse-instance --format-chk --num-jrnls $num_jrnls || fail = 1
+jtt/jtt --path jtt --csv jtt/jtt.csv --reuse-instance --format-chk --num-jrnls $num_jrnls || fail=1
echo
echo "===== Mode 3: New journal instance, recover previous test journal ====="
rm -rf /tmp/test_0*
-$pwd/jtt/jtt --csv $pwd/jtt/jtt.csv --recover-mode --format-chk --num-jrnls $num_jrnls || fail = 1
+jtt/jtt --path jtt --csv jtt/jtt.csv --recover-mode --format-chk --num-jrnls $num_jrnls || fail=1
echo
echo "===== Mode 4: Re-use journal instance, recover previous test journal ====="
rm -rf /tmp/test_0*
-$pwd/jtt/jtt --csv $pwd/jtt/jtt.csv --reuse-instance --recover-mode --format-chk --num-jrnls $num_jrnls || fail = 1
+jtt/jtt --path jtt --csv jtt/jtt.csv --reuse-instance --recover-mode --format-chk --num-jrnls $num_jrnls || fail=1
echo
exit $fail
Modified: store/trunk/cpp/tests/persistence.py
===================================================================
--- store/trunk/cpp/tests/persistence.py 2008-04-22 19:08:30 UTC (rev 1957)
+++ store/trunk/cpp/tests/persistence.py 2008-04-22 21:10:46 UTC (rev 1958)
@@ -420,16 +420,6 @@
self.channel = self.client.channel(1)
self.channel.session_open()
- def connect_with_retry(self, retry):
- for r in range(1, retry + 1):
- try:
- self.connect()
- return
- except socket.error, e:
- print "Failed to connect[%s], retrying (%s of %s)..." % (e, r, retry)
- sleep(1)
- self.connect()
-
def run(self, args=sys.argv[1:]):
try:
opts, extra = getopt(args, "r:s:e:b:p:h", ["retry=", "spec=", "errata=", "broker=", "phase=", "help"])
@@ -447,10 +437,8 @@
if not phase: self._die("please specify the phase to run")
phase = "phase%d" % phase
+ self.connect()
- if retry > 0: self.connect_with_retry(retry)
- else: self.connect()
-
try:
getattr(self, phase)()
print phase, "succeeded"
Added: store/trunk/cpp/tests/run_test
===================================================================
--- store/trunk/cpp/tests/run_test (rev 0)
+++ store/trunk/cpp/tests/run_test 2008-04-22 21:10:46 UTC (rev 1958)
@@ -0,0 +1,50 @@
+#!/bin/sh
+#
+# Set up environment and run a test executable or script.
+#
+# Output nothing if test passes, show the output if it fails and
+# leave output in <test>.log for examination.
+#
+# If qpidd.port exists run test with QPID_PORT=`cat qpidd.port`
+#
+# If $VALGRIND if is set run under valgrind. If there are valgrind
+# erros show valgrind output, also leave it in <test>.valgrind for
+# examination.
+#
+
+source `dirname $0`/vg_check
+
+# Export variables from makefile.
+export VALGRIND srcdir
+
+# Export QPID_PORT if qpidd.port exists.
+test -f qpidd.port && export QPID_PORT=`cat qpidd.port`
+
+# Avoid silly libtool error messages if these are not defined
+test -z "$LC_ALL" && export LC_ALL=
+test -z "$LC_CTYPE" && export LC_CTYPE=
+test -z "$LC_COLLATE" && export LC_COLLATE=
+test -z "$LC_MESSAGES" && export LC_MESSAGES=
+
+VG_LOG="$1.vglog"
+rm -f $VG_LOG
+
+if grep -l "^# Generated by .*libtool" "$1" >/dev/null 2>&1; then
+ # This is a libtool "executable". Valgrind it if VALGRIND specified.
+ test -n "$VALGRIND" && VALGRIND="$VALGRIND --log-file-exactly=$VG_LOG --"
+ # Hide output unless there's an error.
+ libtool --mode=execute $VALGRIND "$@" 2>&1 || ERROR=$?
+ test -n "$VALGRIND" && vg_check
+else
+ # This is a non-libtool shell script, just execute it.
+ export VALGRIND srcdir
+ exec "$@"
+fi
+
+if test -z "$ERROR"; then
+ # Clean up logs if there was no error.
+ rm -f $VG_LOG
+ exit 0
+else
+ exit $ERROR
+fi
Property changes on: store/trunk/cpp/tests/run_test
___________________________________________________________________
Name: svn:executable
+ *
Deleted: store/trunk/cpp/tests/setup
===================================================================
--- store/trunk/cpp/tests/setup 2008-04-22 19:08:30 UTC (rev 1957)
+++ store/trunk/cpp/tests/setup 2008-04-22 21:10:46 UTC (rev 1958)
@@ -1,74 +0,0 @@
-# -*- sh -*-
-
-test "$VERBOSE" = yes && set -x
-
-pwd=`pwd`
-t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-pid=0
-test -z "$TEST_DEBUG" &&
-trap 's=$?;test $pid = 0||kill -2 $pid;cd "$pwd" && rm -rf $t0 && exit $s' 0
-test -z "$TEST_DEBUG" && trap '(exit $?); exit $?' 1 2 13 15
-
-framework_failure=0
-mkdir -p $tmp || framework_failure=1
-cd $tmp || framework_failure=1
-
-gen_supp=--gen-suppressions=all
-# This option makes valgrind significantly slower.
-full_leak_check=--leak-check=full
-
-vg_options="
- --suppressions=$abs_srcdir/.vg-supp
- --num-callers=25
- --demangle=yes
- --track-fds=yes
- $full_leak_check
- $gen_supp
- "
-# configure tests for the existence of valgrind.
-# If it's not available, then make $vg and vg_check no-ops.
-if test x$VALGRIND = x; then
- vg=
-else
- vg="libtool --mode=execute valgrind `echo $vg_options` --"
-fi
-
-vg_leak_check()
-{
- local file=$1
- local fail
- # If we detect a leak, dump all output to stderr.
- grep -E '^==[0-9]+== +definitely lost: [^0]' $file \
- && { fail=1; cat $file 1>&2;
- echo "found memory leaks (see log file, $file); see above" 1>&2; }
- test "$fail" = ''
-}
-
-
-# Ensure 1) that there is an ERROR SUMMARY line, and
-# 2) that the number of errors is 0.
-# An offending line looks like this:
-# ==29302== ERROR SUMMARY: 4 errors from 2 contexts (suppressed: 16 from 5)
-vg_error_check()
-{
- local file=$1
- local fail
- # If we detect a leak, dump all output to stderr.
- grep -E '^==[0-9]+== ERROR SUMMARY:' $file > /dev/null \
- || { fail=1; cat $file 1>&2;
- echo "no valgrind ERROR SUMMARY line in $file" 1>&2; }
- if test "$fail" = ''; then
- grep -E '^==[0-9]+== ERROR SUMMARY: [^0] ' $file \
- && { fail=1; cat $file 1>&2;
- echo "valgrind reported errors in $file; see above" 1>&2; }
- fi
- test "$fail" = ''
-}
-
-vg_check()
-{
- local file=$1
- if test x$VALGRIND != x; then
- vg_error_check $file && vg_leak_check $file
- fi
-}
Added: store/trunk/cpp/tests/start_broker
===================================================================
--- store/trunk/cpp/tests/start_broker (rev 0)
+++ store/trunk/cpp/tests/start_broker 2008-04-22 21:10:46 UTC (rev 1958)
@@ -0,0 +1,5 @@
+#!/bin/sh
+QPIDD=$QPID_DIR/cpp/src/qpidd
+rm -f qpidd.vglog qpidd.log
+test -n "$VALGRIND" && VALGRIND="$VALGRIND --log-file-exactly=qpidd.vglog --"
+exec libtool --mode=execute $VALGRIND $QPIDD --daemon --port=0 --log-output qpidd.log "$@" > qpidd.port
Property changes on: store/trunk/cpp/tests/start_broker
___________________________________________________________________
Name: svn:executable
+ *
Added: store/trunk/cpp/tests/stop_broker
===================================================================
--- store/trunk/cpp/tests/stop_broker (rev 0)
+++ store/trunk/cpp/tests/stop_broker 2008-04-22 21:10:46 UTC (rev 1958)
@@ -0,0 +1,21 @@
+#!/bin/sh
+# Stop the broker, check for errors.
+#
+export QPID_PORT=`cat qpidd.port`
+QPIDD=$QPID_DIR/cpp/src/qpidd
+rm -f qpidd.port
+
+$QPIDD --quit || ERROR=$?
+
+# Check qpidd.log.
+grep -a 'warning\|error\|critical' qpidd.log && {
+ echo "WARNING: Suspicious broker log entries in qpidd.log, above."
+}
+
+# Check valgrind log.
+if test -n "$VALGRIND"; then
+ source `dirname $0`/vg_check
+ vg_check qpidd.vglog
+fi
+
+exit $ERROR
Property changes on: store/trunk/cpp/tests/stop_broker
___________________________________________________________________
Name: svn:executable
+ *
Modified: store/trunk/cpp/tests/system_test.sh
===================================================================
--- store/trunk/cpp/tests/system_test.sh 2008-04-22 19:08:30 UTC (rev 1957)
+++ store/trunk/cpp/tests/system_test.sh 2008-04-22 21:10:46 UTC (rev 1958)
@@ -21,74 +21,33 @@
#
# The GNU Lesser General Public License is available in the file COPYING.
-if ! test -d "$QPID_DIR" ; then
- echo "WARNING: QPID_DIR is not set skipping system tests."
- echo "To enable system tests run ./configure --with-qpid-checkout."
- exit
-fi
+error() { echo $*; exit 1; }
-WORKING_DIR=/tmp
-QPIDD=$QPID_DIR/cpp/src/qpidd
-
-if test "$VERBOSE" = yes; then
- set -x
- $QPIDD --version
-fi
-
-. $abs_srcdir/setup
-
# Make sure $QPID_DIR contains what we need.
+test -d "$QPID_DIR" || error "WARNING: QPID_DIR is not set skipping system tests."
xml_spec=$QPID_DIR/specs/amqp.0-10-preview.xml
-test -f $xml_spec || {
- echo "$xml_spec or $spec_errata or $dtx_preview not found: invalid \$QPID_DIR ?"; exit 1; }
-
-export DB_HOME=dbdata
+test -f $xml_spec || error "$xml_spec or $spec_errata or $dtx_preview not found: invalid \$QPID_DIR ?"
export PYTHONPATH=$QPID_DIR/python
-# Set up working dir for test
-if [ -d ${WORKING_DIR}/rhm ]; then
- rm -rf ${WORKING_DIR}/rhm/*
-else
- mkdir -p ${WORKING_DIR}/rhm
-fi
-mkdir -p $DB_HOME || framework_failure=1
-if test $framework_failure = 1; then
- echo "$0: failure in testing framework" 1>&2
- (exit 1); exit 1
-fi
+# Create a temporary directory for store data.
+export TMPDIR=`mktemp -d` || error "Can't create temporary directory."
+echo "Using directory $TMPDIR"
fail=0
-let sync=0
-JRNLFLAGS=''
-while ((sync <= 1)); do
- echo
- if ((sync == 1)); then
- JRNLFLAGS="--store-directory ${WORKING_DIR} --store-async yes --store-force yes"
- mode='jrnl'
- echo 'Journal (AIO) persistence...'
- else
- JRNLFLAGS="--store-directory ${WORKING_DIR} --store-async no --store-force yes"
- mode='bdb'
- echo 'BDB persistence...'
- fi
+# Run the tests with a given set of flags
+run_tests() {
for p in `seq 1 8`; do
- log="$abs_srcdir/vg-log.$mode.$p"
- #echo "$vg $QPIDD --data dir "" --load-module $LIBBDBSTORE --auth no $JRNLFLAGS"
- $vg $QPIDD --data-dir "" --load-module $LIBBDBSTORE --auth no $JRNLFLAGS >> "$abs_srcdir/qpid.log" 2> $log & pid=$!
- sleep 5
-
- echo phase $p...
- pwd
- python "$abs_srcdir/persistence.py" -s "$xml_spec" -p $p -r 3 || fail=1
- sleep 1
- kill -SIGINT $pid || { echo process already died; cat qpid.log ; fail=1; }
- wait $pid || { echo "$vg $QPIDD returned with exit code $?."; fail=1; }
-
- vg_check $log || fail=1
+ $abs_srcdir/start_broker "$@" --load-module=$LIBBDBSTORE --data-dir=$TMPDIR --auth=no --store-force=yes || return 1
+ python "$abs_srcdir/persistence.py" -s "$xml_spec" -b localhost:`cat qpidd.port` -p $p -r 3 || fail=1;
+ $abs_srcdir/stop_broker
done
- ((sync++))
-done
-pid=0
+}
-(exit $fail); exit $fail
+echo 'Journal (AIO) persistence...'
+run_tests --store-async yes
+echo 'BDB persistence...'
+run_tests --store-async no
+
+test "$fail" = 0 && rm -rf $WORKING_DIR
+exit $fail
Added: store/trunk/cpp/tests/vg_check
===================================================================
--- store/trunk/cpp/tests/vg_check (rev 0)
+++ store/trunk/cpp/tests/vg_check 2008-04-22 21:10:46 UTC (rev 1958)
@@ -0,0 +1,23 @@
+# Check for valgrind errors. Sourced by test scripts.
+
+vg_failed() {
+ cat $VG_LOG 1>&2
+ echo $* 1>&2
+ exit 1
+}
+
+vg_check()
+{
+ test -z "$1" || VG_LOG=$1
+ test -f $VG_LOG || vg_failed Valgrind log file $VG_LOG missing.
+ # Ensure there is an ERROR SUMMARY line.
+ grep -E '^==[0-9]+== ERROR SUMMARY:' $VG_LOG > /dev/null || \
+ vg_failed "No valgrind ERROR SUMMARY line in $$vg_failed."
+ # Ensure that the number of errors is 0.
+ grep -E '^==[0-9]+== ERROR SUMMARY: [^0]' $VG_LOG > /dev/null && \
+ vg_failed "Valgrind reported errors in $vg_out; see above."
+ # Check for leaks.
+ grep -E '^==[0-9]+== +.* lost: [^0]' $VG_LOG && \
+ vg_failed "Found memory leaks (see log file, $VG_LOG); see above."
+ true
+}
[View Less]
16 years, 8 months
rhmessaging commits: r1957 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-04-22 15:08:30 -0400 (Tue, 22 Apr 2008)
New Revision: 1957
Modified:
mgmt/cumin/python/cumin/__init__.py
Log:
Pare down the flood of messages, by default
Modified: mgmt/cumin/python/cumin/__init__.py
===================================================================
--- mgmt/cumin/python/cumin/__init__.py 2008-04-22 18:55:24 UTC (rev 1956)
+++ mgmt/cumin/python/cumin/__init__.py 2008-04-22 19:08:30 UTC (rev 1957)
@@ -158,7 +158,7 @@
self.add_param("debug"…
[View More], bool, False, summ)
def init(self):
- root = logging.getLogger()
+ root = logging.getLogger("cumin")
root.setLevel(logging.NOTSET)
self.load_defaults()
[View Less]
16 years, 8 months
rhmessaging commits: r1956 - in mgmt: cumin/bin and 2 other directories.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-04-22 14:55:24 -0400 (Tue, 22 Apr 2008)
New Revision: 1956
Added:
mgmt/cumin/bin/cumin-instance-init
Modified:
mgmt/cumin/Makefile
mgmt/etc/Makefile.common
mgmt/mint/Makefile
Log:
Changes to support autotool-esque "make install"s and to improve the
rpm building process.
The command cumin-instance-init sets up the symlinks for a
system-installed cumin instance.
Modified: mgmt/cumin/Makefile
================================================================…
[View More]===
--- mgmt/cumin/Makefile 2008-04-22 18:51:37 UTC (rev 1955)
+++ mgmt/cumin/Makefile 2008-04-22 18:55:24 UTC (rev 1956)
@@ -5,32 +5,25 @@
name := cumin
ver := 0.1
-home := ${PREFIX}/share/${name}
+home := ${SHARE_DIR}/${name}
lib := ${PYTHON_LIB_DIR}/${name}
-doc := ${PREFIX}/share/doc/${name}-${ver}
+doc := ${DOC_DIR}/${name}-${ver}
log := ${VAR_DIR}/log/${name}
build:
- python-compile python
+ ../bin/python-compile python
install: build
install -d ${PYTHON_LIB_DIR}/wooly
- install python/wooly/*.py python/wooly/*.pyc python/wooly/*.strings ${PYTHON_LIB_DIR}/wooly
+ install -pm 0644 python/wooly/*.py python/wooly/*.pyc python/wooly/*.strings ${PYTHON_LIB_DIR}/wooly
install -d ${lib}
- install python/cumin/*.py python/cumin/*.pyc python/cumin/*.strings ${lib}
+ install -pm 0644 python/cumin/*.py python/cumin/*.pyc python/cumin/*.strings ${lib}
install -d ${BIN_DIR}
- install bin/* ${BIN_DIR}
+ install -pm 0755 bin/* ${BIN_DIR}
install -d ${doc}
- install LICENSE COPYING ${doc}
+ install -pm 0644 LICENSE COPYING ${doc}
install -d ${home}/resources
- install resources/* ${home}/resources
+ install -pm 0644 resources/* ${home}/resources
install -d ${ETC_DIR}
- install etc/* ${ETC_DIR}
+ install -pm 0644 etc/* ${ETC_DIR}
install -d ${log}
-
- install -d ${home}/lib
- ln -sf ${PYTHON_LIB_DIR} ${home}/lib/python
- ln -sf ${BIN_DIR} ${home}/bin
- ln -sf ${ETC_DIR} ${home}/etc
- ln -sf ${doc} ${home}/doc
- ln -sf ${log} ${home}/log
Added: mgmt/cumin/bin/cumin-instance-init
===================================================================
--- mgmt/cumin/bin/cumin-instance-init (rev 0)
+++ mgmt/cumin/bin/cumin-instance-init 2008-04-22 18:55:24 UTC (rev 1956)
@@ -0,0 +1,50 @@
+#!/usr/bin/python
+
+import sys, os
+from os.path import *
+
+def usage():
+ print "Usage: cumin-instance-init [system|local]"
+ sys.exit(1)
+
+def check_home(dir):
+ if not isdir(dir):
+ print "Error: home dir '%s' not found" % dir
+ sys.exit(1)
+
+if "-h" in sys.argv or "--help" in sys.argv:
+ usage()
+
+try:
+ type = sys.argv[1]
+except IndexError:
+ usage()
+
+if type == "system":
+ home = join(sep, "usr", "share", "cumin")
+
+ check_home(home)
+
+ map = ((join(sep, "usr", "bin"), join(home, "bin")),
+ (join(sep, "etc"), join(home, "etc")),
+ (join(sep, "var", "log", "cumin"), join(home, "log")))
+elif type == "local":
+ home = join(sep, "usr", "local", "share", "cumin")
+
+ check_home(home)
+
+ map = ((join(sep, "usr", "local", "bin"), join(home, "bin")),
+ (join(sep, "usr", "local", "etc"), join(home, "etc")),
+ (join(sep, "var", "local", "log", "cumin"), join(home, "log")))
+else:
+ print "Error: '%s' is not a recognized instance type" % type
+ usage()
+
+for src, dst in map:
+ if exists(dst):
+ print "File already exists: %s" % dst
+ elif islink(dst):
+ print "Link already exists: %s" % dst
+ else:
+ print "Creating symlink: %s -> %s" % (dst, src)
+ os.symlink(src, dst)
Property changes on: mgmt/cumin/bin/cumin-instance-init
___________________________________________________________________
Name: svn:executable
+ *
Modified: mgmt/etc/Makefile.common
===================================================================
--- mgmt/etc/Makefile.common 2008-04-22 18:51:37 UTC (rev 1955)
+++ mgmt/etc/Makefile.common 2008-04-22 18:55:24 UTC (rev 1956)
@@ -14,6 +14,18 @@
ETC_DIR := ${PREFIX}/etc
endif
+ifndef DOC_DIR
+ DOC_DIR := ${PREFIX}/share/doc
+endif
+
+ifndef SHARE_DIR
+ SHARE_DIR := ${PREFIX}/share
+endif
+
ifndef VAR_DIR
- VAR_DIR := ${PREFIX}/var
+ ifeq (${PREFIX}, /usr/local)
+ VAR_DIR := /var/local
+ else
+ VAR_DIR := ${PREFIX}/var
+ endif
endif
Modified: mgmt/mint/Makefile
===================================================================
--- mgmt/mint/Makefile 2008-04-22 18:51:37 UTC (rev 1955)
+++ mgmt/mint/Makefile 2008-04-22 18:55:24 UTC (rev 1956)
@@ -7,13 +7,13 @@
name := mint
ver := 0.1
-home := ${PREFIX}/share/${name}
+home := ${SHARE_DIR}/${name}
lib := ${PYTHON_LIB_DIR}/${name}
-doc := ${PREFIX}/share/doc/${name}-${ver}
+doc := ${DOC_DIR}/${name}-${ver}
log := ${VAR_DIR}/log/${name}
build:
- python-compile python
+ ../bin/python-compile python
install: build
install -d ${lib}
[View Less]
16 years, 8 months
rhmessaging commits: r1955 - mgmt/etc.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-04-22 14:51:37 -0400 (Tue, 22 Apr 2008)
New Revision: 1955
Modified:
mgmt/etc/devel.profile
Log:
Don't use a custom prefix; use the default, /usr/local, instead
Modified: mgmt/etc/devel.profile
===================================================================
--- mgmt/etc/devel.profile 2008-04-22 18:50:58 UTC (rev 1954)
+++ mgmt/etc/devel.profile 2008-04-22 18:51:37 UTC (rev 1955)
@@ -34,5 +34,3 @@
# cumin test instance
export CUMIN_HOME="$DEVEL_HOME"/cumin-…
[View More]test-0
-
-export PREFIX="$DEVEL_HOME"/install
[View Less]
16 years, 8 months
rhmessaging commits: r1954 - mgmt.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-04-22 14:50:58 -0400 (Tue, 22 Apr 2008)
New Revision: 1954
Modified:
mgmt/Makefile
Log:
Add a check-devel-env rule and use it where needed
Modified: mgmt/Makefile
===================================================================
--- mgmt/Makefile 2008-04-22 16:13:02 UTC (rev 1953)
+++ mgmt/Makefile 2008-04-22 18:50:58 UTC (rev 1954)
@@ -1,9 +1,5 @@
-ifndef DEVEL_HOME
- $(error "DEVEL_HOME is not set; you need to source etc/devel.profile")
-endif
+.PHONY: help …
[View More]dist clean cumin mint tags check-devel-env
-.PHONY: help dist clean cumin mint tags
-
version := 0.1
help:
@@ -41,12 +37,19 @@
mint:
cd mint && make install
-clean:
+clean: check-devel-env
rm -rf dist
- rm -rf ${DEVEL_HOME}/install
+ rm -rf "${DEVEL_HOME}"/install
-tags:
+tags: check-devel-env
find "${DEVEL_HOME}" -name \*.py -print \
| etags --output="${DEVEL_HOME}/etc/devel.tags" -
find "${DEVEL_HOME}" -name \*.strings -print \
- | etags --append --output="${DEVEL_HOME}/etc/devel.tags" --regex='/^\[.*\][ \t]*$$/\1/' -
+ | etags --append --output="${DEVEL_HOME}/etc/devel.tags" \
+ --regex='/^\[.*\][ \t]*$$/\1/' -
+
+check-devel-env:
+ @if test -z "${DEVEL_HOME}"; then \
+ echo "DEVEL_HOME is not set; you need to source etc/devel.profile"; \
+ exit 1; \
+ fi
[View Less]
16 years, 8 months
rhmessaging commits: r1953 - in mgmt: mint/python/mint and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: rschloming
Date: 2008-04-22 12:13:02 -0400 (Tue, 22 Apr 2008)
New Revision: 1953
Modified:
mgmt/basil/python/basil/__init__.py
mgmt/mint/python/mint/__init__.py
Log:
updated to use 0-10 final
Modified: mgmt/basil/python/basil/__init__.py
===================================================================
--- mgmt/basil/python/basil/__init__.py 2008-04-22 00:55:28 UTC (rev 1952)
+++ mgmt/basil/python/basil/__init__.py 2008-04-22 16:13:02 UTC (rev 1953)
@@ -1,6 +1,8 @@
-import …
[View More]mllib, qpid, new
+import mllib, qpid, new, uuid
from string import Template
from qpid.management import managementChannel, managementClient
+from qpid.util import connect
+from qpid.connection import Connection
from threading import Lock
from util import *
@@ -115,7 +117,7 @@
attrs["basil_model"] = self.package.model
attrs["basil_package"] = self.package
attrs["basil_class"] = self
- self.python_class = type(name, (BasilObject,), attrs)
+ self.python_class = type(str(name), (BasilObject,), attrs)
def on_schema(self, context_id, class_info,
configs, metrics, methods, events):
@@ -198,7 +200,7 @@
self.port = port
self.context_id = "%s:%i" % (self.host, self.port)
- self.client = qpid.client.Client(host, port, self.model.spec)
+ self.conn = Connection(connect(host, port), self.model.spec)
self.mclient = managementClient(self.model.spec,
None,
@@ -212,9 +214,9 @@
self.model.connections[self.context_id] = self
def open(self):
- self.client.start({})
+ self.conn.start()
self.chan = self.mclient.addChannel \
- (self.client.channel(1), self.context_id)
+ (self.conn.session(str(uuid.uuid4())), self.context_id)
def close(self):
self.mclient.removeChannel(self.chan)
Modified: mgmt/mint/python/mint/__init__.py
===================================================================
--- mgmt/mint/python/mint/__init__.py 2008-04-22 00:55:28 UTC (rev 1952)
+++ mgmt/mint/python/mint/__init__.py 2008-04-22 16:13:02 UTC (rev 1953)
@@ -1,4 +1,6 @@
-import os, socket, qpid, logging
+import os, socket, qpid, logging, uuid
+from qpid.connection import Connection
+from qpid.util import connect
from qpid.management import managementChannel, managementClient
from datetime import *
from sqlobject import *
@@ -170,7 +172,7 @@
self.objs = OriginalIdDict()
spec = qpid.spec.load(model.specPath)
- self.client = qpid.client.Client(host, port, spec)
+ self.conn = Connection(connect(host, port), spec)
self.mclient = managementClient(spec, None,
self.model.configCallback,
self.model.instCallback,
@@ -194,8 +196,8 @@
# dict
self.model.connections[self.key] = self
- self.client.start({})
- self.mchan = self.mclient.addChannel (self.client.channel(1), self.key)
+ self.conn.start()
+ self.mchan = self.mclient.addChannel (self.conn.session(str(uuid.uuid4())), self.key)
self.state = "opened"
except Exception, e:
[View Less]
16 years, 8 months
rhmessaging commits: r1952 - mgmt.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-04-21 20:55:28 -0400 (Mon, 21 Apr 2008)
New Revision: 1952
Modified:
mgmt/README
Log:
Fix typo
Modified: mgmt/README
===================================================================
--- mgmt/README 2008-04-21 23:01:14 UTC (rev 1951)
+++ mgmt/README 2008-04-22 00:55:28 UTC (rev 1952)
@@ -89,7 +89,7 @@
Start the postgresql service:
$ exit # Back to your own user
- # sudo /sbin/service postgresql start
+ $ sudo /sbin/service …
[View More]postgresql start
Starting postgresql service: [ OK ]
Now you can create a database. First you have to switch to the
[View Less]
16 years, 8 months
rhmessaging commits: r1951 - mgmt.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-04-21 19:01:14 -0400 (Mon, 21 Apr 2008)
New Revision: 1951
Modified:
mgmt/README
Log:
Truly, one cannot install sudo by typing 'sudo *anything*'
Modified: mgmt/README
===================================================================
--- mgmt/README 2008-04-21 20:53:55 UTC (rev 1950)
+++ mgmt/README 2008-04-21 23:01:14 UTC (rev 1951)
@@ -6,8 +6,8 @@
To install sudo:
- $ sudo yum install sudo
$ su -
+ $ yum install sudo
$ visudo …
[View More] # Add your user
DEPENDENCIES
[View Less]
16 years, 8 months
rhmessaging commits: r1950 - mgmt/basil/python/basil.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-04-21 16:53:55 -0400 (Mon, 21 Apr 2008)
New Revision: 1950
Modified:
mgmt/basil/python/basil/__init__.py
Log:
Use the right client object
Modified: mgmt/basil/python/basil/__init__.py
===================================================================
--- mgmt/basil/python/basil/__init__.py 2008-04-21 19:20:40 UTC (rev 1949)
+++ mgmt/basil/python/basil/__init__.py 2008-04-21 20:53:55 UTC (rev 1950)
@@ -181,7 +181,7 @@
model.lock.release()
…
[View More]conn = model.connections[self.basil_context_id]
- client, chan = conn.client, conn.chan
+ client, chan = conn.mclient, conn.chan
model.method_calls[seq] = (self, name, callback, kwargs)
[View Less]
16 years, 8 months
rhmessaging commits: r1949 - mgmt/basil/python/basil.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-04-21 15:20:40 -0400 (Mon, 21 Apr 2008)
New Revision: 1949
Modified:
mgmt/basil/python/basil/__init__.py
Log:
Make basil work with recent management api changes
Modified: mgmt/basil/python/basil/__init__.py
===================================================================
--- mgmt/basil/python/basil/__init__.py 2008-04-21 18:51:38 UTC (rev 1948)
+++ mgmt/basil/python/basil/__init__.py 2008-04-21 19:20:40 UTC (rev 1949)
@@ -198,26 +198,24 @@
self.port = …
[View More]port
self.context_id = "%s:%i" % (self.host, self.port)
- self.client = managementClient(self.model.spec,
- None,
- self.model.on_config,
- self.model.on_metric,
- self.model.on_callback)
- self.client.schemaListener(self.model.on_schema)
+ self.client = qpid.client.Client(host, port, self.model.spec)
+ self.mclient = managementClient(self.model.spec,
+ None,
+ self.model.on_config,
+ self.model.on_metric,
+ self.model.on_callback)
+ self.mclient.schemaListener(self.model.on_schema)
+
self.chan = None
self.model.connections[self.context_id] = self
def open(self):
- client = qpid.client.Client(self.host, self.port, self.model.spec)
- client.start({})
- chan = client.channel(1)
+ self.client.start({})
+ self.chan = self.mclient.addChannel \
+ (self.client.channel(1), self.context_id)
- self.chan = managementChannel \
- (chan, self.client.topicCb, self.client.replyCb, self.context_id)
-
- self.client.addChannel(self.chan)
-
def close(self):
- self.client.removeChannel(self.chan)
+ self.mclient.removeChannel(self.chan)
+ #self.client.stop()
[View Less]
16 years, 8 months