aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorChristian Schoenebeck <qemu_oss@crudebyte.com>2020-11-01 15:37:12 +0100
committerChristian Schoenebeck <qemu_oss@crudebyte.com>2020-11-01 19:44:29 +0100
commit136b7af22774a6f0fb44c9c1b8c088b52e2e92ed (patch)
tree06c382a3573418b693bc98b0ab1dbfc0eeea3441 /linux-user
parent8db193c4108e09996923a4d716b51fc98efb7f3a (diff)
downloadqemu-136b7af22774a6f0fb44c9c1b8c088b52e2e92ed.zip
qemu-136b7af22774a6f0fb44c9c1b8c088b52e2e92ed.tar.gz
qemu-136b7af22774a6f0fb44c9c1b8c088b52e2e92ed.tar.bz2
tests/9pfs: fix test dir for parallel tests
Use mkdtemp() to generate a unique directory for the 9p 'local' tests. This fixes occasional 9p test failures when running 'make check -jN' if QEMU was compiled for multiple target architectures, because the individual architecture's test suites would run in parallel and interfere with each other's data as the test directory was previously hard coded and hence the same directory was used by all of them simultaniously. This also requires a change how the test directory is created and deleted: As the test path is now randomized and virtio_9p_register_nodes() being called in a somewhat undeterministic way, that's no longer an appropriate place to create and remove the test directory. Use a constructor and destructor function for creating and removing the test directory instead. Unfortunately libqos currently does not support setup/teardown callbacks to handle this more cleanly. The constructor functions needs to be in virtio-9p-test.c, not in virtio-9p.c, because in the latter location it would cause all apps that link to libqos (i.e. entirely unrelated test suites) to create a 9pfs test directory as well, which would even break other test suites. Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com> Reviewed-by: Greg Kurz <groug@kaod.org> Tested-by: Greg Kurz <groug@kaod.org> Message-Id: <7746f42d8f557593898d3d9d8e57c46e872dfb4f.1604243521.git.qemu_oss@crudebyte.com> Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Diffstat (limited to 'linux-user')
0 files changed, 0 insertions, 0 deletions