From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from va-1-111.ptr.blmpb.com (va-1-111.ptr.blmpb.com [209.127.230.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3A55C3A05FC for ; Sun, 9 Aug 2026 08:21:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.127.230.111 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786263711; cv=none; b=t+BRK4e93TBHUk665KmqzRxhVcTpRbq3lO0NUVaz9OludgU3AQT/7/YRDblasA694nHJogL5HfJnLSnIGAFU+AViTAeSflbKJwMFX/dZZcOq8PetdyAa9h4f5fPm/P6+9KZUmsEn0/tVNhNsnk+jEWqPFk8yBbsV7gAOn8YWJ4I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786263711; c=relaxed/simple; bh=6xga2Rem33SBu03y3gctGh9ND9hhWHOzbjuyhtOHQzo=; h=Message-Id:In-Reply-To:References:Content-Type:To:Cc:Subject: Mime-Version:Date:From; b=iY1V9Nfby2dOIiLP6LuaSd83dQOeMgyS605GJwOQliL9FT6MPl9Zn0mI+1yFuG8arjfQEmaoMN74pshrmNJQzBX7riE+kBwlx4UYdVnc2vvRjXbOlQP9+8uhIB87AFHTYQEzPco3s41Hg7I+2b5OapFfcCt8lXunkGzchCR/Kio= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=YCZc5CWD; arc=none smtp.client-ip=209.127.230.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="YCZc5CWD" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=2212171451; d=bytedance.com; t=1786263697; h=from:subject: mime-version:from:date:message-id:subject:to:cc:reply-to:content-type: mime-version:in-reply-to:message-id; bh=0Yk0lYL9aqPBymANq4am5jSB+FYd5S9sbi6/i8dc480=; b=YCZc5CWDxLfbLTzlyJ0VYTLolNveLYQYsBvLsJZx0IL1+1IOHu0F4E8XwKaqblJVpDIYPB aArDrZkWSFZCN6DarCHZ3U9THa/STwjW0qPvV/B7yc790Utygxz2r2oUYaLB/Gj4zZV6OC hpqGrs3due4wTvYwIyxTT2l3vdM9r7mRpGOb7zvmd8rF7jQVyZ+LsobnoTFnDBVavEuAMv sXO+jJdkxJFV4POvkEl+AcQYXSYAdf3AFblnNsi5xikifTxwYgbqyOCY17i+o/fJLrp+Ey cnNvOC0LD+fz1aS6o82OjqGuyjNpba1Gu5sqzK8ojitLLUdbMzjMDpX1tE4+jw== Message-Id: <20260809082111.3827531-2-qirui.001@bytedance.com> X-Original-From: Rui Qi In-Reply-To: <20260809082111.3827531-1-qirui.001@bytedance.com> References: <20260809082111.3827531-1-qirui.001@bytedance.com> Content-Type: text/plain; charset=UTF-8 X-Mailer: git-send-email 2.20.1 Content-Transfer-Encoding: 7bit To: "Tejun Heo" Cc: "Waiman Long" , "Ridong Chen" , "Johannes Weiner" , =?utf-8?q?Michal_Koutn=C3=BD?= , "Shuah Khan" , , , , "Rui Qi" Subject: [PATCH 1/2] selftests/cgroup: Avoid awk -e in cpuset tests Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Lms-Return-Path: Date: Sun, 9 Aug 2026 16:21:10 +0800 From: "Rui Qi" The cpuset selftests use awk -e to parse cgroup mount points. This works with gawk, but mawk rejects the option. In test_cpuset_prs.sh, this leaves CGROUP2 empty and causes the test to skip as if cgroup v2 were not mounted. The same non-portable invocation exists in the cpuset v1 hotplug test. The scripts only need to pass a single awk program. Use the standard awk invocation without -e so mount point detection works with awk implementations that do not support the gawk extension. Fixes: a8c52eba880a ("kselftest/cgroup: Add cpuset v2 partition root state test") Fixes: 812c5945bdb8 ("cgroup/cpuset: Add test_cpuset_v1_hp.sh") Signed-off-by: Rui Qi --- tools/testing/selftests/cgroup/test_cpuset_prs.sh | 2 +- tools/testing/selftests/cgroup/test_cpuset_v1_hp.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/cgroup/test_cpuset_prs.sh b/tools/testing/selftests/cgroup/test_cpuset_prs.sh index 400a696a0d21..16c38eb11e63 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!" SUBPARTS_CPUS=$CGROUP2/.__DEBUG__.cpuset.cpus.subpartitions CPULIST=$(cat $CGROUP2/cpuset.cpus.effective) diff --git a/tools/testing/selftests/cgroup/test_cpuset_v1_hp.sh b/tools/testing/selftests/cgroup/test_cpuset_v1_hp.sh index 7406c24be1ac..da97f1643f9a 100755 --- a/tools/testing/selftests/cgroup/test_cpuset_v1_hp.sh +++ b/tools/testing/selftests/cgroup/test_cpuset_v1_hp.sh @@ -14,7 +14,7 @@ skip_test() { [[ $(id -u) -eq 0 ]] || skip_test "Test must be run as root!" # Find cpuset v1 mount point -CPUSET=$(mount -t cgroup | grep cpuset | head -1 | awk -e '{print $3}') +CPUSET=$(mount -t cgroup | grep cpuset | head -1 | awk '{print $3}') [[ -n "$CPUSET" ]] || skip_test "cpuset v1 mount point not found!" # -- 2.20.1