Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1846363ybz; Thu, 23 Apr 2020 07:03:56 -0700 (PDT) X-Google-Smtp-Source: APiQypIRx5lQsiPhvq2FJpPahCVeAOQAFPmAlvKxlEvWFUsRH4M/6KPTn5akNZ4k2DbVkdMMaqKd X-Received: by 2002:a17:906:57d7:: with SMTP id u23mr2527355ejr.354.1587650636210; Thu, 23 Apr 2020 07:03:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587650636; cv=none; d=google.com; s=arc-20160816; b=Zn9FyQkedf1aSHZ3YVibe7alxwheKOaperEnkcne2fVIgvjuO2WmuNhSYvEkF9Z6TN KJvA90o/TMEKFEQCq8hpZB8dFFvk8eMPNh0OXQC+vAFOLhW1b32qf1DHRhTpuPGGA3Cp 5NIcOooOj2vGzXZZqnXyFfop1YqM+aDROt1nV2KxSTrmTLdESLykLTFSaoKNmIQjdstQ eG3G/+Z1sMd1ggKcv7WZLPgSVo0sN6h+7L+H7dqLs+BzBkmpK9DijqVB8+EPXJdro4p1 c4uA5OzRyPxJ5g7oNG7zK+qGn0KwzUIfIcDFmnxvMqi5a1TqXg/DisZk6MJkdZZg5L3p //ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=fWoPh1RcOCCX55TwDPH9/kRfVbasvFbEjZucZpZHZug=; b=nwePSJyIB87Y8LIyOSY7+cUFxFwFoShAAhVLHpMU0DukKXWvFtKbcY1ZEQ9BAxh51f wjETXTb1oRCJ8aLh6gKm1m7dNhfx9b1wCvdDRlikKLk3D7OHfD1PuVa5/uRI5BhaC3cy mkwD0D7NOPdWRLRsLvoHHrbaaGEWieBr4Xq687Hr2KEVsIfzEnUHRViNCJQEGHppXO12 BfLbuFAJbqAW35vbr9PIZr3g0bo38K3Wsw7dDFDsoO2BHCegXPDQbG+eJkv2U+ySIi57 dTqRxN4oS7X4qtD0X5/D7sdmIw93Tbvb7ZYFHd+Qy0FCVeP3jRMAiKMKlSr9yoYZYv6X zacA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VwLY+oVB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c3si1217859edx.91.2020.04.23.07.03.26; Thu, 23 Apr 2020 07:03:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VwLY+oVB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726387AbgDWMRX (ORCPT + 99 others); Thu, 23 Apr 2020 08:17:23 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:31436 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726056AbgDWMRW (ORCPT ); Thu, 23 Apr 2020 08:17:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587644241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fWoPh1RcOCCX55TwDPH9/kRfVbasvFbEjZucZpZHZug=; b=VwLY+oVB+7rSsK4j7cHKZA4L3U4HzvFqiodEs+rQC4qApv781VCq3KVfzyuAw5lmITHeau xSp0dneQFBrZ50B0dj+TRVemimgrrChjgI7YByjnvnysxhD37DWf8r6VT4zpay/pXzRSS1 3yS/vX/DQUJmD1P7d46DE+3LhrcCayc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-451-ZpQyGlQKPIOL8KVuunTQhg-1; Thu, 23 Apr 2020 08:17:17 -0400 X-MC-Unique: ZpQyGlQKPIOL8KVuunTQhg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CBD1619057AF; Thu, 23 Apr 2020 12:17:15 +0000 (UTC) Received: from krava (ovpn-115-157.ams2.redhat.com [10.36.115.157]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6EA275C1BD; Thu, 23 Apr 2020 12:17:13 +0000 (UTC) Date: Thu, 23 Apr 2020 14:17:10 +0200 From: Jiri Olsa To: Tommi Rantala Cc: Arnaldo Carvalho de Melo , Ingo Molnar , Peter Zijlstra , Mark Rutland , Alexander Shishkin , Namhyung Kim , Ravi Bangoria , Mamatha Inamdar , linux-kernel@vger.kernel.org Subject: Re: [PATCH] perf test session topology: Fix data path Message-ID: <20200423121710.GM1136647@krava> References: <20200423115341.562782-1-tommi.t.rantala@nokia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200423115341.562782-1-tommi.t.rantala@nokia.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 23, 2020 at 02:53:40PM +0300, Tommi Rantala wrote: > Commit 2d4f27999b88 ("perf data: Add global path holder") missed path > conversion in tests/topology.c, causing the "Session topology" testcase > to "hang" (waits forever for input from stdin) when doing "ssh $VM perf > test". > > Can be reproduced by running "cat | perf test topo", and crashed by > replacing cat with true: > > $ true | perf test -v topo > 40: Session topology : > --- start --- > test child forked, pid 3638 > templ file: /tmp/perf-test-QPvAch > incompatible file format > incompatible file format (rerun with -v to learn more) > free(): invalid pointer > test child interrupted > ---- end ---- > Session topology: FAILED! > > Fixes: 2d4f27999b88 ("perf data: Add global path holder") > Signed-off-by: Tommi Rantala Acked-by: Jiri Olsa thanks, jirka > --- > tools/perf/tests/topology.c | 12 ++++-------- > 1 file changed, 4 insertions(+), 8 deletions(-) > > diff --git a/tools/perf/tests/topology.c b/tools/perf/tests/topology.c > index 4a800499d7c3..22daf2bdf5fa 100644 > --- a/tools/perf/tests/topology.c > +++ b/tools/perf/tests/topology.c > @@ -33,10 +33,8 @@ static int session_write_header(char *path) > { > struct perf_session *session; > struct perf_data data = { > - .file = { > - .path = path, > - }, > - .mode = PERF_DATA_MODE_WRITE, > + .path = path, > + .mode = PERF_DATA_MODE_WRITE, > }; > > session = perf_session__new(&data, false, NULL); > @@ -63,10 +61,8 @@ static int check_cpu_topology(char *path, struct perf_cpu_map *map) > { > struct perf_session *session; > struct perf_data data = { > - .file = { > - .path = path, > - }, > - .mode = PERF_DATA_MODE_READ, > + .path = path, > + .mode = PERF_DATA_MODE_READ, > }; > int i; > > -- > 2.25.3 >