Commit graph

4 commits

Author SHA1 Message Date
Laurent Pinchart
d9dac46e6f test: message: Add slow receiver test
There's a race in the message delivery against object deletion. Add a
test that triggers it reliably. This test is expected to fail with an
assertion error.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2019-11-27 19:30:48 +02:00
Laurent Pinchart
1f6342f46b test: message: Fix message handling in MessageReceiver
Forward messages that we don't handle to the base Object class, to avoid
both blocking the ThreadMove message and mistaking it as the test
message.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2019-11-27 19:30:48 +02:00
Jacopo Mondi
fae053307d libcamera: message: Add user message types
Reserve identifiers for user-defined message types and add an operation
to the Message class to register the type identifiers.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2019-07-16 10:55:27 +03:00
Laurent Pinchart
851eaeb9cd test: Add Message test case
The Message class test creates a receiver inheriting from Object, moves
it to a different thread, sends a message to the receiver and verifies
that the message is delivered in the correct thread.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2019-07-11 11:57:37 +03:00