Hi Andor,

Thank you for the suggestion.  It turns out I had stale zkdata directory
under /tmp that was causing permission denied errors from within tests.
Once I removed those, the tests passed.
As a side note, it seems the "make check" target expects base_dir to be
set.  So I had to set it manually from the command line (just like how it's
set in the maven project's "test" phase).

--
Deepak

On Sat, Nov 2, 2019 at 3:13 AM Andor Molnar <[email protected]> wrote:

> Hi deepak,
>
> It’s a single test failure originally, not a build error.
> Removing TestClient.cc will cause all kinds of problems, because I believe
> most tests are dependent on it.
>
> You can try to run the tests multiple times and if it still fails may try
> debugging it.
>
> What system are you running the build on?
>
> Andor
>
>
>
>
> > On 2019. Oct 31., at 22:03, deepak <[email protected]> wrote:
> >
> > It turns out I had not built the ZooKeeper core before building the C API
> > (it had a class not found exception in logs).  After building the
> ZooKeeper
> > core, trying to build the C API still gives me failures (see below).
> Could
> > someone help me with this?  How should I go about figuring out what is
> > wrong?
> >
> > Zookeeper_simpleSystem::testAsyncWatcherAutoResetterminate called after
> > throwing an instance of 'CppUnit::Exception'
> >  what():  equality assertion failed
> > - Expected: -101
> > - Actual  : -4
> >
> > /bin/sh: line 5:  7241 Aborted                 ZKROOT=./../..
> > CLASSPATH=$CLASSPATH:$CLOVER_HOME/lib/clover*.jar ${dir}$tst
> > FAIL: zktest-mt
> > ==========================================
> > 1 of 2 tests failed
> > Please report to [email protected]
> > ==========================================
> >
> > If I uncomment just the testAsyncWatcherAutoReset in tests/TestClient.cc,
> > then I get a whole bunch of other failures:
> >
> > Zookeeper_simpleSystem::testDeserializeString : elapsed 0 : OK
> > Zookeeper_simpleSystem::testFirstServerDown : assertion : elapsed 11002
> > Zookeeper_simpleSystem::testNullData : assertion : elapsed 1001
> > Zookeeper_simpleSystem::testIPV6 : assertion : elapsed 1000
> > Zookeeper_simpleSystem::testCreate : assertion : elapsed 1000
> > Zookeeper_simpleSystem::testCreateContainer : assertion : elapsed 1000
> > Zookeeper_simpleSystem::testCreateTtl : assertion : elapsed 1000
> > Zookeeper_simpleSystem::testPath : assertion : elapsed 1000
> > Zookeeper_simpleSystem::testPathValidation : assertion : elapsed 1000
> > Zookeeper_simpleSystem::testPing : assertion : elapsed 2001
> > Zookeeper_simpleSystem::testAcl : assertion : elapsed 1000
> > Zookeeper_simpleSystem::testChroot : assertion : elapsed 2001
> > Zookeeper_simpleSystem::testAuth : assertion : elapsed 1000
> > Zookeeper_simpleSystem::testHangingClient : elapsed 1001 : OK
> > Zookeeper_simpleSystem::testWatcherAutoResetWithGlobal : assertion :
> > elapsed 1000
> > Zookeeper_simpleSystem::testWatcherAutoResetWithLocal : assertion :
> elapsed
> > 1000
> > Zookeeper_simpleSystem::testGetChildren2 : assertion : elapsed 1000
> > Zookeeper_simpleSystem::testLastZxid : assertion : elapsed 2001
> > Zookeeper_simpleSystem::testRemoveWatchers : assertion : elapsed 1000
> > Zookeeper_readOnly::testReadOnly./tests/zkServer.sh: line 55: kill:
> (19172)
> > - No such process
> > this target is for unit tests only
> > : assertion : elapsed 11
> > tests/TestClientRetry.cc:137: Assertion: equality assertion failed
> > [Expected: 1, Actual  : 0]
> > tests/TestMulti.cc:213: Assertion: equality assertion failed [Expected:
> 1,
> > Actual  : 0]
> > tests/TestMulti.cc:213: Assertion: equality assertion failed [Expected:
> 1,
> > Actual  : 0]
> > tests/TestMulti.cc:213: Assertion: equality assertion failed [Expected:
> 1,
> > Actual  : 0]
> > tests/TestMulti.cc:213: Assertion: equality assertion failed [Expected:
> 1,
> > Actual  : 0]
> > tests/TestMulti.cc:213: Assertion: equality assertion failed [Expected:
> 1,
> > Actual  : 0]
> > tests/TestMulti.cc:213: Assertion: equality assertion failed [Expected:
> 1,
> > Actual  : 0]
> > tests/TestMulti.cc:213: Assertion: equality assertion failed [Expected:
> 1,
> > Actual  : 0]
> > tests/TestMulti.cc:213: Assertion: equality assertion failed [Expected:
> 1,
> > Actual  : 0]
> > tests/TestMulti.cc:213: Assertion: equality assertion failed [Expected:
> 1,
> > Actual  : 0]
> > tests/TestMulti.cc:213: Assertion: equality assertion failed [Expected:
> 1,
> > Actual  : 0]
> > tests/TestMulti.cc:213: Assertion: equality assertion failed [Expected:
> 1,
> > Actual  : 0]
> > tests/TestMulti.cc:213: Assertion: equality assertion failed [Expected:
> 1,
> > Actual  : 0]
> > tests/TestMulti.cc:213: Assertion: equality assertion failed [Expected:
> 1,
> > Actual  : 0]
> > tests/TestClient.cc:327: Assertion: assertion failed [Expression:
> > ctx.waitForConnected(zk)]
> > tests/TestClient.cc:783: Assertion: equality assertion failed [Expected:
> 0,
> > Actual  : -4]
> > tests/TestClient.cc:773: Assertion: equality assertion failed [Expected:
> 0,
> > Actual  : -4]
> > tests/TestClient.cc:686: Assertion: equality assertion failed [Expected:
> 0,
> > Actual  : -4]
> > tests/TestClient.cc:712: Assertion: equality assertion failed [Expected:
> 0,
> > Actual  : -4]
> > tests/TestClient.cc:725: Assertion: equality assertion failed [Expected:
> 0,
> > Actual  : -4]
> > tests/TestClient.cc:807: Assertion: equality assertion failed [Expected:
> 0,
> > Actual  : -4]
> > tests/TestClient.cc:489: Assertion: equality assertion failed [Expected:
> 0,
> > Actual  : -4]
> > tests/TestClient.cc:375: Assertion: equality assertion failed [Expected:
> 0,
> > Actual  : -4]
> > tests/TestClient.cc:548: Assertion: equality assertion failed [Expected:
> 0,
> > Actual  : -4]
> > tests/TestClient.cc:908: Assertion: equality assertion failed [Expected:
> 0,
> > Actual  : -4]
> > tests/TestClient.cc:578: Assertion: equality assertion failed [Expected:
> 0,
> > Actual  : -9]
> > tests/TestClient.cc:1266: Assertion: equality assertion failed [Expected:
> > 0, Actual  : -4]
> > tests/TestClient.cc:1285: Assertion: equality assertion failed [Expected:
> > 0, Actual  : -4]
> > tests/TestClient.cc:739: Assertion: equality assertion failed [Expected:
> 0,
> > Actual  : -4]
> > tests/TestClient.cc:1314: Assertion: equality assertion failed [Expected:
> > 0, Actual  : -4]
> > tests/TestClient.cc:1373: Assertion: equality assertion failed [Expected:
> > 0, Actual  : -4]
> > tests/TestReadOnlyClient.cc:75: Assertion: assertion failed [Expression:
> > system(cmd) == 0]
> > Failures !!!
> > Run: 76   Failure total: 32   Failures: 32   Errors: 0
> > FAIL: zktest-mt
> > ==========================================
> > 1 of 2 tests failed
> > Please report to [email protected]
> > ==========================================
> > make[1]: *** [check-TESTS] Error 1
> > make[1]: Leaving directory
> > `/home/centos/apache-zookeeper-3.5.6/zookeeper-client/zookeeper-client-c'
> > make: *** [check-am] Error 2
> >
> >
> > Thank you,
> > Deepak
> >
> > On Wed, Oct 30, 2019 at 4:40 PM deepak <[email protected]> wrote:
> >
> >> Hi,
> >>
> >> I am trying to build and run the C client API tests on Linux and I'm
> >> getting the following error on both CentOS (7.5.1804) and Debian
> (stretch)
> >> machines.
> >>
> >> Could someone guide me in fixing this?
> >>
> >> [...snip...]
> >> Zookeeper_reconfig::testMigrationCycle : elapsed 0 : OK
> >> TestReconfigServer::testNonIncremental/usr/bin/java
> >> ZooKeeper JMX enabled by default
> >> Using config: ./../../build/test/test-cppunit/conf/0.conf
> >> Starting zookeeper ... FAILED TO START
> >> zktest-mt: tests/ZooKeeperQuorumServer.cc:67: void
> >> ZooKeeperQuorumServer::start(): Assertion `system(command.c_str()) == 0'
> >> failed.
> >> /bin/sh: line 5:  7539 Aborted                 ZKROOT=./../..
> >> CLASSPATH=$CLASSPATH:$CLOVER_HOME/lib/clover*.jar ${dir}$tst
> >> FAIL: zktest-mt
> >> ==========================================
> >> 1 of 2 tests failed
> >> Please report to [email protected]
> >> ==========================================
> >> make[1]: *** [check-TESTS] Error 1
> >> make[1]: Leaving directory
> >>
> `/home/centos/apache-zookeeper-3.5.6/zookeeper-client/zookeeper-client-c'
> >> make: *** [check-am] Error 2
> >>
>
>

Reply via email to