tests: virtio-9p: move request tag to the test functions
commit693b21d2c7e54474017a4b45d36faa767279d4d4
authorGreg Kurz <groug@kaod.org>
Thu, 1 Feb 2018 20:21:27 +0000 (1 21:21 +0100)
committerGreg Kurz <groug@kaod.org>
Thu, 1 Feb 2018 20:21:27 +0000 (1 21:21 +0100)
treea5aecf998e4d8c96b63ef861981f31792ff36be0
parentfc78d5ee7622342699d9d9626c8df712f1486e07
tests: virtio-9p: move request tag to the test functions

It doesn't really makes sense to hide the request tag from the test
functions. It prevents to test the 9p server behavior when passed
a wrong tag (ie, still in use or different from P9_NOTAG for a
version request). Also the spec says that a tag is reusable as soon
as the corresponding request was replied or flushed: no need to
always increment tags like we do now. And finaly, an upcoming test
of the flush command will need to manipulate tags explicitely.

This simply changes all request functions to have a tag argument.
Except for the version request which needs P9_NOTAG, all other
tests can pass 0 since they wait for the reply before sending
another request.

Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
tests/virtio-9p-test.c