[rhmessaging-commits] rhmessaging commits: r1724 - in store/trunk/cpp: tests/jrnl and 1 other directories.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Fri Feb 22 12:21:52 EST 2008
Author: kpvdr
Date: 2008-02-22 12:21:51 -0500 (Fri, 22 Feb 2008)
New Revision: 1724
Added:
store/trunk/cpp/tests/jrnl/_st_basic.cpp
Modified:
store/trunk/cpp/lib/jrnl/jcntl.cpp
store/trunk/cpp/lib/jrnl/jinf.cpp
store/trunk/cpp/lib/jrnl/txn_map.cpp
store/trunk/cpp/lib/jrnl/txn_map.hpp
store/trunk/cpp/lib/jrnl/wmgr.cpp
store/trunk/cpp/lib/jrnl/wmgr.hpp
store/trunk/cpp/tests/jrnl/
store/trunk/cpp/tests/jrnl/Makefile.am
store/trunk/cpp/tests/jrnl/jtt/jfile_chk.py
store/trunk/cpp/tests/jrnl/jtt/test_mgr.cpp
store/trunk/cpp/tests/jrnl/run-journal-tests
Log:
Fixed double-dequeue problem, some bugs in jtt, added a double-deueue test.
Modified: store/trunk/cpp/lib/jrnl/jcntl.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jcntl.cpp 2008-02-22 17:03:16 UTC (rev 1723)
+++ store/trunk/cpp/lib/jrnl/jcntl.cpp 2008-02-22 17:21:51 UTC (rev 1724)
@@ -485,6 +485,7 @@
try
{
rd._ffid = ji.get_start_file();
+ rd._lfid = ji.get_end_file();
rd._owi = ji.get_initial_owi();
rd._empty = false;
}
@@ -663,12 +664,10 @@
}
break;
case 0:
- rd._lfid = fid;
rd._eo = ifsp->tellg();
return false;
default:
// Stop as this is the overwrite boundary.
- rd._lfid = fid;
rd._eo = file_pos;
return false;
}
@@ -696,7 +695,7 @@
// Tried this, but did not work
// if (e.err_code() != jerrno::JERR_JREC_BADRECTAIL || h._magic != 0) throw;
check_journal_alignment(start_fid, start_file_offs);
- rd._lfid = start_fid;
+// rd._lfid = start_fid;
rd._eo = start_file_offs;
return false;
}
@@ -714,9 +713,8 @@
if (ifsp->eof() || !ifsp->good())
{
rd._eo = ifsp->tellg(); // remember file offset before closing
- rd._lfid = fid++;
ifsp->close();
- if (fid >= _num_jfiles)
+ if (++fid >= _num_jfiles)
{
fid = 0;
lowi = !lowi; // Flip local owi
@@ -763,7 +761,6 @@
if (fid == expected_fid)
{
check_journal_alignment(fid, file_pos);
- rd._lfid = fid;
rd._eo = file_pos;
return false;
}
Modified: store/trunk/cpp/lib/jrnl/jinf.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jinf.cpp 2008-02-22 17:03:16 UTC (rev 1723)
+++ store/trunk/cpp/lib/jrnl/jinf.cpp 2008-02-22 17:21:51 UTC (rev 1724)
@@ -163,7 +163,6 @@
if (!_valid_flag)
validate();
-// for (u_int16_t fnum=0; fnum < _num_jfiles; fnum++)
u_int16_t fnum=0;
while (!done && fnum < _num_jfiles)
{
Modified: store/trunk/cpp/lib/jrnl/txn_map.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/txn_map.cpp 2008-02-22 17:03:16 UTC (rev 1723)
+++ store/trunk/cpp/lib/jrnl/txn_map.cpp 2008-02-22 17:21:51 UTC (rev 1724)
@@ -193,12 +193,35 @@
if (ok && !found)
{
std::ostringstream oss;
- oss << std::hex << "xid=" << xid_format(xid) << " rid=" << rid;
+ oss << std::hex << "xid=" << xid_format(xid) << " rid=0x" << rid;
throw jexception(jerrno::JERR_MAP_NOTFOUND, oss.str(), "txn_map", "set_aio_compl");
}
return ok;
}
+const txn_data&
+txn_map::get_data(const std::string& xid, const u_int64_t rid)
+{
+ txn_data_list tdl = get_tdata_list(xid);
+ bool found = false;
+ {
+ slock s(&_mutex);
+ tdl_itr itr = tdl.begin();
+ while (itr != tdl.end() && !found)
+ {
+ found = itr->_rid == rid;
+ itr++;
+ }
+ if (!found)
+ {
+ std::ostringstream oss;
+ oss << std::hex << "xid=" << xid_format(xid) << " rid=0x" << rid;
+ throw jexception(jerrno::JERR_MAP_NOTFOUND, oss.str(), "txn_map", "get_data");
+ }
+ return *itr;
+ }
+}
+
void
txn_map::xid_list(std::vector<std::string>& xv)
{
@@ -218,7 +241,7 @@
return xid;
std::ostringstream oss;
oss << "\"" << xid.substr(0, 20) << " ... " << xid.substr(xid.size() - 20, 20);
- oss << "\" (size: " << xid.size() << ")";
+ oss << "\" [size: " << xid.size() << "]";
return oss.str();
}
Modified: store/trunk/cpp/lib/jrnl/txn_map.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/txn_map.hpp 2008-02-22 17:03:16 UTC (rev 1723)
+++ store/trunk/cpp/lib/jrnl/txn_map.hpp 2008-02-22 17:21:51 UTC (rev 1724)
@@ -125,6 +125,7 @@
const u_int32_t get_rid_count(const std::string& xid);
const bool is_txn_synced(const std::string& xid);
const bool set_aio_compl(const std::string& xid, const u_int64_t rid);
+ const txn_data& get_data(const std::string& xid, const u_int64_t rid);
inline void clear() { _map.clear(); }
inline const bool empty() const { return _map.empty(); }
inline const u_int16_t size() const { return (u_int16_t)_map.size(); }
Modified: store/trunk/cpp/lib/jrnl/wmgr.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/wmgr.cpp 2008-02-22 17:03:16 UTC (rev 1723)
+++ store/trunk/cpp/lib/jrnl/wmgr.cpp 2008-02-22 17:21:51 UTC (rev 1724)
@@ -37,8 +37,6 @@
#include <jrnl/jcntl.hpp>
#include <jrnl/jerrno.hpp>
-#include <iostream> // debug
-
namespace rhm
{
namespace journal
@@ -141,8 +139,6 @@
throw jexception(jerrno::JERR_WMGR_ENQDISCONT, oss.str(), "wmgr", "enqueue");
}
}
- else
- _enq_busy = true;
u_int64_t rid = (dtokp->external_rid() | cont) ? dtokp->rid() : _wrfc.get_incr_rid();
_enq_rec.reset(rid, data_buff, tot_data_len, xid_ptr, xid_len, _wrfc.owi(), transient,
@@ -155,6 +151,7 @@
dtokp->set_xid(xid_ptr, xid_len);
else
dtokp->clear_xid();
+ _enq_busy = true;
}
bool done = false;
while (!done)
@@ -276,11 +273,6 @@
throw jexception(jerrno::JERR_WMGR_DEQDISCONT, oss.str(), "wmgr", "dequeue");
}
}
- else
- {
- _deq_busy = true;
- dtokp->set_dblocks_written(0); // Reset dblks_written from previous op
- }
const bool ext_rid = dtokp->external_rid();
u_int64_t rid = (ext_rid | cont) ? dtokp->rid() : _wrfc.get_incr_rid();
@@ -297,6 +289,9 @@
dtokp->set_xid(xid_ptr, xid_len);
else
dtokp->clear_xid();
+ dequeue_check(dtokp->xid(), dequeue_rid);
+ dtokp->set_dblocks_written(0); // Reset dblks_written from previous op
+ _deq_busy = true;
}
bool done = false;
while (!done)
@@ -421,11 +416,6 @@
throw jexception(jerrno::JERR_WMGR_DEQDISCONT, oss.str(), "wmgr", "abort");
}
}
- else
- {
- _abort_busy = true;
- dtokp->set_dblocks_written(0); // Reset dblks_written from previous op
- }
u_int64_t rid = (dtokp->external_rid() | cont) ? dtokp->rid() : _wrfc.get_incr_rid();
_txn_rec.reset(RHM_JDAT_TXA_MAGIC, rid, xid_ptr, xid_len, _wrfc.owi());
@@ -434,6 +424,8 @@
dtokp->set_rid(rid);
dtokp->set_dequeue_rid(0);
dtokp->set_xid(xid_ptr, xid_len);
+ dtokp->set_dblocks_written(0); // Reset dblks_written from previous op
+ _abort_busy = true;
}
bool done = false;
while (!done)
@@ -565,11 +557,6 @@
throw jexception(jerrno::JERR_WMGR_DEQDISCONT, oss.str(), "wmgr", "commit");
}
}
- else
- {
- _commit_busy = true;
- dtokp->set_dblocks_written(0); // Reset dblks_written from previous op
- }
u_int64_t rid = (dtokp->external_rid() | cont) ? dtokp->rid() : _wrfc.get_incr_rid();
_txn_rec.reset(RHM_JDAT_TXC_MAGIC, rid, xid_ptr, xid_len, _wrfc.owi());
@@ -578,6 +565,8 @@
dtokp->set_rid(rid);
dtokp->set_dequeue_rid(0);
dtokp->set_xid(xid_ptr, xid_len);
+ dtokp->set_dblocks_written(0); // Reset dblks_written from previous op
+ _commit_busy = true;
}
bool done = false;
while (!done)
@@ -1014,6 +1003,19 @@
}
void
+wmgr::dequeue_check(const std::string& xid, const u_int64_t drid)
+{
+ // First check emap
+ try { _emap.get_fid(drid); }
+ catch(const jexception& e)
+ {
+ if (e.err_code() != jerrno::JERR_MAP_NOTFOUND)
+ throw;
+ _tmap.get_data(xid, drid); // not in emap, try tmap
+ }
+}
+
+void
wmgr::dblk_roundup()
{
const u_int32_t xmagic = RHM_JDAT_EMPTY_MAGIC;
Modified: store/trunk/cpp/lib/jrnl/wmgr.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/wmgr.hpp 2008-02-22 17:03:16 UTC (rev 1723)
+++ store/trunk/cpp/lib/jrnl/wmgr.hpp 2008-02-22 17:21:51 UTC (rev 1724)
@@ -123,6 +123,7 @@
const iores pre_write_check(const _op_type op, const data_tok* const dtokp,
const size_t xidsize = 0, const size_t dsize = 0, const bool external = false)
const;
+ void dequeue_check(const std::string& xid, const u_int64_t drid);
const iores write_flush();
const iores rotate_file();
void dblk_roundup();
Property changes on: store/trunk/cpp/tests/jrnl
___________________________________________________________________
Name: svn:ignore
- .deps
.libs
Makefile
Makefile.in
jtest
_ut_enq_map
_ut_jdir
_ut_jerrno
_ut_jexception
_ut_jinf
_ut_rec_hdr
_ut_time_ns
_ut_txn_map
+ .deps
.libs
Makefile
Makefile.in
jtest
_ut_enq_map
_ut_jdir
_ut_jerrno
_ut_jexception
_ut_jinf
_ut_rec_hdr
_ut_time_ns
_ut_txn_map
_st_basic
Modified: store/trunk/cpp/tests/jrnl/Makefile.am
===================================================================
--- store/trunk/cpp/tests/jrnl/Makefile.am 2008-02-22 17:03:16 UTC (rev 1723)
+++ store/trunk/cpp/tests/jrnl/Makefile.am 2008-02-22 17:21:51 UTC (rev 1724)
@@ -36,6 +36,7 @@
_ut_jdir \
_ut_enq_map \
_ut_txn_map \
+ _st_basic \
run-journal-tests
check_LTLIBRARIES = \
@@ -50,7 +51,8 @@
_ut_jinf \
_ut_jdir \
_ut_enq_map \
- _ut_txn_map
+ _ut_txn_map \
+ _st_basic
UNIT_TEST_SRCS = ../unit_test.cpp
UNIT_TEST_LDADD = -lboost_unit_test_framework -lbdbstore -L../../lib/.libs
@@ -79,6 +81,9 @@
_ut_txn_map_SOURCES = _ut_txn_map.cpp $(UNIT_TEST_SRCS)
_ut_txn_map_LDADD = $(UNIT_TEST_LDADD) -lrt
+_st_basic_SOURCES = _st_basic.cpp $(UNIT_TEST_SRCS)
+_st_basic_LDADD = $(UNIT_TEST_LDADD) -lrt
+
JournalSystemTests_la_SOURCES = \
JournalSystemTests.cpp \
JournalSystemTests.hpp
Added: store/trunk/cpp/tests/jrnl/_st_basic.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/_st_basic.cpp (rev 0)
+++ store/trunk/cpp/tests/jrnl/_st_basic.cpp 2008-02-22 17:21:51 UTC (rev 1724)
@@ -0,0 +1,111 @@
+/**
+* \file _st_basic.cpp
+*
+* Red Hat Messaging - Message Journal
+*
+* This file contains the unit tests for the journal.
+*
+* Copyright 2007, 2008 Red Hat, Inc.
+*
+* This file is part of Red Hat Messaging.
+*
+* Red Hat Messaging is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2.1 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+* USA
+*
+* The GNU Lesser General Public License is available in the file COPYING.
+*/
+
+#include "../unit_test.h"
+#include <jrnl/jcntl.hpp>
+#include <jrnl/jerrno.hpp>
+#include <jrnl/jexception.hpp>
+
+#include <iostream>
+
+#define NUM_JFILES 4
+#define JFSIZE_SBLKS 96
+#define JRNL_DIR "/tmp/jdata"
+#define MAX_AIO_SLEEPS 500
+#define AIO_SLEEP_TIME 1000
+
+using namespace boost::unit_test;
+using namespace rhm::journal;
+using namespace std;
+
+QPID_AUTO_TEST_SUITE(journal_basic)
+
+// Helper function fwd decls
+u_int64_t enq_msg(jcntl& jc, const string msg, const bool transient);
+void deq_msg(jcntl& jc, const u_int64_t drid);
+bool handle_jcntl_response(const iores res, jcntl& jc, unsigned& aio_sleep_cnt);
+
+
+BOOST_AUTO_TEST_CASE(double_dequeue)
+{
+ char* test_name = "DoubleDequeue";
+ jcntl jc(test_name, JRNL_DIR, test_name, NUM_JFILES, JFSIZE_SBLKS);
+ jc.initialize(0, 0);
+ string msg("Message");
+ u_int64_t rid = enq_msg(jc, msg, false);
+ deq_msg(jc, rid);
+ try{ deq_msg(jc, rid); BOOST_FAIL("Did not throw exception on second dequeue."); }
+ catch (const jexception& e) { BOOST_CHECK_EQUAL(e.err_code(), jerrno::JERR_MAP_NOTFOUND); }
+ rid = enq_msg(jc, msg, false);
+ deq_msg(jc, rid);
+}
+
+
+// Helper functions
+
+u_int64_t enq_msg(jcntl& jc, const string msg, const bool transient)
+{
+ data_tok* dtp = new data_tok;
+ unsigned aio_sleep_cnt = 0;
+ while (handle_jcntl_response(jc.enqueue_data_record(msg.c_str(), msg.size(), msg.size(),
+ dtp, transient), jc, aio_sleep_cnt));
+ return dtp->rid();
+}
+
+void deq_msg(jcntl& jc, const u_int64_t drid)
+{
+ data_tok* dtp = new data_tok;
+ dtp->set_wstate(data_tok::ENQ);
+ dtp->set_rid(drid);
+ unsigned aio_sleep_cnt = 0;
+ while (handle_jcntl_response(jc.dequeue_data_record(dtp), jc, aio_sleep_cnt));
+}
+
+bool handle_jcntl_response(const iores res, jcntl& jc, unsigned& aio_sleep_cnt)
+{
+ switch (res)
+ {
+ case RHM_IORES_SUCCESS:
+ return false;
+ case RHM_IORES_AIO_WAIT:
+ if (++aio_sleep_cnt <= MAX_AIO_SLEEPS)
+ {
+ jc.get_wr_events();
+ usleep(AIO_SLEEP_TIME);
+ }
+ else
+ BOOST_FAIL(iores_str(res));
+ break;
+ default:
+ BOOST_FAIL(iores_str(res));
+ }
+ return true;
+}
+
+QPID_AUTO_TEST_SUITE_END()
Modified: store/trunk/cpp/tests/jrnl/jtt/jfile_chk.py
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/jfile_chk.py 2008-02-22 17:03:16 UTC (rev 1723)
+++ store/trunk/cpp/tests/jrnl/jtt/jfile_chk.py 2008-02-22 17:21:51 UTC (rev 1724)
@@ -277,7 +277,7 @@
self.enq_tail = RecTail(self.tail_offs, *unpack(RecTail.format, self.tail_bin))
if self.enq_tail.magic_inv != inv_str(self.magic) or self.enq_tail.rid != self.rid:
print " > %s" % self
- raise Exception('Invalid enqueue record tail (magic=0x%08x; rid=%d) at 0x%08x' % (self.enq_tail.magic_inv, self.enq_tail.rid, self.enq_tail.foffs))
+ raise Exception('Invalid dequeue record tail (magic=%s; rid=%d) at 0x%08x' % (self.enq_tail, self.enq_tail.rid, self.enq_tail.foffs))
self.enq_tail.skip(f)
self.tail_complete = ret[1]
return self.complete()
@@ -317,7 +317,7 @@
self.enq_tail = RecTail(self.tail_offs, *unpack(RecTail.format, self.tail_bin))
if self.enq_tail.magic_inv != inv_str(self.magic) or self.enq_tail.rid != self.rid:
print " > %s" % self
- raise Exception('Invalid enqueue record tail (magic=0x%08x; rid=%d) at 0x%08x' % (self.enq_tail.magic_inv, self.enq_tail.rid, self.enq_tail.foffs))
+ raise Exception('Invalid transaction record tail (magic=%s; rid=%d) at 0x%08x' % (self.enq_tail, self.enq_tail.rid, self.enq_tail.foffs))
self.enq_tail.skip(f)
self.tail_complete = ret[1]
return self.complete()
@@ -388,7 +388,7 @@
self.enq_tail = RecTail(self.tail_offs, *unpack(RecTail.format, self.tail_bin))
if self.enq_tail.magic_inv != inv_str(self.magic) or self.enq_tail.rid != self.rid:
print " > %s" % self
- raise Exception('Invalid enqueue record tail (magic=0x%08x; rid=%d) at 0x%08x' % (self.enq_tail.magic_inv, self.enq_tail.rid, self.enq_tail.foffs))
+ raise Exception('Invalid enqueue record tail (magic=%s; rid=%d) at 0x%08x' % (self.enq_tail, self.enq_tail.rid, self.enq_tail.foffs))
self.enq_tail.skip(f)
self.tail_complete = ret[1]
return self.complete()
Modified: store/trunk/cpp/tests/jrnl/jtt/test_mgr.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/test_mgr.cpp 2008-02-22 17:03:16 UTC (rev 1723)
+++ store/trunk/cpp/tests/jrnl/jtt/test_mgr.cpp 2008-02-22 17:21:51 UTC (rev 1724)
@@ -55,16 +55,23 @@
std::cout << "CSV file: \"" << _args.test_case_csv_file_name << "\"";
test_case_set tcs(_args.test_case_csv_file_name, _args.recover_mode);
- const unsigned num_test_cases = tcs.size();
- if (num_test_cases)
+
+ if (tcs.size())
{
std::cout << " (found " << tcs.size() << " test case" << (tcs.size() != 1 ? "s" : "") <<
")" << std::endl;
if (tcs.ignored())
- std::cout << "WARNING: " << tcs.ignored() << " test cases were ignored. "
- "(recover-mode selected and test has no auto-dequeue.)" << std::endl;
+ std::cout << "WARNING: " << tcs.ignored() << " test cases were ignored. (All test "
+ "cases without auto-dequeue are ignored when recover-mode is selected.)" <<
+ std::endl;
_args.print_args();
}
+ else if(tcs.ignored())
+ {
+ std::cout << " WARNING: All " << tcs.ignored() << " test case(s) were ignored. (All test "
+ "cases without auto-dequeue are ignored when recover-mode is selected.)" <<
+ std::endl;
+ }
else
std::cout << " (WARNING: This CSV file is empty or does not exist.)" << std::endl;
@@ -164,10 +171,12 @@
if (!summary)
std::cout << " === Results ===" << std::endl;
- for (test_case::res_map_citr i=tcp->jmap_begin(); i!=tcp->jmap_end(); i++)
- std::cout << (*i).second->str(summary, summary);
- if (tcp->num_jrnls() > 1)
- std::cout << tcp->average().str(summary, summary);
+// TODO - the reporting is broken when --repeat is used. The following commented-ot
+// section was an attempt to fix it, but there are too many side-effects.
+// for (test_case::res_map_citr i=tcp->jmap_begin(); i!=tcp->jmap_end(); i++)
+// std::cout << (*i).second->str(summary, summary);
+// if (tcp->num_jrnls() > 1)
+ std::cout << tcp->average().str(false, summary);
if (!summary)
std::cout << std::endl;
Modified: store/trunk/cpp/tests/jrnl/run-journal-tests
===================================================================
--- store/trunk/cpp/tests/jrnl/run-journal-tests 2008-02-22 17:03:16 UTC (rev 1723)
+++ store/trunk/cpp/tests/jrnl/run-journal-tests 2008-02-22 17:21:51 UTC (rev 1724)
@@ -6,38 +6,22 @@
# Run jtt using default test set
echo
-echo "***** Mode 1: New journal instance, no recover, single journal *****"
+echo "***** Mode 1: New journal instance, no recover *****"
rm -rf /tmp/test_0*
-$pwd/jtt/jtt --csv $pwd/jtt/jtt.csv --format-chk || fail = 1
+$pwd/jtt/jtt --csv $pwd/jtt/jtt.csv --format-chk --num-jrnls 3 || fail = 1
echo
-#echo "***** Mode 2: New journal instance, no recover, multiple journals *****"
-#rm -rf /tmp/test_0*
-#$pwd/jtt/jtt --csv $pwd/jtt/jtt.csv --format-chk --num-jrnls 5 || fail = 1
-#echo
-#echo "***** Mode 3: Reuse journal instance, no recover, single journal *****"
-#rm -rf /tmp/test_0*
-#$pwd/jtt/jtt --csv $pwd/jtt/jtt.csv --reuse-instance --format-chk || fail = 1
-#echo
-#echo "***** Mode 4: Reuse journal instance, no recover, multiple journals *****"
-#rm -rf /tmp/test_0*
-#$pwd/jtt/jtt --csv $pwd/jtt/jtt.csv --reuse-instance --format-chk --num-jrnls 5 || fail = 1
-#echo
-#echo "***** Mode 5: New journal instance, recover previous test journal, single journal *****"
-#rm -rf /tmp/test_0*
-#$pwd/jtt/jtt --csv $pwd/jtt/jtt.csv --recover-mode --format-chk || fail = 1
-#echo
-#echo "***** Mode 6: New journal instance, recover previous test journal, multiple journals *****"
-#rm -rf /tmp/test_0*
-#$pwd/jtt/jtt --csv $pwd/jtt/jtt.csv --recover-mode --format-chk --num-jrnls 5 || fail = 1
-#echo
-#echo "***** Mode 7: Reuse journal instance, recover previous test journal, single journal *****"
-#rm -rf /tmp/test_0*
-#$pwd/jtt/jtt --csv $pwd/jtt/jtt.csv --reuse-instance --recover-mode --format-chk || fail = 1
-#echo
-#echo "***** Mode 8: Reuse journal instance, recover previous test journal, multiple journals *****"
-#rm -rf /tmp/test_0*
-#$pwd/jtt/jtt --csv $pwd/jtt/jtt.csv --reuse-instance --recover-mode --format-chk --num-jrnls 5 || fail = 1
-#echo
+echo "***** Mode 2: Reuse journal instance, no recover *****"
+rm -rf /tmp/test_0*
+$pwd/jtt/jtt --csv $pwd/jtt/jtt.csv --reuse-instance --format-chk --num-jrnls 3 || 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 3 || fail = 1
+echo
+echo "***** Mode 4: Reuse 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 3 || fail = 1
+echo
# Run cpp-unit tests
LD_PRELOAD=$pwd/.libs/libdlclose_noop.so DllPlugInTester -c -b $pwd/.libs/Journal*Tests.so || fail=1
More information about the rhmessaging-commits
mailing list