qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 08/22] tests/functional: add helpers for building file paths


From: Daniel P . Berrangé
Subject: Re: [PATCH 08/22] tests/functional: add helpers for building file paths
Date: Tue, 3 Dec 2024 13:53:57 +0000
User-agent: Mutt/2.2.13 (2024-03-09)

On Mon, Dec 02, 2024 at 10:19:47AM +0100, Thomas Huth wrote:
> On 29/11/2024 18.31, Daniel P. Berrangé wrote:
> > Add helper methods that construct paths for
> > 
> >   * log files - to be preserved at the end of a test
> >   * scratch files - to be purged at the end of a test
> >   * build files - anything relative to the build root
> >   * data files - anything relative to the functional test source root
> >   * socket files - a short temporary dir to avoid UNIX socket limits
> > 
> > These are to be used instead of direct access to the self.workdir,
> > or self.logdir variables, or any other place where paths are built
> > manually.
> > 
> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > ---
> >   tests/functional/qemu_test/testcase.py | 86 ++++++++++++++++++++++++++
> >   1 file changed, 86 insertions(+)

> > +    '''
> > +    def log_file(self, *args):
> > +        return str(Path(self.logdir, *args))
> > +
> >       def setUp(self, bin_prefix):
> >           self.assertIsNotNone(self.qemu_bin, 'QEMU_TEST_QEMU_BINARY must 
> > be set')
> >           self.arch = self.qemu_bin.split('-')[-1]
> > +        self.socketdir = None
> 
> Should we also delete the socketdir during teardown again?

Yes, we should be purging this object and deleting the dir


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

[Prev in Thread] Current Thread [Next in Thread]