[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, 22 Aug 2017 22:00:00 +0800 |
User-agent: |
Mutt/1.8.3 (2017-05-23) |
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?
>
> > + "--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.
Fam
[Qemu-devel] [PATCH v3 04/10] tests: Add ubuntu.i386 image, Fam Zheng, 2017/08/22
[Qemu-devel] [PATCH v3 05/10] tests: Add FreeBSD image, Fam Zheng, 2017/08/22
[Qemu-devel] [PATCH v3 06/10] tests: Add NetBSD image, Fam Zheng, 2017/08/22