qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 03/10] tests: Add vm test lib


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH v3 03/10] tests: Add vm test lib
Date: Tue, 29 Aug 2017 01:18:27 +0800
User-agent: Mutt/1.8.3 (2017-05-23)

On Tue, 08/22 11:23, Philippe Mathieu-Daudé wrote:
> On 08/22/2017 11:00 AM, Fam Zheng wrote:
> > On Tue, 08/22 08:19, Philippe Mathieu-Daudé wrote:
> > > > +    def add_source_dir(self, data_dir):
> > > > +        name = "data-" + hashlib.sha1(data_dir).hexdigest()[:5]
> > > > +        tarfile = os.path.join(self._tmpdir, name + ".tar")
> > > > +        logging.debug("Creating archive %s for data dir: %s", tarfile, 
> > > > data_dir)
> > > > +        subprocess.check_call(["tar", "--exclude-vcs",
> > > 
> > > --exclude-vcs-ignores will process .gitignore,
> > 
> > Sounds useful, thanks!
> > 
> > > you can also list with 'git ls-files',
> > > or generate tarball with scripts/make-release
> > 
> > They won't handle submodules, will they?
> 
> "git ls-files --recurse-submodules"

Not good, I somehow hit an infinite erroneous output with
"--recurse-submodules":

$ git ls-files --recurse-submodules
...
pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/include/hw/timer/imx_epit.h
pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/include/hw/timer/imx_gpt.h
pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/include/hw/timer/m48t59.h
pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/include/hw/timer/mc146818rtc.h
pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/include/hw/timer/mc146818rtc_regs.h
pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/include/hw/timer/mips_gictimer.h
pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/include/hw/timer/stm32f2xx_timer.h
pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/pixman/include/hw^C

$ git version

2.13.5

So it's opted out.

So I'll add some detection code for gtar, use --exclude-vcs-ignores and call it 
a day.

Fam

> 
> This way you can avoid the --exclude-vcs-ignores which is too recent for
> NetBSD as remarked Kamil, and avoid the tar --exclude=
> 
> > > 
> > > > +                               "--exclude=tests/vm/*.img",
> > > > +                               "--exclude=tests/vm/*.img.*",
> > > > +                               "--exclude=*.d",
> > > > +                               "--exclude=*.o",
> > > > +                               "--exclude=docker-src.*",
> > > > +                               "-cf", tarfile, '.'], cwd=data_dir,
> > > > +                              stdin=self._devnull, stdout=self._stdout)
> > > > +        self._data_args += ["-drive",
> > > > +                            
> > > > "file=%s,if=none,id=%s,cache=writeback,format=raw" % \
> > > > +                                    (tarfile, name),
> > > > +                            "-device",
> > > > +                            
> > > > "virtio-blk,drive=%s,serial=%s,bootindex=1" % (name, name)]
> > > 
> > > what about mounting readonly via '-device virtio-9p-pci' (not using
> > > tarball)?
> > > 
> > 
> > It doesn't work. That way an out-of-tree build is required in the guest, 
> > but if
> > an in-tree build has been done in host side, out-of-tree builds fail.  Also 
> > the
> > performance will be much worse, I believe: untar is sequential read, and 
> > after
> > that everything is in the guest page cache; with virtio-9p, there will be a
> > large amount of "random" requests between guest and host.
> 
> Indeed you are correct, I didn't think of it, thank to remember me that :)



reply via email to

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