rhmessaging commits: r1988 - in mgmt/mint: sql and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: nunofsantos
Date: 2008-04-28 18:21:11 -0400 (Mon, 28 Apr 2008)
New Revision: 1988
Modified:
mgmt/mint/python/mint/__init__.py
mgmt/mint/python/mint/schema.py
mgmt/mint/python/mint/schemaparser.py
mgmt/mint/sql/schema.sql
Log:
store UUIDs in BLOB columns, not String columns
Modified: mgmt/mint/python/mint/__init__.py
===================================================================
--- mgmt/mint/python/mint/__init__.py 2008-04-25 15:44:24 UTC (rev 1987)
+++ mgmt/mint/python/mint/__init__.py 2008-04-28 22:21:11 UTC (rev 1988)
@@ -292,6 +292,10 @@
def sanitizeDict(self, d):
if ("id" in d):
d[self.convertIdKey("id")] = d.pop("id")
+ #XXX FIX -- fix handling of field tables
+ if ("arguments" in d):
+ d.pop("arguments")
+ #XXX FIX -- fix handling of field tables
return d
def convertIdKey(self, k):
Modified: mgmt/mint/python/mint/schema.py
===================================================================
--- mgmt/mint/python/mint/schema.py 2008-04-25 15:44:24 UTC (rev 1987)
+++ mgmt/mint/python/mint/schema.py 2008-04-28 22:21:11 UTC (rev 1988)
@@ -13,7 +13,7 @@
managedBroker = StringCol(length=1000, default=None)
statsCurr = ForeignKey('SystemStats', cascade='null', default=None)
statsPrev = ForeignKey('SystemStats', cascade='null', default=None)
- sysId = StringCol(default=None)
+ sysId = BLOBCol(default=None)
osName = StringCol(length=1000, default=None)
nodeName = StringCol(length=1000, default=None)
release = StringCol(length=1000, default=None)
@@ -122,7 +122,7 @@
managedBroker = StringCol(length=1000, default=None)
statsCurr = ForeignKey('AgentStats', cascade='null', default=None)
statsPrev = ForeignKey('AgentStats', cascade='null', default=None)
- id_ = StringCol(default=None)
+ id_ = BLOBCol(default=None)
classInfos = dict() # brokerId => classInfo
Modified: mgmt/mint/python/mint/schemaparser.py
===================================================================
--- mgmt/mint/python/mint/schemaparser.py 2008-04-25 15:44:24 UTC (rev 1987)
+++ mgmt/mint/python/mint/schemaparser.py 2008-04-28 22:21:11 UTC (rev 1988)
@@ -22,7 +22,7 @@
# see xml/MintTypes.xml
self.dataTypesMap = dict()
self.dataTypesMap["objId"] = "ForeignKey"
- self.dataTypesMap["uuid"] = "StringCol"
+ self.dataTypesMap["uuid"] = "BLOBCol"
self.dataTypesMap["uint8"] = self.dataTypesMap["hilo8"] = self.dataTypesMap["count8"] = self.dataTypesMap["mma8"] = "SmallIntCol"
self.dataTypesMap["uint16"] = self.dataTypesMap["hilo16"] = self.dataTypesMap["count16"] = self.dataTypesMap["mma16"] = "SmallIntCol"
self.dataTypesMap["uint32"] = self.dataTypesMap["hilo32"] = self.dataTypesMap["count32"] = self.dataTypesMap["mma32"] = "IntCol"
Modified: mgmt/mint/sql/schema.sql
===================================================================
--- mgmt/mint/sql/schema.sql 2008-04-25 15:44:24 UTC (rev 1987)
+++ mgmt/mint/sql/schema.sql 2008-04-28 22:21:11 UTC (rev 1988)
@@ -59,7 +59,7 @@
managed_broker VARCHAR(1000),
stats_curr_id INT,
stats_prev_id INT,
- id_ TEXT
+ id_ BYTEA
);
CREATE TABLE agent_stats (
@@ -405,7 +405,7 @@
managed_broker VARCHAR(1000),
stats_curr_id INT,
stats_prev_id INT,
- sys_id TEXT,
+ sys_id BYTEA,
os_name VARCHAR(1000),
node_name VARCHAR(1000),
release VARCHAR(1000),
16 years, 8 months
rhmessaging commits: r1987 - in mgmt: mint/python/mint and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-04-25 11:44:24 -0400 (Fri, 25 Apr 2008)
New Revision: 1987
Modified:
mgmt/cumin/python/cumin/client.py
mgmt/mint/python/mint/__init__.py
Log:
Make the module var name consistent with the style of the file
Modified: mgmt/cumin/python/cumin/client.py
===================================================================
--- mgmt/cumin/python/cumin/client.py 2008-04-25 15:42:35 UTC (rev 1986)
+++ mgmt/cumin/python/cumin/client.py 2008-04-25 15:44:24 UTC (rev 1987)
@@ -154,12 +154,8 @@
self.page.set_redirect_url(session, branch.marshal())
def process_submit(self, session, client):
- try:
- client.close(self.app.model.data, client.managedBroker, doit)
- except Exception, e:
- self.add_error(session, e)
- else:
- self.process_cancel(session, client)
+ action = self.app.model.client.close
+ action.invoke(client)
def render_title(self, session, client):
return "Close Client '%s'" % client.address
Modified: mgmt/mint/python/mint/__init__.py
===================================================================
--- mgmt/mint/python/mint/__init__.py 2008-04-25 15:42:35 UTC (rev 1986)
+++ mgmt/mint/python/mint/__init__.py 2008-04-25 15:44:24 UTC (rev 1987)
@@ -11,14 +11,14 @@
log = logging.getLogger("mint")
-this_module = __import__(__name__)
+thisModule = __import__(__name__)
for item in dir(schema):
cls = getattr(schema, item)
try:
if issubclass(cls, SQLObject) and cls is not SQLObject:
- setattr(this_module, item, cls)
+ setattr(thisModule, item, cls)
except TypeError:
pass
16 years, 8 months
rhmessaging commits: r1986 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-04-25 11:42:35 -0400 (Fri, 25 Apr 2008)
New Revision: 1986
Modified:
mgmt/cumin/python/cumin/__init__.py
Log:
Use the 0-10 final amqp spec
Modified: mgmt/cumin/python/cumin/__init__.py
===================================================================
--- mgmt/cumin/python/cumin/__init__.py 2008-04-25 14:56:22 UTC (rev 1985)
+++ mgmt/cumin/python/cumin/__init__.py 2008-04-25 15:42:35 UTC (rev 1986)
@@ -139,7 +139,7 @@
if not os.path.isdir(self.home):
raise Exception("Home path '%s' is not a directory")
- sdef = os.path.normpath("/usr/share/amqp/amqp.0-10-preview.xml")
+ sdef = os.path.normpath("/usr/share/amqp/amqp.0-10.xml")
spec = os.environ.get("AMQP_SPEC", sdef)
summ = "Print this message"
16 years, 8 months
rhmessaging commits: r1985 - in store/trunk/cpp: tests and 1 other directories.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2008-04-25 10:56:22 -0400 (Fri, 25 Apr 2008)
New Revision: 1985
Removed:
store/trunk/cpp/tests/jrnl/.valgrind.supp
Modified:
store/trunk/cpp/lib/jrnl/file_hdr.hpp
store/trunk/cpp/tests/
store/trunk/cpp/tests/jrnl/
store/trunk/cpp/tests/jrnl/Makefile.am
Log:
Fixed 64-bit initialization problem in struct file_hdr; rolled back valgrind.supp file which suppresses this error.
Modified: store/trunk/cpp/lib/jrnl/file_hdr.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/file_hdr.hpp 2008-04-25 13:22:21 UTC (rev 1984)
+++ store/trunk/cpp/lib/jrnl/file_hdr.hpp 2008-04-25 14:56:22 UTC (rev 1985)
@@ -129,11 +129,11 @@
#if defined(JRNL_LITTLE_ENDIAN) && defined(JRNL_32_BIT)
_filler1(0),
#endif
-#if defined(JRNL_BIG_ENDIAN) && defined(JRNL_32_BIT)
+#if defined(JRNL_BIG_ENDIAN)
_filler2(0),
#endif
_ts_nsec(0)
-#if defined(JRNL_LITTLE_ENDIAN) && defined(JRNL_32_BIT)
+#if defined(JRNL_LITTLE_ENDIAN)
, _filler2(0)
#endif
{}
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
qpidd.port
+ .deps
.libs
Makefile
Makefile.in
gen.mk
qpidd.log
qpidd.vglog
OrderingTest
SimpleTest
TransactionalTest
TwoPhaseCommitTest
qpidd.port
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
.valgrindrc
+ .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
Deleted: store/trunk/cpp/tests/jrnl/.valgrind.supp
===================================================================
--- store/trunk/cpp/tests/jrnl/.valgrind.supp 2008-04-25 13:22:21 UTC (rev 1984)
+++ store/trunk/cpp/tests/jrnl/.valgrind.supp 2008-04-25 14:56:22 UTC (rev 1985)
@@ -1,55 +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 _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
-}
-
-{
-Syscall param write(buf) points to uninitialised byte(s) error in _ut_jinf.cpp - 64-bit only
-Memcheck:Param
-write(buf)
-fun:__write_nocancel
-obj:/usr/lib64/libstdc++.so.6.0.8
-fun:_ZNSt13basic_filebufIcSt11char_traitsIcEE22_M_convert_to_externalEPcl
-fun:_ZNSt13basic_filebufIcSt11char_traitsIcEE8overflowEi
-fun:_ZNSt13basic_filebufIcSt11char_traitsIcEE19_M_terminate_outputEv
-fun:_ZNSt13basic_filebufIcSt11char_traitsIcEE5closeEv
-fun:_Z20create_journal_filesRSt6vectorISsSaISsEE10rid_schemejm
-fun:_Z22analyze_linear_journalv
-fun:_ZN5boost9unit_test9ut_detail16callback0_impl_tINS1_6unusedEPFvvEE6invokeEv
-obj:/usr/lib64/libboost_unit_test_framework.so.1.33.1
-fun:_ZN5boost17execution_monitor13catch_signalsERKNS_9unit_test9callback0IiEEbi
-fun:_ZN5boost17execution_monitor7executeERKNS_9unit_test9callback0IiEEbi
-fun:_ZN5boost9unit_test19unit_test_monitor_t21execute_and_translateERKNS0_9test_caseE
-fun:_ZN5boost9unit_test14framework_impl5visitERKNS0_9test_caseE
-fun:_ZN5boost9unit_test18traverse_test_treeERKNS0_10test_suiteERNS0_17test_tree_visitorE
-fun:_ZN5boost9unit_test18traverse_test_treeERKNS0_10test_suiteERNS0_17test_tree_visitorE
-fun:_ZN5boost9unit_test9framework3runEmb
-fun:main
-}
Modified: store/trunk/cpp/tests/jrnl/Makefile.am
===================================================================
--- store/trunk/cpp/tests/jrnl/Makefile.am 2008-04-25 13:22:21 UTC (rev 1984)
+++ store/trunk/cpp/tests/jrnl/Makefile.am 2008-04-25 14:56:22 UTC (rev 1985)
@@ -117,6 +117,4 @@
tests.ods \
rtests.csv \
rwtests.csv \
- wtests.csv \
- .valgrindrc \
- .valgrind.supp
+ wtests.csv
16 years, 8 months
rhmessaging commits: r1984 - mgmt/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-04-25 09:22:21 -0400 (Fri, 25 Apr 2008)
New Revision: 1984
Modified:
mgmt/cumin/Makefile
Log:
Restrict permissions on admin tools
Modified: mgmt/cumin/Makefile
===================================================================
--- mgmt/cumin/Makefile 2008-04-25 11:19:20 UTC (rev 1983)
+++ mgmt/cumin/Makefile 2008-04-25 13:22:21 UTC (rev 1984)
@@ -19,7 +19,8 @@
install -d ${lib}
install -pm 0644 python/cumin/*.py python/cumin/*.pyc python/cumin/*.strings ${lib}
install -d ${BIN_DIR}
- install -pm 0755 bin/* ${BIN_DIR}
+ install -pm 0755 bin/cumin bin/cumin-test bin/cumin-bench ${BIN_DIR}
+ install -pm 0700 bin/cumin-admin bin/cumin-database-* bin/cumin-instance-init ${BIN_DIR}
install -d ${doc}
install -pm 0644 LICENSE COPYING ${doc}
install -d ${share}/resources
16 years, 8 months
rhmessaging commits: r1983 - store/trunk/cpp/tests/jrnl.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2008-04-25 07:19:20 -0400 (Fri, 25 Apr 2008)
New Revision: 1983
Modified:
store/trunk/cpp/tests/jrnl/Makefile.am
Log:
added .valdrindrc and .valgrind.supp to EXTRADIST in Makefile.am
Modified: store/trunk/cpp/tests/jrnl/Makefile.am
===================================================================
--- store/trunk/cpp/tests/jrnl/Makefile.am 2008-04-25 08:22:27 UTC (rev 1982)
+++ store/trunk/cpp/tests/jrnl/Makefile.am 2008-04-25 11:19:20 UTC (rev 1983)
@@ -117,4 +117,6 @@
tests.ods \
rtests.csv \
rwtests.csv \
- wtests.csv
+ wtests.csv \
+ .valgrindrc \
+ .valgrind.supp
16 years, 8 months
rhmessaging commits: r1982 - store/trunk/cpp/tests.
by rhmessaging-commits@lists.jboss.org
Author: gordonsim
Date: 2008-04-25 04:22:27 -0400 (Fri, 25 Apr 2008)
New Revision: 1982
Modified:
store/trunk/cpp/tests/SimpleTest.cpp
Log:
Fixed caught exception type
Modified: store/trunk/cpp/tests/SimpleTest.cpp
===================================================================
--- store/trunk/cpp/tests/SimpleTest.cpp 2008-04-24 21:15:49 UTC (rev 1981)
+++ store/trunk/cpp/tests/SimpleTest.cpp 2008-04-25 08:22:27 UTC (rev 1982)
@@ -230,8 +230,8 @@
BOOST_REQUIRE_EQUAL((u_int64_t) 14, msg->contentSize());
DummyHandler handler;
- QueuedMessage qm(queue.get(),msg,0);
- MessageDelivery::deliver(qm, handler, 0, MessageDelivery::getBasicConsumeToken("ignore"), 100);
+ QueuedMessage qm(queue.get(),msg,0);
+ MessageDelivery::deliver(qm, handler, 0, MessageDelivery::getMessageDeliveryToken("ignore", 0, 0), 100);
BOOST_REQUIRE_EQUAL((size_t) 3, handler.frames.size());
AMQContentBody* contentBody(dynamic_cast<AMQContentBody*>(handler.frames[2].getBody()));
BOOST_REQUIRE(contentBody);
@@ -312,8 +312,8 @@
//load it (without recovery)
DummyHandler handler;
QueuedMessage qm(queue.get(), msg, 0);
- MessageDelivery::deliver(qm, handler, 0,
- MessageDelivery::getBasicConsumeToken("ignore"), 20);//52 chars of data, i.e. 2 chunks of 20 and one of 12
+ //52 chars of data, i.e. 2 chunks of 20 and one of 12
+ MessageDelivery::deliver(qm, handler, 0, MessageDelivery::getMessageDeliveryToken("ignore", 0, 0), 20);
BOOST_REQUIRE(handler.frames.size() > 2);
string loaded;
for (uint i = 2; i < handler.frames.size(); i++) {
@@ -355,7 +355,7 @@
//load lazily
DummyHandler handler;
QueuedMessage qm(queue.get(),msg,0);
- MessageDelivery::deliver(qm, handler, 0, MessageDelivery::getBasicConsumeToken("ignore"), 20);//52 chars of data, i.e. 2 chunks of 20 and one of 12
+ MessageDelivery::deliver(qm, handler, 0, MessageDelivery::getMessageDeliveryToken("ignore", 0, 0), 20);//52 chars of data, i.e. 2 chunks of 20 and one of 12
BOOST_REQUIRE(handler.frames.size() > 2);
string loaded;
@@ -462,7 +462,7 @@
try {
Exchange::shared_ptr exchange = registry.get(name);
BOOST_FAIL("Expected exchange not to be found");
- } catch (ChannelException& e) {
+ } catch (const SessionException& e) {
BOOST_REQUIRE_EQUAL((framing::ReplyCode) 404, e.code);
}
}
@@ -574,7 +574,7 @@
try {
Exchange::shared_ptr exchange = exchanges.get(exchangeName);
BOOST_FAIL("Expected exchange not to be found");
- } catch (ChannelException& e) {
+ } catch (const SessionException& e) {
BOOST_REQUIRE_EQUAL((framing::ReplyCode) 404, e.code);
}
Queue::shared_ptr queue = queues.find(queueName2);
16 years, 8 months
rhmessaging commits: r1981 - mgmt/cumin/etc.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-04-24 17:15:49 -0400 (Thu, 24 Apr 2008)
New Revision: 1981
Added:
mgmt/cumin/etc/sysvinit-cumin
Log:
Add an init script
Added: mgmt/cumin/etc/sysvinit-cumin
===================================================================
--- mgmt/cumin/etc/sysvinit-cumin (rev 0)
+++ mgmt/cumin/etc/sysvinit-cumin 2008-04-24 21:15:49 UTC (rev 1981)
@@ -0,0 +1,68 @@
+#!/bin/sh
+#
+# cumin: Cumin daemon
+# processname: cumin
+# pidfile: /var/run/cumin.pid
+#
+
+# Sanity checks.
+[ -x /usr/bin/cumin ] || exit 0
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# so we can rearrange this easily
+processname=cumin
+servicename=cumin
+
+RETVAL=0
+
+start() {
+ echo -n $"Starting Cumin daemon: "
+ daemon --check $servicename $processname \&
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$servicename
+}
+
+stop() {
+ echo -n $"Stopping Cumin daemon: "
+
+ killproc $servicename -TERM
+ RETVAL=$?
+ echo
+ if [ $RETVAL -eq 0 ]; then
+ rm -f /var/lock/subsys/$servicename
+ rm -f /var/run/cumin.pid
+ fi
+}
+
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ status)
+ status $processname
+ RETVAL=$?
+ ;;
+ restart)
+ stop
+ sleep 3
+ start
+ ;;
+ condrestart)
+ if [ -f /var/lock/subsys/$servicename ]; then
+ stop
+ sleep 3
+ start
+ fi
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart}"
+ ;;
+esac
+exit $RETVAL
Property changes on: mgmt/cumin/etc/sysvinit-cumin
___________________________________________________________________
Name: svn:executable
+ *
16 years, 8 months
rhmessaging commits: r1980 - store/trunk/cpp/tests/jrnl.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2008-04-24 16:41:28 -0400 (Thu, 24 Apr 2008)
New Revision: 1980
Added:
store/trunk/cpp/tests/jrnl/.valgrind.supp
Modified:
store/trunk/cpp/tests/jrnl/
Log:
Added valdrind suppression for spurious "Syscall param write(buf) points to uninitialised byte(s)" error on 64-bit only compiles. The memory in question is allocated on call to std::ofstream ctr and the offending write on the stream close() in _ut_jinf.cpp boost 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
.valgrind.supp
.valgrindrc
+ .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
.valgrindrc
Added: store/trunk/cpp/tests/jrnl/.valgrind.supp
===================================================================
--- store/trunk/cpp/tests/jrnl/.valgrind.supp (rev 0)
+++ store/trunk/cpp/tests/jrnl/.valgrind.supp 2008-04-24 20:41:28 UTC (rev 1980)
@@ -0,0 +1,55 @@
+{
+ 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
+}
+
+{
+Syscall param write(buf) points to uninitialised byte(s) error in _ut_jinf.cpp - 64-bit only
+Memcheck:Param
+write(buf)
+fun:__write_nocancel
+obj:/usr/lib64/libstdc++.so.6.0.8
+fun:_ZNSt13basic_filebufIcSt11char_traitsIcEE22_M_convert_to_externalEPcl
+fun:_ZNSt13basic_filebufIcSt11char_traitsIcEE8overflowEi
+fun:_ZNSt13basic_filebufIcSt11char_traitsIcEE19_M_terminate_outputEv
+fun:_ZNSt13basic_filebufIcSt11char_traitsIcEE5closeEv
+fun:_Z20create_journal_filesRSt6vectorISsSaISsEE10rid_schemejm
+fun:_Z22analyze_linear_journalv
+fun:_ZN5boost9unit_test9ut_detail16callback0_impl_tINS1_6unusedEPFvvEE6invokeEv
+obj:/usr/lib64/libboost_unit_test_framework.so.1.33.1
+fun:_ZN5boost17execution_monitor13catch_signalsERKNS_9unit_test9callback0IiEEbi
+fun:_ZN5boost17execution_monitor7executeERKNS_9unit_test9callback0IiEEbi
+fun:_ZN5boost9unit_test19unit_test_monitor_t21execute_and_translateERKNS0_9test_caseE
+fun:_ZN5boost9unit_test14framework_impl5visitERKNS0_9test_caseE
+fun:_ZN5boost9unit_test18traverse_test_treeERKNS0_10test_suiteERNS0_17test_tree_visitorE
+fun:_ZN5boost9unit_test18traverse_test_treeERKNS0_10test_suiteERNS0_17test_tree_visitorE
+fun:_ZN5boost9unit_test9framework3runEmb
+fun:main
+}
16 years, 8 months
rhmessaging commits: r1979 - store/trunk/cpp/tests/jrnl.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2008-04-24 15:44:47 -0400 (Thu, 24 Apr 2008)
New Revision: 1979
Modified:
store/trunk/cpp/tests/jrnl/_st_helper_fns.hpp
store/trunk/cpp/tests/jrnl/_ut_jinf.cpp
Log:
Additional memory leak fix for read error code path in boost read test
Modified: store/trunk/cpp/tests/jrnl/_st_helper_fns.hpp
===================================================================
--- store/trunk/cpp/tests/jrnl/_st_helper_fns.hpp 2008-04-24 19:08:06 UTC (rev 1978)
+++ store/trunk/cpp/tests/jrnl/_st_helper_fns.hpp 2008-04-24 19:44:47 UTC (rev 1979)
@@ -90,16 +90,19 @@
}
bool
-check_iores(const string& ctxt, const iores ret, const iores exp_ret)
+check_iores(const string& ctxt, const iores ret, const iores exp_ret, test_dtok* dtp)
{
if (ret != exp_ret)
+ {
+ delete dtp;
BOOST_FAIL(ctxt << ": Expected " << iores_str(exp_ret) << "; got " << iores_str(ret));
+ }
return false;
}
bool
handle_jcntl_response(const iores res, jcntl& jc, unsigned& aio_sleep_cnt, const std::string& ctxt,
- const iores exp_ret)
+ const iores exp_ret, test_dtok* dtp)
{
if (res == RHM_IORES_PAGE_AIOWAIT)
{
@@ -109,10 +112,10 @@
usleep(AIO_SLEEP_TIME);
}
else
- return check_iores(ctxt, res, exp_ret);
+ return check_iores(ctxt, res, exp_ret, dtp);
}
else
- return check_iores(ctxt, res, exp_ret);
+ return check_iores(ctxt, res, exp_ret, dtp);
return true;
}
@@ -127,7 +130,7 @@
try
{
iores res = jc.enqueue_data_record(msg.c_str(), msg.size(), msg.size(), dtp, transient);
- check_iores(ctxt.str(), res, exp_ret);
+ check_iores(ctxt.str(), res, exp_ret, dtp);
u_int64_t dtok_rid = dtp->rid();
if (dtp->done()) delete dtp;
return dtok_rid;
@@ -146,7 +149,7 @@
try
{
iores res = jc.enqueue_extern_data_record(msg_size, dtp, transient);
- check_iores(ctxt.str(), res, exp_ret);
+ check_iores(ctxt.str(), res, exp_ret, dtp);
u_int64_t dtok_rid = dtp->rid();
if (dtp->done()) delete dtp;
return dtok_rid;
@@ -166,7 +169,7 @@
{
iores res = jc.enqueue_txn_data_record(msg.c_str(), msg.size(), msg.size(), dtp, xid,
transient);
- check_iores(ctxt.str(), res, exp_ret);
+ check_iores(ctxt.str(), res, exp_ret, dtp);
u_int64_t dtok_rid = dtp->rid();
if (dtp->done()) delete dtp;
return dtok_rid;
@@ -185,7 +188,7 @@
try
{
iores res = jc.enqueue_extern_txn_data_record(msg_size, dtp, xid, transient);
- check_iores(ctxt.str(), res, exp_ret);
+ check_iores(ctxt.str(), res, exp_ret, dtp);
u_int64_t dtok_rid = dtp->rid();
if (dtp->done()) delete dtp;
return dtok_rid;
@@ -205,7 +208,7 @@
try
{
iores res = jc.dequeue_data_record(dtp);
- check_iores(ctxt.str(), res, exp_ret);
+ check_iores(ctxt.str(), res, exp_ret, dtp);
u_int64_t dtok_rid = dtp->rid();
if (dtp->done()) delete dtp;
return dtok_rid;
@@ -226,7 +229,7 @@
try
{
iores res = jc.dequeue_txn_data_record(dtp, xid);
- check_iores(ctxt.str(), res, exp_ret);
+ check_iores(ctxt.str(), res, exp_ret, dtp);
u_int64_t dtok_rid = dtp->rid();
if (dtp->done()) delete dtp;
return dtok_rid;
@@ -242,7 +245,7 @@
try
{
iores res = jc.txn_abort(dtp, xid);
- check_iores("txn_abort", res, exp_ret);
+ check_iores("txn_abort", res, exp_ret, dtp);
u_int64_t dtok_rid = dtp->rid();
if (dtp->done()) delete dtp;
return dtok_rid;
@@ -258,7 +261,7 @@
try
{
iores res = jc.txn_commit(dtp, xid);
- check_iores("txn_commit", res, exp_ret);
+ check_iores("txn_commit", res, exp_ret, dtp);
u_int64_t dtok_rid = dtp->rid();
if (dtp->done()) delete dtp;
return dtok_rid;
@@ -281,8 +284,9 @@
unsigned aio_sleep_cnt = 0;
try
{
- while (handle_jcntl_response(jc.read_data_record(&mp, msize, &xp, xsize, transient,
- external, dtp), jc, aio_sleep_cnt, "read_msg", exp_ret)) ;
+ iores res = jc.read_data_record(&mp, msize, &xp, xsize, transient, external, dtp);
+ while (handle_jcntl_response(res, jc, aio_sleep_cnt, "read_msg", exp_ret, dtp))
+ res = jc.read_data_record(&mp, msize, &xp, xsize, transient, external, dtp);
}
catch (exception e) { delete dtp; throw; }
Modified: store/trunk/cpp/tests/jrnl/_ut_jinf.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/_ut_jinf.cpp 2008-04-24 19:08:06 UTC (rev 1978)
+++ store/trunk/cpp/tests/jrnl/_ut_jinf.cpp 2008-04-24 19:44:47 UTC (rev 1979)
@@ -105,13 +105,13 @@
BOOST_FAIL("Unable to open test journal file " << *itr << " for writing.");
// prepare file_hdr
+ int cnt = sizeof(file_hdr);
if (scheme == RID_NONE) // create file containing 0s
- std::memset(&fh, 0, sizeof(file_hdr));
+ std::memset(&fh, 0, cnt);
else
init_fhdr(fh, fid, rid, fid >= min_fid_offs);
// write file header
- int cnt = sizeof(file_hdr);
of.write((const char*)&fh, cnt);
// fill remaining sblk with 0s
16 years, 8 months