From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (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 A80333A5E7D for ; Fri, 31 Jul 2026 09:18:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785489523; cv=none; b=ATdwiNUwqjTeUKCDINnDMyyuldktu+JBX+w8DOMc5nf5n6pC+W+cGjFv+f/PyCWhRidffmTYYpoGo1+Y8O07MAwLC68ptHu1zwMjwpyB/VIiYLrCBnTeSaWtQbQ3L1ZAa+Smikijp9LRst/kn49fEnx67CbhxStadwoM3juGWro= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785489523; c=relaxed/simple; bh=bwHfECC55OnCtvP0E7IoCPnJ4TAlc8AGp6+ZR7/YYSI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XPYP6HdswThhIyQ6x1U5D2MxC/NvbtT+JyCpFPWoK4D7ub990tfRQL1wrGGRGTNSmk9Lm8MX8gyBhD2PUzLbucNv27VZIYTwNOqigxZ/W/Em0zHTaFB5+NFpWggav8PC2ELd+kf3Q1GVq8CfyoWvrqNcZ60EiSFS2QOIuWeEHJU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=TwK1+eid; arc=none smtp.client-ip=209.85.221.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="TwK1+eid" Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-47f904e80eeso668159f8f.1 for ; Fri, 31 Jul 2026 02:18:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1785489520; x=1786094320; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=Ru7vgSQnsNbpoP3wPkVpdq3kmKPHaB3aDPcV1egDXRU=; b=TwK1+eidJMI0jh6WrIazODH+oknm+ehf0/ocBJQijaO250Hd7SsJzIWHU6YPjLBzLn wgkkDa3s3yIHTIiPu+dauqC91l38lWUlNVQSM9DJr/ttaO0BF+KtPVp89Fsxej5Q8B2M HUGMKQs8DlMLAX9ywtOuKKvRhLaJqqpksCYb81YNHJp7oQhsztOxEItzrwL57mSGV5nm qVxHDQyY2CeoydbbppoPjw6hFLjYL/WGEh1xDcXmq+Qdo9PJgeP2FiPNEZQ29KH8Gwz1 /D0JLmV9bdJiV5Yq1tf48jBqUNyh428fuV+pGBe7sbvsP1Bd9VwtV9n6BBuOpIY8II91 XWAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785489520; x=1786094320; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Ru7vgSQnsNbpoP3wPkVpdq3kmKPHaB3aDPcV1egDXRU=; b=dtCvmC9vtVzo03fYTm0okOEhl3dMEgWlB+23/QstAZehWjJVURKkEFFpWggZA/+VeU KZN7N6uBftX37zhXRoToDDxaRmr/zu7a653YDr4OR0cFbns2y7xMBtv2qNZAtsmacMMd BwCnFDJfiBBLufOY1GpRwYrPm9s4L+mGp9eBlU3pzY+EosW8cM1dorU5dAsEwCjQnzhH KUoBLHoCjVs2f+SZFGrULOMgG91kd8ybK0c3r9ieQh3BaVGUt9KVCLqsyx7Hoh7WJ6Nt Ende4BLyYDBzGv3TZIdSW+jrfoweCoIMuhluUXtKn4uBG2SlYBk5r505d6AN0lm2MH/7 0unw== X-Forwarded-Encrypted: i=1; AHgh+RoWN/HSIIbtiLecmzUmEBPJhz7YKaXA6U3VGyjgBWggogYDadwzWfDgmMF7Xr19GGGlQOFsrxfKT7Bvf7Y=@vger.kernel.org X-Gm-Message-State: AOJu0Yzth+slk2QUmhZCKTkMW2pfHKN3nftFng0IQihhL71M/1QXaOuT i/oow8+J4rgRMPdC0QY03NuGXzv9VB/hWrb2dPzaJ7w1kGPdnACIQNqxtu2OpEEVQv4= X-Gm-Gg: AR+sD11J8xRR1Taof3/9RM+YcAGcdzraxl6guk56ZmPgTVetTbz4nChGYZnW2EghPSK pr36zJv2xVWPUJA6OfMffeUnHok1CP5G8qXoXg6eqIeaJ9HnKqLXmd8vYGm6irffUZSjJmB4Ga9 Km57aJQGNK6t3fmkHUQ/5B7U+aAgdcwJ2D/h+/ap3kib4CyHkHEh28cFEuwe6/aJiApIP7/A6D3 0J5+qFWPqN0ierflxhF8hRieL/70TeWjDypUOBm2Cpw3rcnWJ+QwpTfY5gBKk3yGoGM4q2JCP3Z P+mWqxS7EUt7cvHiX3hUxCba0Mj+9cVnpYjKbwm+cwujLHm/OBC8EoggPmtNsZeU2QCRsgJZuIR rhmiSSaZuo3saR6FqLqS7ThWsUGfOkkQWVCFUN7Bg5sF2gVMSln4QSsFMcmK1w0TK8knmJwE90X rvJ25u6WyaCVk0qi5IMHP+58B3GrqmTAfLNrO3aSfDzME+BKVYfHpNqTG5YwyBCvqFgxXLIuhKk Jg= X-Received: by 2002:a05:6000:4808:b0:47e:9f03:e542 with SMTP id ffacd0b85a97d-47fd2b679d9mr3015237f8f.45.1785489519948; Fri, 31 Jul 2026 02:18:39 -0700 (PDT) Received: from localhost.localdomain ([2001:af0:8000:1409:193:86:92:181]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47fd456262bsm2209203f8f.17.2026.07.31.02.18.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jul 2026 02:18:39 -0700 (PDT) Date: Fri, 31 Jul 2026 11:18:37 +0200 From: Michal =?utf-8?Q?Koutn=C3=BD?= To: Shaojie Sun Cc: cgroups@vger.kernel.org, hannes@cmpxchg.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, shuah@kernel.org, tj@kernel.org Subject: Re: [PATCH v2] selftests/cgroup: add user_usec sanity check in test_cpucg_nice Message-ID: References: <20260730130717.1236233-1-sunshaojie@kylinos.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="tnxx3t7cpk6cygju" Content-Disposition: inline In-Reply-To: <20260730130717.1236233-1-sunshaojie@kylinos.cn> --tnxx3t7cpk6cygju Content-Type: text/plain; protected-headers=v1; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH v2] selftests/cgroup: add user_usec sanity check in test_cpucg_nice MIME-Version: 1.0 On Thu, Jul 30, 2026 at 09:07:17PM +0800, Shaojie Sun wrote: > In test_cpucg_nice, after the child process exits, user_usec is > read from cpu.stat but the value is not checked. Add a sanity check > to ensure user_usec > 0, analogous to test_cpucg_stats(), so that > the test fails early if CPU usage wasn't properly accounted. >=20 > Signed-off-by: Shaojie Sun > --- > v2: Instead of simply removing the unused user_usec read, add a sanity > check (if user_usec <=3D 0, goto cleanup) analogous to test_cpucg_sta= ts(), > as suggested by Michal. >=20 > tools/testing/selftests/cgroup/test_cpu.c | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Michal Koutn=FD --tnxx3t7cpk6cygju Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iJEEABYKADkWIQRCE24Fn/AcRjnLivR+PQLnlNv4CAUCamxoaRsUgAAAAAAEAA5t YW51MiwyLjUrMS4xMiwyLDIACgkQfj0C55Tb+AjaEAD9GI3/HmQMFyz4zdT8cIiB p9Vql087AqIUXZiczHDlf1YA/3ZACeKyH+gzAyxyuHI8vnYFSBQVd7zAUYO9Mjt5 NToL =l2Dw -----END PGP SIGNATURE----- --tnxx3t7cpk6cygju--