Bug 53906 - make check failures testsockets testime test_exp_get_lt apr_mcast_hops
Summary: make check failures testsockets testime test_exp_get_lt apr_mcast_hops
Status: NEW
Alias: None
Product: APR
Classification: Unclassified
Component: APR (show other bugs)
Version: 1.7.0
Hardware: Other AIX
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache Portable Runtime bugs mailinglist
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-19 20:31 UTC by Michael Felt
Modified: 2019-10-03 15:22 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Felt 2012-09-19 20:31:58 UTC
running make check on AIX shows three test failures:

root@x104:[/data/prj/apr/apr-1.4.x/test]./testall -v testsock testsockets testtime       
testsock            : \Line 327: expected <0.0.0.0>, but saw <::ffff:0.0.0.0>
FAILED 1 of 9
testsockets         : -Line 135: Could not set multicast hops (22): Invalid argument

|Line 180: Condition is false, but expected true
FAILED 1 of 7
testtime            : /Line 146: Condition is false, but expected true
FAILED 1 of 13
Failed Tests            Total   Fail    Failed %
===================================================
testsock                    9      1     11.11%
testsockets                 7      1     14.29%
testtime                   13      1      7.69%
root@x104:[/data/prj/apr/apr-1.4.x/test]

Note: The testsock result has already been added to an open bug-report.

for testsockets:

in testsockets.c:

    rv = apr_mcast_hops(sock, 10);
    APR_ASSERT_SUCCESS(tc, "Could not set multicast hops", rv);
    if (rv != APR_SUCCESS)
        return;

If someone tells me what needs to be added to apr_mcast_hops() for debugging - happy to assist.

for testtime:

/* The time value is used throughout the tests, so just make this a global.
 * Also, we need a single value that we can test for the positive tests, so
 * I chose the number below, it corresponds to:
 *           2002-09-14 12:05:36.186711 -25200 [257 Sat].
 * Which happens to be when I wrote the new tests.
 */
static apr_time_t now = APR_INT64_C(1032030336186711);

...

static void test_exp_get_lt(abts_case *tc, void *data)
{
    apr_status_t rv;
    apr_time_exp_t xt;
    apr_time_t imp;
    apr_int64_t hr_off_64;

    rv = apr_time_exp_lt(&xt, now);
    ABTS_TRUE(tc, rv == APR_SUCCESS);
    rv = apr_time_exp_get(&imp, &xt);
    if (rv == APR_ENOTIMPL) {
        ABTS_NOT_IMPL(tc, "apr_time_exp_get");
    }
    ABTS_TRUE(tc, rv == APR_SUCCESS);
    hr_off_64 = (apr_int64_t) xt.tm_gmtoff * APR_USEC_PER_SEC;
    ABTS_TRUE(tc, now + hr_off_64 == imp); /* AIX "FAILS" */
}

And, what is needed here to understand what is wrong?
Comment 1 Michael Felt 2012-09-19 21:38:41 UTC
same errors with 1.5.x
root@x104:[/data/prj/apr/apr-1.5.x/test]./testall -v testsock testsockets testtime
testsock            : \Line 327: expected <0.0.0.0>, but saw <::ffff:0.0.0.0>
FAILED 1 of 9
testsockets         : -Line 135: Could not set multicast hops (22): Invalid argument

|Line 180: Condition is false, but expected true
FAILED 1 of 7
testtime            : /Line 146: Condition is false, but expected true
FAILED 1 of 13
Failed Tests            Total   Fail    Failed %
===================================================
testsock                    9      1     11.11%
testsockets                 7      1     14.29%
testtime                   13      1      7.69%
Comment 2 Michael Felt 2019-10-03 15:22:06 UTC
Update on the current status (apr-1.7.0)

testproc            : SUCCESS
testprocmutex       : /Line 206: default_timedlock() should time out => Connection timed out                                                                                                                                                                 |Line 206: sysvsem_timedlock() should time out => Connection timed out                                                                                                                                                                                        /Line 206: default_timed_timedlock() should time out => Connection timed out                                                                                                                                                                                  FAILED 3 of 6
testrand            : SUCCESS
testsleep           : SUCCESS
testshm             : SUCCESS
testsock            : |Line 389: expected something other than <0>, but saw <0>                                                                                                                                                                              |Line 433: Cannot test if connect completes synchronously                                                                                                                                                                                                     FAILED 1 of 17
testsockets         : SUCCESS
testsockopt         : |Line 84: TCP isn't corkable                                                                                                                                                                                                           SUCCESS
teststr             : SUCCESS
teststrnatcmp       : SUCCESS
testtable           : SUCCESS
testtemp            : SUCCESS
testthread          : SUCCESS
testtime            : SUCCESS
testud              : SUCCESS
testuser            : SUCCESS
testvsn             : SUCCESS
testskiplist        : SUCCESS
Failed Tests            Total   Fail    Failed %
===================================================
testprocmutex               6      3     50.00%
testsock                   17      1      5.88%

Willing to help dig deeper - but will need a bit of guidance

It appears the original test issues (sock, socket and time) have been resolved.
If you prefer - we (I.e., you) could close this - and ask me to open a new issue.

Or - change the title to "make test issues on AIX" to make the ticket more generic (even after a few years :) )