Re: [PATCH 1/2] selftests/cgroup: remove unused user_usec read in test_cpucg_nice
Michal Koutný <[email protected]> Wed, 29 Jul 2026 13:58:10 +0200
| Newsgroups | org.kernel.vger.cgroups,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest |
|---|---|
| Message-ID | <[email protected]> |
--ifcqqrvh53udcnbk Content-Type: text/plain; protected-headers=v1; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH 1/2] selftests/cgroup: remove unused user_usec read in test_cpucg_nice MIME-Version: 1.0 On Wed, Jul 29, 2026 at 06:04:50PM +0800, Shaojie Sun <[email protected]= n> wrote: > diff --git a/tools/testing/selftests/cgroup/test_cpu.c b/tools/testing/se= lftests/cgroup/test_cpu.c > index 7a40d76b9548..fe637e1d2fcd 100644 > --- a/tools/testing/selftests/cgroup/test_cpu.c > +++ b/tools/testing/selftests/cgroup/test_cpu.c > @@ -289,7 +289,6 @@ static int test_cpucg_nice(const char *root) > if (!WIFEXITED(status)) > goto cleanup; > =20 > - user_usec =3D cg_read_key_long(cpucg, "cpu.stat", "user_usec"); > nice_usec =3D cg_read_key_long(cpucg, "cpu.stat", "nice_usec"); Good catch. This test is anologous to test_cpucg_stats(), so the checks should be analogous too, like: user_usec =3D cg_read_key_long(cpucg, "cpu.stat", "user_usec"); nice_usec =3D cg_read_key_long(cpucg, "cpu.stat", "nice_usec"); if (user_usec <=3D 0) goto cleanup; =20 instead of the removal. Thanks, Michal --ifcqqrvh53udcnbk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iJEEABYKADkWIQRCE24Fn/AcRjnLivR+PQLnlNv4CAUCamnqzRsUgAAAAAAEAA5t YW51MiwyLjUrMS4xMiwyLDIACgkQfj0C55Tb+Aii9gD9GGP+0pSRf1z4ITK+SOed r5N8KWGml6r9WTyFcsoAvAUA/3ffWJbE9xPk9PpZcQa8oND7NB5OPWBG3a8zgEl8 JKAO =rtSp -----END PGP SIGNATURE----- --ifcqqrvh53udcnbk--