Open Bug 1313809 (bogo-dtls) Opened 8 years ago Updated 3 months ago

[meta] Enable BoGo tests for DTLS

Categories

(NSS :: Test, defect, P3)

Tracking

(Not tracked)

People

(Reporter: jld, Unassigned)

References

(Depends on 5 open bugs)

Details

(Keywords: meta, Whiteboard: [nss-fx])

Attachments

(1 obsolete file)

I've been working on getting the DTLS BoGo tests to pass.  I have a rough draft of a translation from their framing protocol to an approximation of a UDP socket, and some tests actually pass, but:

1. There are enough failures that I suspect I still have bugs causing frame shift errors; need to investigate this more closely.

2. Timeouts are a problem.  My first attempt assumed that blocking I/O with explicit timeouts would work, but (and this seems to only be documented in a FIXME comment?) that's not supported.  So it has to be nonblocking, and dtlscon.c uses PR_IntervalNow in a few places to see if timeouts have expired, but if I actually sleep for the requested time then the Go test runner times out (and there are unexpected failures in cases where it doesn't time out, too).  I might need to modify the DTLS implementation to allow mocking the clock.  Alternately, on Linux or other ELF-based platforms, I could use symbol interposition and define a fake PR_IntervalNow in the shim executable, but that's not portable.

(Also, this is based on top of bug 1311688, so every incremental change to that patch has made me go resolve merge conflicts, but that should be almost done.)
Attached patch WIP (2016-10-31) (obsolete) — Splinter Review
Work in progress.  I tracked down the test failures to a bug in the test harness (https://boringssl-review.googlesource.com/#/c/11984/), but fixing that reveals more failures, and the timeout problem remains.  Also, there are known style violations in this patch; I can fix them when this gets closer to landable.
There are 16 tests that fail with timeouts if NSS handles timeout packets by actually sleeping and pass if sleeping is faked (with ELF symbol interposition on PR_IntervalNow and PR_Sleep), as expected.  But there are another 6 tests that still time out; those seem to be actual bugs where the two protocol state machines diverge and each expect the other to send the next packet.
Alias: bogo-dtls
Attachment #8806182 - Attachment is obsolete: true

(Belated mass unassign; I no longer work on NSS.)

Assignee: jld → nobody
Summary: Enable BoGo tests for DTLS → [meta] Enable BoGo tests for DTLS
Severity: normal → S3

Anna, can you have a look at this and determine if any action items are required please? : ) Thank you !

Severity: S3 → S4
Flags: needinfo?(nkulatova)
Priority: -- → P3
Whiteboard: [nss-fx]

It looks like there is still some work left to bring DTLS1.3 Bogo Tests.

Flags: needinfo?(nkulatova)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: