Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2074106ybp; Thu, 10 Oct 2019 01:43:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqyumxyJWeojKWymv68CPEcitiLq8QXx0XIKf3usN9yRa1OSjD1Ki5B5cqJCNM4qTK5u/s9j X-Received: by 2002:a05:6402:886:: with SMTP id e6mr7153543edy.152.1570696981353; Thu, 10 Oct 2019 01:43:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570696981; cv=none; d=google.com; s=arc-20160816; b=A4sSRnJSUOMN7jF7s4OXVS0xV5ZqXK6iu3xos6sY0KnvpFY/i3EeWgT80F/FuTwKfD 29qCUcZBT9U+3OHcgJP7gLn8rZFmYwpHin8BuYAfmNl78m9wQ0ZqPdy6Jkndr56SOr9o 4Dmi4xT93zPAIs1pdgHoaZmNoUN0yuRShM/jY7ZOV5Ie1M4+rBdzXvAe9jEiwbdX3ht+ ydYZcYz99xhQcP9WUOLUR80XruadOhE/o1yJ3Ssb5NXqfEbGRTb/C/h74tPQdwXu+xMD VO0De4VMZY72lsbDDG0h7uqwpBwwYiPeWNXruorDUMXxFvLvyzSlqUw3c2VVOHHySUxA uD+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LG31DIWmlaFMFBgYNCs1pNMc+2Uck7UnZxWfHNi14M0=; b=a8mD1K5QcyKLFKaCLm+KzoTpynd9aOoDFQrXCX4t1l/IowdQIQGjjr+q0nu3gSzJTh MbAFeAlPq4anopr2SHFH2jNOhCgRWJuJnhzVifQ/7AskSssN/hDsN9+Pc5FlMy4zPmaU VUrRr7SgfdFXszO10UWXzSPKKCNf4j+7at05md0Z1w/P2DSAlZBmYfFp9haZmZZCe0cE mkju7f5XJqK1NA2WU+7pfjO2vJcGQuCtuSiyFvcVUB0ggcHyKJgtNcEWzOxRgDRpZO6I NW5i2QED6qJMHS3a6vH1Bv9zoOuVmb2TB/CV40ipx0De2nt3jVzvRWB8YmQIBfCMao88 Q0+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KG5fIMQS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g20si3599455edb.149.2019.10.10.01.42.38; Thu, 10 Oct 2019 01:43:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KG5fIMQS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387634AbfJJIlN (ORCPT + 99 others); Thu, 10 Oct 2019 04:41:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:45516 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388275AbfJJIlL (ORCPT ); Thu, 10 Oct 2019 04:41:11 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6D90821D80; Thu, 10 Oct 2019 08:41:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570696870; bh=UFac5e5D1Otmrjuz4+CHUdFyycKp6DL19+o5YDGMP0Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KG5fIMQS6IE0vyOQ3b1n5EufLrY/0/bmwENrTL6xaj5fH3KQJnSfOXHTzSlenxjg8 BX5AloOGTqZDNNTlw3EGaojNFyT1KFV2e9k11QEbbos4IrVaA2d4DyUD08AhhUDGsz MXvmn4TAbp91Uet2vmqn3t9psv0sMxfJFn9pEuC8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tzvetomir Stoyanov , "Steven Rostedt (VMware)" , Alexander Shishkin , David Carrillo-Cisneros , He Kuang , Jiri Olsa , Michal rarek , Paul Turner , Peter Zijlstra , Stephane Eranian , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Wang Nan , Arnaldo Carvalho de Melo Subject: [PATCH 5.3 038/148] tools lib traceevent: Fix "robust" test of do_generate_dynamic_list_file Date: Thu, 10 Oct 2019 10:34:59 +0200 Message-Id: <20191010083613.461857258@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191010083609.660878383@linuxfoundation.org> References: <20191010083609.660878383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Steven Rostedt (VMware) commit 82a2f88458d70704be843961e10b5cef9a6e95d3 upstream. The tools/lib/traceevent/Makefile had a test added to it to detect a failure of the "nm" when making the dynamic list file (whatever that is). The problem is that the test sorts the values "U W w" and some versions of sort will place "w" ahead of "W" (even though it has a higher ASCII value, and break the test. Add 'tr "w" "W"' to merge the two and not worry about the ordering. Reported-by: Tzvetomir Stoyanov Signed-off-by: Steven Rostedt (VMware) Cc: Alexander Shishkin Cc: David Carrillo-Cisneros Cc: He Kuang Cc: Jiri Olsa Cc: Michal rarek Cc: Paul Turner Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Uwe Kleine-König Cc: Wang Nan Cc: stable@vger.kernel.org Fixes: 6467753d61399 ("tools lib traceevent: Robustify do_generate_dynamic_list_file") Link: http://lkml.kernel.org/r/20190805130150.25acfeb1@gandalf.local.home Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Greg Kroah-Hartman --- tools/lib/traceevent/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/tools/lib/traceevent/Makefile +++ b/tools/lib/traceevent/Makefile @@ -266,8 +266,8 @@ endef define do_generate_dynamic_list_file symbol_type=`$(NM) -u -D $1 | awk 'NF>1 {print $$1}' | \ - xargs echo "U W w" | tr ' ' '\n' | sort -u | xargs echo`;\ - if [ "$$symbol_type" = "U W w" ];then \ + xargs echo "U w W" | tr 'w ' 'W\n' | sort -u | xargs echo`;\ + if [ "$$symbol_type" = "U W" ];then \ (echo '{'; \ $(NM) -u -D $1 | awk 'NF>1 {print "\t"$$2";"}' | sort -u;\ echo '};'; \