Opened 15 years ago
Closed 15 years ago
#458 closed defect (fixed)
Xapian test suite failures on openbsd.
Reported by: | Daniel Dickman | Owned by: | Olly Betts |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.19 |
Component: | Test Suite | Version: | 1.0.18 |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Operating System: | OpenBSD |
Description (last modified by )
The Xapian regression suite fails on OpenBSD. First, the patch below is needed. And after applying this patch the test suite still fails with the output below the patch.
--- tests/api_none.cc.orig Sun Mar 21 05:32:04 2010 +++ tests/api_none.cc Sun Mar 21 05:32:23 2010 @@ -36,7 +36,7 @@ using namespace std; // division by 0. Fixed in 1.1.4 and 1.0.18. Ticket#415. DEFINE_TESTCASE(nosubdatabases1, !backend) { Xapian::Database db; - TEST_EQUAL(db.get_metadata("foo"), std::string()); + TEST_EQUAL(db.get_metadata("foo"), new std::string()); TEST_EQUAL(db.metadata_keys_begin(), db.metadata_keys_end()); TEST_EXCEPTION(Xapian::DocNotFoundError, db.termlist_begin(1)); TEST_EQUAL(db.allterms_begin(), db.allterms_end());
make btreetest quartztest apitest internaltest stemtest queryparsertest termgentest runtest `btreetest' is up to date. `quartztest' is up to date. depbase=`echo api_none.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; c++ -DHAVE_CONFIG_H -I. -I.. -I../common -I../include -I../include -I./harness -I../backends/quartz -Wall -W -Wredundant-decls -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wformat-security -fno-gnu-keywords -Woverloaded-virtual -Wundef -O2 -pipe -MT api_none.o -MD -MP -MF $depbase.Tpo -c -o api_none.o api_none.cc && mv -f $depbase.Tpo $depbase.Po api_none.cc: In function `bool test_nosubdatabases1()': api_none.cc:39: error: no match for 'operator==' in ' Xapian::Database::get_metadata(const std::string&) const((&string("foo", (&allocator<char>())))) == (operator new(8), ((true, (<anonymous>->std::basic_string<_CharT, _Traits, _Alloc>::basic_string [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>](), (<anonymous> <unknown operator> false))), <anonymous>))' harness/testutils.h:55: error: candidates are: bool operator==(const Xapian::MSet&, const Xapian::MSet&) *** Error code 1
Change History (8)
comment:1 by , 15 years ago
Description: | modified (diff) |
---|
comment:2 by , 15 years ago
Status: | new → assigned |
---|
comment:3 by , 15 years ago
Here is the error
===> Regression check for xapian-core-1.0.18 make check-recursive Making check in . Making check in docs Making check in tests make check-am make btreetest quartztest apitest internaltest stemtest queryparsertest termgentest runtest `btreetest' is up to date. `quartztest' is up to date. depbase=`echo api_none.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; c++ -DHAVE_CONFIG_H -I. -I.. -I../common -I../include -I../include -I./harness -I../backends/quartz -Wall -W -Wredundant-decls -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wformat-security -fno-gnu-keywords -Woverloaded-virtual -Wundef -O2 -pipe -MT api_none.o -MD -MP -MF $depbase.Tpo -c -o api_none.o api_none.cc && mv -f $depbase.Tpo $depbase.Po api_none.cc: In function `bool test_nosubdatabases1()': api_none.cc:39: error: syntax error before `)' token api_none.cc:39: error: syntax error before `<<' token
follow-up: 5 comment:4 by , 15 years ago
Milestone: | → 1.1.5 |
---|
Odd, the code looks valid to me - std::string()
should construct a temporary empty string object. What does g++ --version
report?
It is hard to know exactly which bit of that line the error is for due to the macros involved, but the simplest fix is probably just to change the offending line to:
TEST(db.get_metadata("foo").empty());
comment:5 by , 15 years ago
OpenBSD uses a slightly older g++:
g++ (GCC) 3.3.5 (propolice) Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
With your suggested change, the regression tests complete as before... thanks.
comment:6 by , 15 years ago
Milestone: | 1.1.5 → 1.0.19 |
---|
Committed to trunk as r14266. Marking to backport for 1.0.19.
comment:7 by , 15 years ago
comment:8 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
But get_metadata() returns std::string, not std::string *. So the compilation error you've given us doesn't reveal anything useful as the error it is reporting is due to the patch you've applied.
The code as shipped builds on all the platforms I've tried it on. What's the error you get without the patch?