Overview
Features
Download
Documentation
Community
Add-Ons & Services

SocketTest::testSelect2 failed on Red Hat Enterprise Linux

Please post support and help requests here.

SocketTest::testSelect2 failed on Red Hat Enterprise Linux

Postby wlipoco » 23 May 2013, 16:55

I hope this thread can get more attention possibely from dev since it is unit test failure which indicates something either seriously wrong or the unit test needs to be rewritten.

/home/dev/poco-1.4.6p1-all/Net/testsuite/bin/Linux/x86_64 > ./testrunnerd SocketTest

testEcho:
testPoll:
testAvailable:
testConnect:
testConnectRefused:
testConnectRefusedNB:
testNonBlocking:
testAddress:
testAssign:
testTimeout: original receive timeout: 0
requested receive timeout: 250000
actual receive timeout: 250000
original send timeout: 0
requested send timeout: 250000
actual send timeout: 250000

testBufferSize: original send buffer size: 16384
requested send buffer size: 32000
actual send buffer size: 64000
original recv buffer size: 87380
requested recv buffer size: 32000
actual recv buffer size: 64000

testOptions:
testSelect:
testSelect2: FAILURE
testSelect3:

!!!FAILURES!!!
Runs: 15 Failures: 1 Errors: 0

There was 1 failure:
1: N7CppUnit10TestCallerI10SocketTestEE.testSelect2
"writeList[0] == ss1"
in "src/SocketTest.cpp", line 441

OS:
cat /etc/redhat-release
Red Hat Enterprise Linux Client release 5.5 (Tikanga)

Kernel:
uname -a
Linux wuyli-lnx 2.6.18-194.8.1.el5 #1 SMP Wed Jun 23 10:52:51 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
SocketTest.cpp
429 char buffer[256];
430 int n = ss1.receiveBytes(buffer, sizeof(buffer));
431 assert (n == 5);
432
433 readList.clear();
434 writeList.clear();
435 exceptList.clear();
436 writeList.push_back(ss1);
437 writeList.push_back(ss2);
438 assert (Socket::select(readList, writeList, exceptList, timeout) == 2);
439 assert (readList.empty());
440 assert (writeList.size() == 2);
441 assert (writeList[0] == ss1); // fail
442 assert (writeList[1] == ss2); // fail

The test will pass if you change line 441 and 442 to the following.
441 assert (writeList[0] == ss2); // pass
442 assert (writeList[1] == ss1); // pass

Does Poco Net implementation expect the order of writeList the same before and after select call?

W.Li

p.s.
See General Discussion Ticket
http://pocoproject.org/forum/viewtopic.php?f=10&t=5884
wlipoco
 
Posts: 2
Joined: 23 May 2013, 00:39

Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron