Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2011147rdh; Tue, 26 Sep 2023 09:37:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGxAa+hcvfpke3S46Sjz37iiAft5aXXDDQyc8qK1Jdu1IaIjoh/Tlj03cpbkTk9OYotP2tX X-Received: by 2002:a17:902:d2c5:b0:1c6:d70:144d with SMTP id n5-20020a170902d2c500b001c60d70144dmr7360912plc.34.1695746236619; Tue, 26 Sep 2023 09:37:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695746236; cv=none; d=google.com; s=arc-20160816; b=wtN9Y5L9HsCfE7IYyMUFJwdb4TjSBzxkzo2bdVnY+dcZoDo/SrDCxw6wTzxogKHCqq +7xYW1rpdrHf9qJoIeHWt4X2y7bpudMEJjJYxt7SM7AQczpyhkRnw/tcH4SGnz/lWjdc wnMFHFneDwj6ym6Tst9J/BGW9C8Yd2YXsM5An+mvLfOJ1p8EK0FY8aybuVmjzyNrlg0Z yQuwZLjdqm0zY9WVK479n18cFdw3oufJ/fifZziwGiCKb1FvC82aHzpYCzt+t86RSSwQ vw9XhUEjTEv7kKz5Ym9RiwU092uMU4yoBO6th5KlSaRPNhI7aqorqYZU1ZEFrZEstRF7 +/mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=cFOa8v6HmzDuwfUtqIaAE2BKKG96nSYmL5UwcSOkLOQ=; fh=6giXAyBLyak+p8LO/7Ia4FRUaG0RdEooPVAS5BewE0A=; b=ZjDciXRcZor4paq6QgKXgBRffUM36j1WvlXGlI9TBdf+id1IJwguoFleCgFjxNpHRF PFO/T8TFSsWm2XyeqX7zkYuFBblIQhubizCq9OtkfzixIf5tLV9UynvxyrHdv8oXNp8P BkuJpRiatRSB2YleMxuwZAjVib2eVEjIdSNeFj10o8Besve8BvncLCkhqQu03cG8cnLO BXfXTlSVxn/ASdFDefOuTXLPrNoJfiinAq6XvLc/Y6ds1mpG9dZQetIUrokQ8i5rIZ+g LmIO8L1lUH41voJsYKhpmcgsBctT/IiFQaPDyCMpnwRtgXgq7giJ/D1nInaaqbGotjzZ R9Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VFkrNJ6m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id b5-20020a170902d50500b001c611f28597si6884391plg.539.2023.09.26.09.37.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 09:37:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VFkrNJ6m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 3E6BF82A4A07; Tue, 26 Sep 2023 05:19:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234541AbjIZMTK (ORCPT + 99 others); Tue, 26 Sep 2023 08:19:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234560AbjIZMTI (ORCPT ); Tue, 26 Sep 2023 08:19:08 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70BEFEB for ; Tue, 26 Sep 2023 05:18:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695730700; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cFOa8v6HmzDuwfUtqIaAE2BKKG96nSYmL5UwcSOkLOQ=; b=VFkrNJ6mcKmO+5G6+YvMznqiUyMWirbxoR20w/QdDBlbrIR9AVIegdr3KcrY8BaTXan5qt vO39wlIMK/BFKMLB4Uv/qf2HdzP7iX+4PfZrRjEKKe0MyT2ACKW34k+Pq9WPWfmP1K7Wc9 ykAmGwv5DGz0DfZNG3Dmmb8M9VbCtMc= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-463-sYah3oPLMR63Rnk3t4ymVg-1; Tue, 26 Sep 2023 08:18:18 -0400 X-MC-Unique: sYah3oPLMR63Rnk3t4ymVg-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DBA521C06356; Tue, 26 Sep 2023 12:18:17 +0000 (UTC) Received: from [10.22.16.230] (unknown [10.22.16.230]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5442F492C37; Tue, 26 Sep 2023 12:18:17 +0000 (UTC) Message-ID: Date: Tue, 26 Sep 2023 08:18:17 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH] selftests/cgroup: Fix awk usage in test_cpuset_prs.sh that may cause error Content-Language: en-US To: Juntong Deng , lizefan.x@bytedance.com, tj@kernel.org, hannes@cmpxchg.org, shuah@kernel.org Cc: cgroups@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org References: From: Waiman Long In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Spam-Status: No, score=1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 26 Sep 2023 05:19:13 -0700 (PDT) X-Spam-Level: * On 9/25/23 15:38, Juntong Deng wrote: > According to the awk manual, the -e option does not need to be specified > in front of 'program' (unless you need to mix program-file). > > The redundant -e option can cause error when users use awk tools other > than gawk (for example, mawk does not support the -e option). > > Error Example: > awk: not an option: -e > Cgroup v2 mount point not found! > > Signed-off-by: Juntong Deng > --- > tools/testing/selftests/cgroup/test_cpuset_prs.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/cgroup/test_cpuset_prs.sh b/tools/testing/selftests/cgroup/test_cpuset_prs.sh > index 4afb132e4e4f..6820653e8432 100755 > --- a/tools/testing/selftests/cgroup/test_cpuset_prs.sh > +++ b/tools/testing/selftests/cgroup/test_cpuset_prs.sh > @@ -20,7 +20,7 @@ skip_test() { > WAIT_INOTIFY=$(cd $(dirname $0); pwd)/wait_inotify > > # Find cgroup v2 mount point > -CGROUP2=$(mount -t cgroup2 | head -1 | awk -e '{print $3}') > +CGROUP2=$(mount -t cgroup2 | head -1 | awk '{print $3}') > [[ -n "$CGROUP2" ]] || skip_test "Cgroup v2 mount point not found!" > > CPUS=$(lscpu | grep "^CPU(s):" | sed -e "s/.*:[[:space:]]*//") Yes, the -e option is redundant. Thanks for catching that. Acked-by: Waiman Long