Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp369932imw; Thu, 14 Jul 2022 02:58:54 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ttxl9oTNy+o/0sTaZyzw8EEX9fjiDYE61+JEsRnHEfY10hXAMmBLXJcnDcINVAFBduHV6O X-Received: by 2002:a17:90a:6c65:b0:1ef:9479:372c with SMTP id x92-20020a17090a6c6500b001ef9479372cmr8747755pjj.21.1657792734399; Thu, 14 Jul 2022 02:58:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657792734; cv=none; d=google.com; s=arc-20160816; b=HdcGxcXvcgTa2B94o4rdvBpclZpWxUZi3VVtNynmTmjdMkpfwwrTEo8KyzJPSwgfT0 e4ThXuTkLO12n33OnUAuC3Tr4KTcksZzljL+s5WXLpuPijTL8Rs8oPMhwpwTmoFujoH4 zFLngVaO/q18MDZrELKD/CUSA2zLnhBkjBivS2J44/CrgbjS8W+xEcxNHeshLCBQwxeh +ZJSkUh0batuzz5nj8bPeSiP0Db0wJmUQxexw9Bu6mL4xa1Bdgw2yq2A5jbv3JGRk2ek lfQes5aNKaH3Z7mzUgR2ZbLQjADUhlniKI8akaT7k6KiZS/NZJhdN1egMwtyWbm4G2HY FeFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:reply-to :in-reply-to:references:mime-version:dkim-signature; bh=X6mRQhVSO5biAw/mXo/QUbT/IuLAZ3fsxf8wWVobTxs=; b=Ko0E46BwlZY73fD+rkm/Z+IX4/prtZNgR9feC2RIWlkGQcP072Sc6684lTwK0qMQs+ HAF7NEkXTgeIKtUvcT5EsJUqM4TLat8Y8MbAtt74wQbdtMSt1WL0Kir9nq2f31KMJ0t+ LrNStn0mCTm4FHogvQ0ky8u9iddBcuBAclKBttDqtXThX+kmrfNMCEa+KOOYEOhl4htS /yTqmPOOM90p7iXj/Kzy0nsilDtIzw94ZfciZAc+3jPkRGZRUMpCke2rYuDBRk1cBode NTkM18rxPX9JV/LXReCIx+28HeB7sG9wzR5EU7+zADs2mAi56pXDvdQUjrItU3i64WWI Qe7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=AQnv6bm+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b69-20020a633448000000b004199530ec47si769148pga.111.2022.07.14.02.58.41; Thu, 14 Jul 2022 02:58:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=AQnv6bm+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237147AbiGNJye (ORCPT + 99 others); Thu, 14 Jul 2022 05:54:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230233AbiGNJyb (ORCPT ); Thu, 14 Jul 2022 05:54:31 -0400 Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1666D474D6; Thu, 14 Jul 2022 02:54:29 -0700 (PDT) Received: by mail-ot1-x335.google.com with SMTP id n12-20020a9d64cc000000b00616ebd87fc4so812529otl.7; Thu, 14 Jul 2022 02:54:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=X6mRQhVSO5biAw/mXo/QUbT/IuLAZ3fsxf8wWVobTxs=; b=AQnv6bm+0RwEPxeMJug4uEWaTRQiB0TwNLNvn064FDpcLOaCD7gKOtUp2lGAUZ8ovR 8+nyQ4Wpoh8hX89wInzJ/Ngb3qpI8TFVg/00WU5gkOmP2pFKtT5xH1ON+91sMuY1YJ6A MBIXVvbH1piz14eP0epeaRwlmHnxnrBxhZyy+uIDP9jtcgKXXZo2f/1tkqkjWGUN2SPm GD8VGIP4mpyKeSXaWnh07C6PqEeaCoaZfyiDKNcvijDGN+H3PlKnVWnkeoRKJTHxUc70 0e/h59bCxQs1fXsMnMzCtI6xlaESD7rBWwx9ppLsj17AniqJci633w87ueJIyo/nFG2V jRAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=X6mRQhVSO5biAw/mXo/QUbT/IuLAZ3fsxf8wWVobTxs=; b=ZP/agJIPxUG2WzzCTzxpnwF+ew6s/MSJSsujxxTXYQ53BC14Kp+gfRyMKet/D9jLr+ rfiROI5TyC+uDQMKnb07qLvlSxxfXOQ02Mzwo7Cxc9C2hPI56NhLsWAol4loCRXB5mvw GmCCOEApHWu0dJ7hCLjqchqN4Re2zseAMcHZikJ1oRo4OxwCcNCQcTd5I7gwtZ+SSM3h aKPqtbpobvSlgkdxk2+SG3TWIULC3doigPsvLwOgrBW+0V9o6Zau37ktaBgyoPB+DWDS DPPDa1ZsuOpKh+sLQayfaYKW8LK2jJTrfOCA7sbpUqZsygd4HX5y2yqsSx5L1zt0FeoH w1Og== X-Gm-Message-State: AJIora8tifyIFmMCxjIp/xpoVIeFxsaLmuKL1H27RlW/QevAFfDqf5r9 /quwEhZJX6lMMNInZ1ylUhW6wsaqDUXunC8HLWjUIFE7WWOW/g== X-Received: by 2002:a05:6830:3686:b0:61c:4a56:5c8b with SMTP id bk6-20020a056830368600b0061c4a565c8bmr3111730otb.49.1657792468382; Thu, 14 Jul 2022 02:54:28 -0700 (PDT) MIME-Version: 1.0 References: <870c02d4d97a921f02a31fa3b229fc549af61a20.1657747763.git.bristot@kernel.org> In-Reply-To: Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Thu, 14 Jul 2022 11:53:52 +0200 Message-ID: Subject: Re: [PATCH V2] rtla: Fix Makefile when called from -C tools/ To: Daniel Bristot de Oliveira Cc: linux-kernel@vger.kernel.org, linux-trace-devel@vger.kernel.org, Steven Rostedt Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 14, 2022 at 11:07 AM Sedat Dilek wrote: > > On Wed, Jul 13, 2022 at 11:32 PM Daniel Bristot de Oliveira > wrote: > > > > Sedat Dilek reported an error on rtla Makefile when running: > > > > $ make -C tools/ clean > > [...] > > make[2]: Entering directory > > '/home/dileks/src/linux-kernel/git/tools/tracing/rtla' > > [...] > > '/home/dileks/src/linux-kernel/git/Documentation/tools/rtla' > > /bin/sh: 1: test: rtla-make[2]:: unexpected operator <------ The problem > > rm: cannot remove '/home/dileks/src/linux-kernel/git': Is a directory > > make[2]: *** [Makefile:120: clean] Error 1 > > make[2]: Leaving directory > > > > This occurred because the rtla calls kernel's Makefile to get the > > version in silence mode, e.g., > > > > $ make -sC ../../.. kernelversion > > 5.19.0-rc4 > > > > But the -s is being ignored when rtla's makefile is called indirectly, > > so the output looks like this: > > > > $ make -C ../../.. kernelversion > > make: Entering directory '/root/linux' > > 5.19.0-rc4 > > make: Leaving directory '/root/linux' > > > > Using 'grep -v make' avoids this problem, e.g., > > > > $ make -C ../../.. kernelversion | grep -v make > > 5.19.0-rc4 > > > > Thus, add | grep -v make. > > > > Cc: Steven Rostedt > > Fixes: 8619e32825fd ("rtla: Follow kernel version") > > Reported-by: Sedat Dilek > > Tested-by: Sedat Dilek > > Signed-off-by: Daniel Bristot de Oliveira > > --- > > Thanks for v2. > That looks good to me. > > Daniel, you are right that not passing -s to make-line will not show > the grep output. > > Formally and again my... > > Reported-by: Sedat Dilek > Tested-by: Sedat Dilek > Addendum: Subject? [PATCH V2] rtla: Fix Makefile when called from -C tools/ ...called from -C tools/ clean? -Sedat- > > > tools/tracing/rtla/Makefile | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tools/tracing/rtla/Makefile b/tools/tracing/rtla/Makefile > > index 3822f4ea5f49..1bea2d16d4c1 100644 > > --- a/tools/tracing/rtla/Makefile > > +++ b/tools/tracing/rtla/Makefile > > @@ -1,6 +1,6 @@ > > NAME := rtla > > # Follow the kernel version > > -VERSION := $(shell cat VERSION 2> /dev/null || make -sC ../../.. kernelversion) > > +VERSION := $(shell cat VERSION 2> /dev/null || make -sC ../../.. kernelversion | grep -v make) > > > > # From libtracefs: > > # Makefiles suck: This macro sets a default value of $(2) for the > > -- > > 2.32.0 > >