From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-185.mta0.migadu.com (out-185.mta0.migadu.com [91.218.175.185]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 90FD23A5E71 for ; Tue, 14 Jul 2026 03:00:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.185 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783998032; cv=none; b=qb26Lnnl+kktfGPbe9cjIpYK6XEFwzwt3XWVk+jKQey+yuMHKpXPW2Kb2uDcFLXy7LlvPOB/y/0jbuQn58oasKn4PObhI9RNo2QBYyf1X08YhKyMfyMibAnhz7E6ZXqohd3emhK8Su+uopPD51jf3W78JDEJZlrIlLXq5LoZISw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783998032; c=relaxed/simple; bh=22yk4dtBcV8Fk6ccHwis66VNqhMb7AAYAoTRbQtrkes=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=Q6p/wR2w2A3UlUgIGt/TxkElKekAlkR2Qi66OqupdHs+Im7A8DQpOnH1pjzPwHhpVrp+qVbxQieu138uk1MtUfwODs7/dmCI/+sM7FIYkn7+TsUrXRBYFqKuY1liHkr741Er8a0FXQOc8WnIIYBgVkpjorECd7MUhEeYAv4EYKo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=SWuFUOhZ; arc=none smtp.client-ip=91.218.175.185 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="SWuFUOhZ" Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1783998028; 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=u4XC4Tt2Er5SVTqQ4QRZas9ffsbGhNq4gF6E+smuGPU=; b=SWuFUOhZ2qAjtWWzx8WPyPnFFagUYtKh3FmiI2Eo4/FG8MdhayLP+WXKB1zAuW1Q6eGqQK 0iVHmFzsQNm0SAPBgDarv8HbpIHA8q5h3T0c9SRpswbEuNvcmu4SNtHBhLsZgFNhXAXSAo rWUWU/ho9C6k7xPsFvGg7knT0IW+gWs= Date: Tue, 14 Jul 2026 11:00:19 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Cc: cui.tao@linux.dev, muchun.song@linux.dev, osalvador@suse.de, david@kernel.org, hannes@cmpxchg.org, mhocko@kernel.org, roman.gushchin@linux.dev, shakeel.butt@linux.dev, tj@kernel.org, mkoutny@suse.com, shuah@kernel.org, cgroups@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] selftests/cgroup: fix missing TAP output in test_hugetlb_memcg To: Song Hu , linux-mm@kvack.org References: <20260714021511.1063700-1-husong@kylinos.cn> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Tao Cui In-Reply-To: <20260714021511.1063700-1-husong@kylinos.cn> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT 在 2026/7/14 10:15, Song Hu 写道: > main() in test_hugetlb_memcg never calls ksft_print_header(), > ksft_set_plan(), or ksft_finished(), so its output has no TAP plan and is > not valid TAP, unlike the sibling test_memcontrol and test_kmem tests. > Add the header/plan/finished calls following the same pattern. > > Signed-off-by: Song Hu > --- > tools/testing/selftests/cgroup/test_hugetlb_memcg.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/tools/testing/selftests/cgroup/test_hugetlb_memcg.c b/tools/testing/selftests/cgroup/test_hugetlb_memcg.c > index b627d84358b1..8c5aced813b6 100644 > --- a/tools/testing/selftests/cgroup/test_hugetlb_memcg.c > +++ b/tools/testing/selftests/cgroup/test_hugetlb_memcg.c > @@ -199,7 +199,10 @@ static int test_hugetlb_memcg(char *root) > int main(int argc, char **argv) > { > char root[PATH_MAX]; > - int ret = EXIT_SUCCESS, has_memory_hugetlb_acc; > + int has_memory_hugetlb_acc; > + > + ksft_print_header(); > + ksft_set_plan(1); > > has_memory_hugetlb_acc = proc_mount_contains("memory_hugetlb_accounting"); > if (has_memory_hugetlb_acc < 0) > @@ -211,7 +214,7 @@ int main(int argc, char **argv) > if (get_hugepage_size() != 2048) { > ksft_print_msg("test_hugetlb_memcg requires 2MB hugepages\n"); > ksft_test_result_skip("test_hugetlb_memcg\n"); > - return ret; > + ksft_finished(); > } > > if (cg_find_unified_root(root, sizeof(root), NULL)) > @@ -233,10 +236,9 @@ int main(int argc, char **argv) > ksft_test_result_skip("test_hugetlb_memcg\n"); > break; > default: > - ret = EXIT_FAILURE; > ksft_test_result_fail("test_hugetlb_memcg\n"); > break; > } > > - return ret; > + ksft_finished(); > } This one looks good to me — it mirrors the test_memcontrol/test_kmem pattern and the exit-code semantics are preserved. Reviewed-by: Tao Cui