From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56682) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7JZ7-0004tx-Bk for qemu-devel@nongnu.org; Thu, 17 Nov 2016 05:05:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c7JZ3-0001lS-0e for qemu-devel@nongnu.org; Thu, 17 Nov 2016 05:05:08 -0500 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:36711) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c7JZ2-0001l9-Qb for qemu-devel@nongnu.org; Thu, 17 Nov 2016 05:05:04 -0500 Received: by mail-wm0-x243.google.com with SMTP id m203so19554550wma.3 for ; Thu, 17 Nov 2016 02:05:04 -0800 (PST) Date: Thu, 17 Nov 2016 10:05:01 +0000 From: Stefan Hajnoczi Message-ID: <20161117100501.GA24138@stefanha-x1.localdomain> References: <147648037766.14770.15179642645810274907.stgit@bahia> <20161018151646.GI12728@redhat.com> <20161018153124.GB15199@redhat.com> <20161018175200.48a2d3cc@bahia> <20161020142520.GB2733@stefanha-x1.localdomain> <20161117080738.GB2058@lemon> <20161117101026.77534496@bahia> <20161117093444.GC2058@lemon> <20161117104834.314dc73d@bahia> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vkogqOf2sHV7VnPd" Content-Disposition: inline In-Reply-To: <20161117104834.314dc73d@bahia> Subject: Re: [Qemu-devel] [PATCH] trace: fix group name generation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Greg Kurz Cc: Fam Zheng , Peter Maydell , qemu-devel@nongnu.org, Stefan Hajnoczi --vkogqOf2sHV7VnPd Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 17, 2016 at 10:48:34AM +0100, Greg Kurz wrote: > On Thu, 17 Nov 2016 17:34:44 +0800 > Fam Zheng wrote: >=20 > > On Thu, 11/17 10:10, Greg Kurz wrote: > > > On Thu, 17 Nov 2016 16:07:38 +0800 > > > Fam Zheng wrote: > > > =20 > > > > On Thu, 10/20 15:25, Stefan Hajnoczi wrote: =20 > > > > > >=20 > > > > > > I have two other patches ready to fix the current situation: > > > > > > - one using os.getcwd() to guess the build directory > > > > > > - one implementing --group as mentioned in my other mail > > > > > >=20 > > > > > > But the one that filters unwanted characters is a less intrusive > > > > > > workaround. =20 > > > > >=20 > > > > > If Dan's patches will eliminate the issue then we can take a work= around. > > > > >=20 > > > > > Any more comments about Greg's patch before I merge it? =20 > > > >=20 > > > > Should we include this in -rc1? I still see a build error today. > > > >=20 > > > > Fam > > > > =20 > > >=20 > > > Hi Fam, > > >=20 > > > My patch was partly superseded by this commit: > > >=20 > > > commit 630b210b9abbf362905a2096c22c5eb1d6224e77 > > > Author: Stefan Weil > > > Date: Thu Oct 13 20:29:30 2016 +0200 > > >=20 > > > Fix build for less common build directories names > > >=20 > > > which does: > > >=20 > > > - return re.sub(r"/|-", "_", dirname) > > > + return re.sub(r"[^A-Za-z0-9]", "_", dirname) > > >=20 > > > What is the build error you're hitting ? =20 > >=20 > > The substracted parts (basedir and dirname) are different paths for out= -of-tree > > build, and the "dirname" after the nonsense substraction as fed into re= =2Esub() > > could still start with a number. In my case the source is at > >=20 > > /var/tmp/aaa-qemu-clone > >=20 > > and the build dir is > >=20 > > /var/tmp/qemu-aio-poll-v2 > >=20 > > Then I get an error as: > >=20 > > trace/generated-tracers.c:15950:13: error: invalid suffix "_trace_event= s" on integer constant > > TraceEvent *2_trace_events[] =3D { > > ^ > > trace/generated-tracers.c:15950:13: error: expected identifier or =E2= =80=98(=E2=80=99 before numeric constant > > trace/generated-tracers.c: In function =E2=80=98trace_2_register_events= =E2=80=99: > > trace/generated-tracers.c:17949:32: error: invalid suffix "_trace_event= s" on integer constant > > trace_event_register_group(2_trace_events); > > ^ > > make: *** [trace/generated-tracers.o] Error 1 >=20 > My patch was addressing this as well... it is unfortunate it got dumped. = :-\ >=20 > I guess the following should be enough to fix your issue... but I'm no tr= acetool > expert and I cannot assure it doesn't break anything elsewhere... >=20 > - return re.sub(r"[^A-Za-z0-9]", "_", dirname) > + return "_" + re.sub(r"[^A-Za-z0-9]", "_", dirname) I think that will solve the problem for QEMU 2.8. Please send a patch. Thanks, Stefan --vkogqOf2sHV7VnPd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJYLYDNAAoJEJykq7OBq3PIABoH/jYVn6nHDW1C+qpeqHNpGM0M muxlCShhl4IpLHHBGJVCmuqqqceE3sbIgvbb0KZjQmUHwAKz0DM82xJWi8FlpDUt FmjoY0XR10ocszlmMLsNHSbouJYiDKgwTSZxw8niaZOHlHeGY25N6al4/s0rNXlk Ftx34pJ8cB0XRQ0BoLK0wj9QlSA9BFuTA6E/Sc7qDVlgUUSSz/NfUH5TFHSMTEAL nYrZW1qAYNbMqm3YqnpL5SWFwA2EKJb8iejrorYDKhh5FLXeHjdphqyBlbY0rx6d MV+YZIdDXePqAjvO9eppbKFj62K3igLmAJQLjB+d96PEDCJzoW0Q8sPhdJPym+0= =WWjq -----END PGP SIGNATURE----- --vkogqOf2sHV7VnPd--