From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58880) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bw59k-0006re-78 for qemu-devel@nongnu.org; Mon, 17 Oct 2016 06:28:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bw59h-0005F5-4N for qemu-devel@nongnu.org; Mon, 17 Oct 2016 06:28:32 -0400 Received: from 6.mo179.mail-out.ovh.net ([46.105.56.76]:55252) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bw59g-0005EL-UK for qemu-devel@nongnu.org; Mon, 17 Oct 2016 06:28:29 -0400 Received: from player792.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo179.mail-out.ovh.net (Postfix) with ESMTP id 172C1FF9F84 for ; Mon, 17 Oct 2016 12:28:26 +0200 (CEST) Date: Mon, 17 Oct 2016 12:28:20 +0200 From: Greg Kurz Message-ID: <20161017122820.75f9b950@bahia> In-Reply-To: References: <1476262058-13936-1-git-send-email-stefanha@redhat.com> <1476262058-13936-20-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL v2 19/20] trace: introduce a formal group name for trace events List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Stefan Hajnoczi , qemu-devel@nongnu.org, Peter Maydell On Thu, 13 Oct 2016 15:58:55 +0200 Paolo Bonzini wrote: > On 12/10/2016 10:47, Stefan Hajnoczi wrote: > > +def make_group_name(filename): > > + dirname = os.path.realpath(os.path.dirname(filename)) > > + basedir = os.path.join(os.path.dirname(__file__), os.pardir) > > + basedir = os.path.realpath(os.path.abspath(basedir)) > > + dirname = dirname[len(basedir) + 1:] > > + > > + if dirname == "": > > + return "common" > > + return re.sub(r"/|-", "_", dirname) > > > > The group is based on the build directory, so it includes the relative > path from srcdir to builddir. My build directory is weird ("+build") > and breaks because of this. Since the group is not really used for > anything yet, perhaps this patch could be reverted? > > Paolo > As pointed out in other mails, the real problem isn't even about ending up with weird characters in the group name, but about including the build directory itself... -- Greg