From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48066) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dn2pZ-00041t-QM for qemu-devel@nongnu.org; Wed, 30 Aug 2017 09:14:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dn2pU-0007vb-OJ for qemu-devel@nongnu.org; Wed, 30 Aug 2017 09:14:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47932) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dn2pU-0007vM-Fb for qemu-devel@nongnu.org; Wed, 30 Aug 2017 09:14:48 -0400 Date: Wed, 30 Aug 2017 21:14:41 +0800 From: Fam Zheng Message-ID: <20170830131441.GB8076@lemon.lan> References: <20170828174707.20786-1-famz@redhat.com> <20170828174707.20786-4-famz@redhat.com> <20170830101658.GN4208@lemon.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20170830101658.GN4208@lemon.lan> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v4 03/10] tests: Add vm test lib List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= Cc: Peter Maydell , qemu-devel@nongnu.org, Kamil Rytarowski , stefanha@redhat.com, Cleber Rosa , pbonzini@redhat.com, Kamil Rytarowski , Alex =?iso-8859-1?Q?Benn=E9e?= On Wed, 08/30 18:16, Fam Zheng wrote: > On Tue, 08/29 10:35, Philippe Mathieu-Daud=E9 wrote: > > On 08/29/2017 10:22 AM, Kamil Rytarowski wrote: > > > On 29.08.2017 15:10, Philippe Mathieu-Daud=E9 wrote: > > > > Hi Fam, Kamil, > > > >=20 > > > > > On 08/28/2017 02:47 PM, Fam Zheng wrote: > > > > [...] > > > > > > + subprocess.check_call([tar_cmd, > > > > > > + "--exclude-vcs", > > > > > > + "--exclude=3Dtests/vm/*.img", > > > > > > + "--exclude=3Dtests/vm/*.img.*= ", > > > > > > + "--exclude=3D*.d", > > > > > > + "--exclude=3D*.o", > > > > > > + "--exclude=3Ddocker-src.*", > > > > > > + "-cf", tarfile, '.'], cwd=3Dd= ata_dir, > > > > >=20 > > > > > I'm not happy with this command :/ > > > > > My distrib uses tmpfs for /tmp and suddently the whole X window= became > > > > > irresponsive until this script failing after filling 8G of /tmp= and swap: > > > > >=20 > > > > > ... > > > > > DEBUG:root:Creating archive /tmp/qemu-vm-F7CY9O/data-3a52c.tar = for > > > > > data dir: . > > > > > tar: /tmp/qemu-vm-F7CY9O/data-3a52c.tar: Wrote only 4096 of 102= 40 bytes > > > > > tar: Error is not recoverable: exiting now > > > > > Failed to prepare guest environment > > > > >=20 > > > > > Then I figured out my workdir is full of testing stuff, debug i= mages, > > > > > firmwares, coredumps, etc. > > > > >=20 > > > > > I'll think of another way. > > > >=20 > > > > Using: > > > >=20 > > > > (git ls-files; git submodule foreach --recursive "git ls-files | = sed > > > > s_^_\$sm_path/_" | sed /^Entering/d) > files.txt > > > >=20 > > > > and: > > > >=20 > > > > subprocess.check_call([tar_cmd, > > > > "-cf", tarfile, > > > > "-v" if self.debug else "", > > > > "-T", "files.txt"], cwd=3Ddata_di= r, > > > > stdin=3Dself._devnull, stdout=3Dse= lf._stdout) > > > >=20 > > > > Current /master and submodules generated tarball is ~305MB uncomp= ressed. > > > >=20 > > > > Kamil do you mind testing this command on NetBSD? > > > >=20 > > > > (obviously 'files.txt' goes in tmpdir). > > > >=20 > > >=20 > > > Result: > > >=20 > > > http://www.netbsd.org/~kamil/qemu/files.txt > >=20 > > \o/ > >=20 > > > I've tested this command line on a checkout from Jul 17th rev. 7703= 1ee1ce4c > >=20 > > Thanks Kamil :) > >=20 > > Fam are you OK using this command instead? >=20 > Looks good, will use it! Thanks. Hmm, there is a complication. "git ls-files" output includes submodule na= mes, which are directory names from the "tar -T" PoV, and the whole directory = is archived. I'm going to stop fighting on this and refactor the docker tests's "git a= rchive" rules, to reuse in this script. Fam