David Edmondson
b6489ac066
test-coroutine: Add rwlock downgrade test
Test that downgrading an rwlock does not result in a failure to
schedule coroutines queued on the rwlock.
The diagram associated with test_co_rwlock_downgrade() describes the
intended behaviour, but what was observed previously corresponds to:
| c1 | c2 | c3 | c4 |
|--------+------------+------------+----------|
| rdlock | | | |
| yield | | | |
| | wrlock | | |
| | <queued> | | |
| | | rdlock | |
| | | <queued> | |
| | | | wrlock |
| | | | <queued> |
| unlock | | | |
| yield | | | |
| | <dequeued> | | |
| | downgrade | | |
| | ... | | |
| | unlock | | |
| | | <dequeued> | |
| | | <queued> | |
This results in a failure...
ERROR:../tests/test-coroutine.c:369:test_co_rwlock_downgrade: assertion failed: (c3_done)
Bail out! ERROR:../tests/test-coroutine.c:369:test_co_rwlock_downgrade: assertion failed: (c3_done)
...as a result of the c3 coroutine failing to run to completion.
Signed-off-by: David Edmondson <david.edmondson@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 20210325112941.365238-7-pbonzini@redhat.com
Message-Id: <20210309144015.557477-5-david.edmondson@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2021-03-31 10:44:21 +01:00
..
2021-03-18 19:00:50 +00:00
2021-03-12 15:46:30 +01:00
2021-03-22 18:58:19 -04:00
2021-03-10 15:34:11 +00:00
2021-03-09 22:17:06 +01:00
2021-02-25 15:41:53 +01:00
2021-03-18 19:00:50 +00:00
2021-03-17 07:17:46 +00:00
2021-03-23 22:31:53 +01:00
2021-03-30 13:02:11 +02:00
2021-03-30 14:05:33 +01:00
2021-03-24 14:25:19 +00:00
2021-03-31 10:44:21 +01:00
2021-03-20 06:33:17 +01:00
2021-03-19 15:18:43 +01:00
2021-01-27 20:53:14 +01:00
2021-03-12 15:46:30 +01:00
2021-03-12 15:46:30 +01:00
2021-02-15 18:56:57 -05:00
2020-12-08 13:48:58 -05:00