Skip to content

Commit bbb22d4

Browse files
slpandreeaflorescu
authored andcommitted
Fix test_queue_guard_object on s390x
Stores to the MockSplitQueue require endianess conversion. Add them where missing. Signed-off-by: Sergio Lopez <slp@redhat.com>
1 parent bf4c355 commit bbb22d4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crates/virtio-queue/src/queue_guard.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,11 @@ mod tests {
231231
vq.desc_table().store(i, desc);
232232
}
233233

234-
vq.avail().ring().ref_at(0).store(0);
235-
vq.avail().ring().ref_at(1).store(2);
236-
vq.avail().ring().ref_at(2).store(5);
234+
vq.avail().ring().ref_at(0).store(u16::to_le(0));
235+
vq.avail().ring().ref_at(1).store(u16::to_le(2));
236+
vq.avail().ring().ref_at(2).store(u16::to_le(5));
237237
// Let the device know it can consume chains with the index < 2.
238-
vq.avail().idx().store(3);
238+
vq.avail().idx().store(u16::to_le(3));
239239
// No descriptor chains are consumed at this point.
240240
assert_eq!(g.next_avail(), 0);
241241
assert_eq!(g.next_used(), 0);

0 commit comments

Comments
 (0)