From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH RFC 2/9] ts-unixbench-prep: prep the environment for running unixbench Date: Wed, 16 Jul 2014 18:07:06 +0200 Message-ID: <1405526826.5333.109.camel@Solace> References: <20140626124540.20110.24159.stgit@Solace> <20140626130229.20110.53073.stgit@Solace> <1405523380.1087.14.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2510901228685614736==" Return-path: In-Reply-To: <1405523380.1087.14.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Ian.Jackson@citrix.com, Stefano Stabellini , Wei Liu , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --===============2510901228685614736== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-jj29Up/64SDV6AkaP9+z" --=-jj29Up/64SDV6AkaP9+z Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On mer, 2014-07-16 at 16:09 +0100, Ian Campbell wrote: > > --- > > ts-unixbench-prep | 79 +++++++++++++++++++++++++++++++++++++++++++++= ++++++++ > > 1 file changed, 79 insertions(+) > > create mode 100755 ts-unixbench-prep > >=20 > > diff --git a/ts-unixbench-prep b/ts-unixbench-prep > > new file mode 100755 > > index 0000000..607d1a8 > > --- /dev/null > > +++ b/ts-unixbench-prep > > @@ -0,0 +1,79 @@ > > +#!/usr/bin/perl -w > > +# This is part of "osstest", an automated testing framework for Xen. > > +# Copyright (C) 2009-2013 Citrix Inc. >=20 > Out of date. >=20 Oops. :-) > > +tsreadconfig(); > > + > > +# what we expect as argument list is: > > +# host=3D [] > > +our $ho=3D selecthost($ARGV[0]); shift @ARGV; >=20 > IIRC Ian just made select* consume ARGV, so the shift wouldn't be needed > any more. >=20 Yeah, I saw it. I'll build on top of that as far as it will hit the repo. > > +our $gho=3D $ho; > > +if ( (0+@ARGV) =3D=3D 1) { >=20 > Is the 0+ needed, I thought arrays in scalar context evaluated to their > length already without forcing it like that. >=20 Ehm, my Perl-fu is still very poor. ISTR trying and having some issues, but yeah, I'll give it another shoot at doing things properly. Sorry :-) > > +given ($ext) { > > + $extract_cmd=3D 'xf' when ('.tar'); > > + $extract_cmd=3D 'zxf' when ['.tgz', '.gzip']; > > + $extract_cmd=3D 'jxf' when ['.tbz2', '.bz2']; > > + default { die "unrecognised file extension $ext" } >=20 > I think "xaf" will automatically handle different compression algs. I'm > just not quite sure what it does if the tarball is uncompressed. >=20 Oh, I did not know that, I'll give it a try. About the uncompressed tarball case, I don't think we should worry much about being too flexible here. Perhaps what I was trying to do above is already too much. I mean, we expect the file to have a specific name, and to be in a specific place already, we can well ask for it to be compressed, and bail if it is not. What do you think? > > +} > > + > > +# Prepare the target, by installing dependencies, and build the benchm= ark > > +target_install_packages_norec($gho, qw(build-essential libx11-dev > > + libgl1-mesa-dev libxext-dev > > + x11-apps)); > > +target_cmd_root($gho, < > + set -ex > > + rm -rf /root/unixbench/ >=20 > Ideally you would use the osstest user. I'm not sure if that is set up > for guests though, might be host only. >=20 I don't recall that either, and I'll check. There are benchmarks, though, that wants to run as root... I guess that is not a big deal, at least for guests, is it? For hosts, I see it could be a bigger issue... Thanks again and Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-jj29Up/64SDV6AkaP9+z Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlPGoysACgkQk4XaBE3IOsQQggCeNkMYldmo/O3nxVLUimWiJh5+ mHAAoKKCsB90e6XHrzeHuW8LrE1lXo5/ =9ZCg -----END PGP SIGNATURE----- --=-jj29Up/64SDV6AkaP9+z-- --===============2510901228685614736== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============2510901228685614736==--