Log4cxx
  1. Log4cxx
  2. LOGCXX-142

socketservertestcase.cpp does not compile with Sun Studio 11 on Solaris

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.10.0
    • Component/s: Build
    • Labels:
      None
    • Environment:
      SunOS bid-dev24 5.8 Generic_117350-08 sun4u sparc SUNW,Sun-Fire-V240
      CC: Sun C++ 5.8 2005/10/13

      Description

      #include <sys/types.h>"
      #include <unistd.h>"

      must be added to
      tests/src/net/socketservertestcase.cpp

      to be able to find fork on Solaris.

        Activity

        Hide
        Curt Arnold added a comment -

        unistd.h does not appear to be available with VC6, so at least it would need to be guarded. It would be better if the test were rewritten to use apr_proc_fork or the apr_thread calls.

        Show
        Curt Arnold added a comment - unistd.h does not appear to be available with VC6, so at least it would need to be guarded. It would be better if the test were rewritten to use apr_proc_fork or the apr_thread calls.
        Hide
        Curt Arnold added a comment -

        Test case should be rewritten either using log4cxx's Thread or APR thread or fork calls.

        Show
        Curt Arnold added a comment - Test case should be rewritten either using log4cxx's Thread or APR thread or fork calls.
        Hide
        Curt Arnold added a comment -

        Committed rev 615217.

        Each test in SocketServerTestCase (which appears in both log4j and log4cxx) uses SocketAppender to write several events, launches a receiver to capture the transmitted events and relogs them to a file and then compares the file against a reference file.

        The test previously attempted to launch (using platform specific code) a native code receiver, however the native code receiver was stubbed during the Unicode switch and then deleted with the migration to a log4j compatible wire format.

        build.xml has been modified to add a "run-socketserver" target which will compile and launch a Java receiver and then run the native part of the test. This test is not part of "make check" since not all platforms will have a java compiler and JRE.

        The test did uncover a few issues with the implementation of SocketAppender and SocketHubAppender (loss of NDC and MDC, loss of location info) which are also fixed in the rev.

        Show
        Curt Arnold added a comment - Committed rev 615217. Each test in SocketServerTestCase (which appears in both log4j and log4cxx) uses SocketAppender to write several events, launches a receiver to capture the transmitted events and relogs them to a file and then compares the file against a reference file. The test previously attempted to launch (using platform specific code) a native code receiver, however the native code receiver was stubbed during the Unicode switch and then deleted with the migration to a log4j compatible wire format. build.xml has been modified to add a "run-socketserver" target which will compile and launch a Java receiver and then run the native part of the test. This test is not part of "make check" since not all platforms will have a java compiler and JRE. The test did uncover a few issues with the implementation of SocketAppender and SocketHubAppender (loss of NDC and MDC, loss of location info) which are also fixed in the rev.

          People

          • Assignee:
            Curt Arnold
            Reporter:
            Jostein Tveit
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development