From: Christian Schoenebeck <qemu_oss@crudebyte.com>
To: qemu-devel@nongnu.org
Cc: "Thomas Huth" <thuth@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Kevin Wolf" <kwolf@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Laurent Vivier" <lvivier@redhat.com>,
"Greg Kurz" <groug@kaod.org>, "Max Reitz" <mreitz@redhat.com>
Subject: Re: QEMU policy for real file tests
Date: Thu, 17 Sep 2020 14:06:33 +0200 [thread overview]
Message-ID: <2029663.ApTj1TM13Z@silver> (raw)
In-Reply-To: <8e3f59a3-925e-d89f-2073-6c9654bff75f@redhat.com>
On Donnerstag, 17. September 2020 11:55:00 CEST Thomas Huth wrote:
> On 17/09/2020 11.37, Daniel P. Berrangé wrote:
> > On Thu, Sep 17, 2020 at 10:26:36AM +0100, Alex Bennée wrote:
> >> Christian Schoenebeck <qemu_oss@crudebyte.com> 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.
> >
> > mktempd will end up on /tmp usually which can be tmpfs and size limited,
> > so be mindful of the size of files you create. Don't assume you can
> > create multi-GB sized files ! Creating a temp dir underneath the build
> > dir (effectively CWD of the test) is a reasonable alternative.
>
> Another thing to consider: If you want to create Unix sockets in your
> tests, make sure that the file name does not get too long, since there
> are limits on certain systems - i.e. socket files should be created in a
> /tmp subdirectory, indeed.
>
> Thomas
These answers already cover everything I need right now. Thanks!
Final question: if at some later point one large file needs to be created for
some test case, is there some approximate size limit to stay below for not
causing issues with free CI cloud services?
Best regards,
Christian Schoenebeck
next prev parent reply other threads:[~2020-09-17 12:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-17 8:50 QEMU policy for real file tests Christian Schoenebeck
2020-09-17 9:26 ` Alex Bennée
2020-09-17 9:37 ` Daniel P. Berrangé
2020-09-17 9:55 ` Thomas Huth
2020-09-17 12:06 ` Christian Schoenebeck [this message]
2020-09-17 12:24 ` Daniel P. Berrangé
2020-09-17 12:40 ` Peter Maydell
2020-09-17 13:04 ` Thomas Huth
2020-09-17 13:11 ` Peter Maydell
2020-09-17 14:04 ` Christian Schoenebeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2029663.ApTj1TM13Z@silver \
--to=qemu_oss@crudebyte.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=groug@kaod.org \
--cc=kwolf@redhat.com \
--cc=lvivier@redhat.com \
--cc=mreitz@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).