Christian Schoenebeck <[email protected]> writes:
> Hi,
>
> is there a QEMU policy for test cases that create/write/read/delete real
> files
> and directories? E.g. should they be situated at a certain location and is
> any
> measure of sandboxing required?
I don't think we have a hard and fast policy. It also depends on what
you are doing the test in - but ideally you should use a secure mktempd
(that can't clash) and clean-up after you are finished. This is a bit
easier in python than shell I think.
For example iotests end up in $BUILD_DIR/scratch (driven by TEST_DIR
being set somewhere) whereas the gdb stub tests use socket_dir =
TemporaryDirectory("qemu-gdbstub") which get auto-cleaned when it
finishes.
--
Alex Bennée