From nobody Sat Jul 25 00:02:23 2026 Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (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 2DC1C30C631 for ; Wed, 22 Jul 2026 01:23:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784683438; cv=none; b=Z3u1d9Pk7mXGkYEJ7+8TytRPvlib2+eXoIp41IN17A0XyO1kxAYeNvP9/fMvDtNvamF3zsvPmRTvy+DJdY3I1QfEqyVaNZg85wtYlNwyDlhlFzxeTagzeGq+/4/jKitYeUE2Jo6AMvYxEPfs7dv+s1qY4fvIspMHLvZ+bPyhMeM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784683438; c=relaxed/simple; bh=B3++cTbdJ49038jePsljx+Gyp4sIgoEM/bU7x9eRQSY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OG06c/404pQVG22xUXiADV+wFlkyxZ1XaYYPeTsht+koBTZs+DKAmwPV9Vgbf5w8tjAiL/BSoz/gNYB4OJscJW7MLjNxprY2Z5c2u2gjYOmdx2/0Q2zTqEnACKKIJwFWoi1alWDn7EFJB8WDTEWUb9prJKOhYpPHyZ9cTf460gg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=iAePzheb; arc=none smtp.client-ip=209.85.208.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iAePzheb" Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-6983f20a8bfso5800079a12.1 for ; Tue, 21 Jul 2026 18:23:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784683434; x=1785288234; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=YbFXTrauONRUcQG2aMTBcn7xFxe1QUlq55ZfdY6FsS4=; b=iAePzhebx3oDmd9GM81JlJDpF3VlBWBy0JHaKNN3XbI7xt/OQ8jPtEdxRbp/4C99MD 3xMf80uifR7TN2UjM97YlZVp64W95QIH2evj+xf2iSPfBdxRgPc/6G71lRnXQU9cw4iy wkO++K5zsa3y5FsHTbysSVbITnngBp7wVhEhuJ9NADlAmqE8PPvLgJy1qb4RfH1VC4tt jO21wsm3QSV0pFwhQ1h6IjPZHu+XKrS0dTkK76IekLYr4AGWcBC7yE4haTlUxpPcNfCs 04OlNBRbD/V8G99ayvJrNGIyr0na6ppaqKBlNhvEk3DyrgDOpluw+wkBG3bDoiPpmvVp Q/GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784683434; x=1785288234; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=YbFXTrauONRUcQG2aMTBcn7xFxe1QUlq55ZfdY6FsS4=; b=odOUxEvmwgpRBQpuDnCsuhp4GualPrU9RV7nl9XLB1sAo5Fm8HMOOsSo4ykQUp/DBw E9/OAd0+mbUn1x9K5Z0KujTcdkqcrF4bTBY0lxfhJLmhLhQm5M4s2Qs+Xjy5uERnSOlV i3EodBTLE5LVrAlSGrHuoSg34zMgoyKtNkGw78BTcelLe/VSsIw7CiAw34tUlZqKX66z jx70rbUCfaZvnVcAkmTnONUTx3wYtRV2ouN04JTA6AalCWHcUEUBV9IwZCRBrrDxaORZ MUOHQM4P1eYF5fazSg9qzJCsDEz3DxWI+xC2CecyvToOP/SpseHh2LbB+h6mGcbsh4LP Alkg== X-Forwarded-Encrypted: i=1; AHgh+RrbiJ5iOwEdqIO09DUx9D+BPLPzi2BbbA1wg8bN8TssSlUjk525tSRaXzJZLMMCdxja8GUDsI8O8lMeRsw=@vger.kernel.org X-Gm-Message-State: AOJu0YzR/xRHC/d7y3hDZl8z+LypyIpheYHRpIliqi1vOHKod+9Sit+S taz3DDKX21XK50S1kDC1qni254RyMFj0v/y98XIo23a0XMFSyS/93G3p X-Gm-Gg: AR+sD12FTknuG7PAVSwKQMpBzjZzYNei9Fgq7rXKw/cmfZjQIZcxpDwOi6+Wto97Hjt oRADYKEeRCHbVVWgl/96Jf3Nj4e8acp9RmJqQj2Cly+TtC9j+AbN2mkPdfLNPXIULoCFRLB/SJC Dkl/of6CqsbIoULBWwr+q731UIf5QO/pNBM115JMShO77MJcY246td+GZjtf3fVO5+scgVemyNN 7sX02vKFB3GRXKA9WONdZyqYUdFFduCSQzyLXS9kMCj4sfiJ4VAVmV93FEKlSXIyKXq+NwfVBS/ cUG8yG2m6CmRfCfnNoBPu5QA/RFX4FHGmdWul200nC0lTwpITyoPovZxUTD7xv4vx8Jq9sShsD8 mVh4M+VaZ97rId6pD/lH1R9N111E4xw0pj2HYt5dog5LC4foO1WhYshGcv2q8R8AtXlPCbJUCL4 1H2Jaewl+IVX40CPas3vP0abTwRlJfnjZLrJvKCg+REAPTcl6FDo5XO0scHTrU608vmA== X-Received: by 2002:a05:6402:528e:b0:69c:7406:9492 with SMTP id 4fb4d7f45d1cf-69e652e1111mr6897698a12.39.1784683434224; Tue, 21 Jul 2026 18:23:54 -0700 (PDT) Received: from misharu.home (2a02-a463-a071-0-7364-df4e-3b35-2094.fixed6.kpn.net. [2a02:a463:a071:0:7364:df4e:3b35:2094]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-69f34ba67f0sm321569a12.12.2026.07.21.18.23.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2026 18:23:53 -0700 (PDT) From: Hari Mishal To: SJ Park , Shuah Khan Cc: Greg Kroah-Hartman , damon@lists.linux.dev, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Hari Mishal Subject: [PATCH v2] selftests/damon/sysfs.py: clean up sh processes used for obsolete_target test Date: Wed, 22 Jul 2026 03:23:49 +0200 Message-ID: <20260722012349.9738-1-harimishal1@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260721190404.135937-1-harimishal1@gmail.com> References: <20260721190404.135937-1-harimishal1@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The obsolete_target test spawns three sh processes and uses their pids as DAMON monitoring targets. These processes are never terminated or waited on, so they are left running (or become zombies) as orphaned children after the test program exits. Terminate each process and communicate() with it after the targets are no longer needed, so it exits and gets reaped instead of being leaked. Signed-off-by: Hari Mishal Reviewed-by: SJ Park --- v2: Terminate each sh process directly instead of giving it its own stdin pipe to close, dropping the stdin=3DPIPE changes and shrinking the diff. tools/testing/selftests/damon/sysfs.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/damon/sysfs.py b/tools/testing/selftes= ts/damon/sysfs.py index aa03a1187489..bdb37eb1d26f 100755 --- a/tools/testing/selftests/damon/sysfs.py +++ b/tools/testing/selftests/damon/sysfs.py @@ -356,5 +356,9 @@ def main(): assert_ctxs_committed(kdamonds) kdamonds.stop() =20 + for proc in (proc1, proc2, proc3): + proc.terminate() + proc.communicate() + if __name__ =3D=3D '__main__': main() --=20 2.43.0