Skip to content

iOS testbed doesn't reliably capture *all* log output #130294

Open
@freakboy3742

Description

@freakboy3742

Bug report

Bug description:

The iOS testbed captures test output by streaming the system log. It does this by running a log stream in parallel to the process that is running the test suite.

However, it takes time for this log stream to start; if the test suite finishes really quickly, it's possible no output will be captured at all. The test status will be accurately reported, because that's based on the return code of the process and is handled by Xcode; but in the case of a test failure, there won't be any log output that reports why the test failed.

Alternatively, if the test machine is busy and is generating lots of other log content, it will occasionally drop lines of output, as log stream will prioritizes currency of the log over completeness. These can be seen in iOS buildbot logs:

=== Messages dropped during live streaming (use `log show` to see what they were)

Ideally, we wouldn't lose any log output; however, this may not be possible given the constraints of iOS stdout logging.

As a workaround, it may be preferable to use log show after the completion of a test run to get a complete log. This will result in log output being output twice - an initial "live" log (which might contain dropped lines) to indicate test progress, and then a "complete" log that contains everything at the completion of the test run. This "complete" log can be generated with log show, which is guaranteed to produce a complete log. As the log is only truly useful in the case of a test failure, it might be desirable to only generate the complete log on test failure.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Other

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-iostype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions