Message ID | 20240207203134.69976-1-sj@kernel.org |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-57026-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp2489199dyb; Wed, 7 Feb 2024 12:33:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IGk1yLLkWBYENZeQ4zHphq0vKX3q9aCaJZltjucJQmGQRjKSwLqRgzMpof8VtbJC580uJP5 X-Received: by 2002:a17:902:da83:b0:1d9:411f:4303 with SMTP id j3-20020a170902da8300b001d9411f4303mr6295893plx.9.1707338008591; Wed, 07 Feb 2024 12:33:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707338008; cv=pass; d=google.com; s=arc-20160816; b=Vrv6LWOjZkQKQwuVLeQuYPaPNoU0ywmnEMv1l+iqcBG2+D163dwKWpOZ38yBleRBHd NseqleedjhP6g/3Z5RGE9znXBJ/bQ6dPI6yBR5MeU1pqGvA3mwOUN0hngal47SQwGKuk j+//9uQsaKUmRBH9DrbWREPfzpvoDbqtkJkO0cnysQm5xnOD0KcY6aPkGztWO+0CKCjj JK6mdodd5W72HQau0Tv+W+MFY0jE+kPJKNYExH3Kgl5/VxvvD8M5Giz9pDb+bZDku7pZ VyMiBX6lO1KHzUaLNRfh9cu7eQ04nCTTDrUPiiw9T6BgIymm7YqIkoMkObT/GBpYFUDL SOZQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=6nCAhGKy78Md1hAvtLIwRo0XQSFPD/judEiI3JdiQfg=; fh=HAU8NM0y4DhcfJuilQhtQhWTAJ694xizW6R6S3zY+58=; b=wGVMAXlz9jSu8acrDHIYpApyxClDkC5gvnPQGuaMZNTIHFCdhZ2A3Zc26l0T2f/4C7 31F/4zSILdv+OCzDKLQrD9gfDevYlPvgKU9FtBgQ61/qZy1I2ib9RoAEd+aKUjyeSlkU ZJO7ZIsVCUM2S1lUUEHJ9j1pJrm7v6cMqroilMNfrlvtLoGD9JJsnviFcCqBmie1WtR9 hwSaFdlqi/JzmI9fyqwJmBd1sjXqCdTxCYvPcwLQwOpqiMecxcwlSS/Uro8A8tUbCQAt +LysgduiV8qBQn3RXMeJ/KT/MnEiTzzQ1cc+2REyvf4Zunbv0klrTUlSq/G3pe/sx0gX zJ5A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mgtfnZ2H; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57026-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57026-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCUGbJzsLQNK5rLVb3GoTY5rsPq3EaUzoHyx+4ED1DiNRNFpflFd0nXkA8neizJUyy98F/lKXfx2oSaNzOHlAErZQS1AGg== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id l13-20020a170902f68d00b001d8b0be3d70si2324325plg.225.2024.02.07.12.33.28 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 12:33:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57026-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mgtfnZ2H; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57026-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57026-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id DBB69B2720D for <ouuuleilei@gmail.com>; Wed, 7 Feb 2024 20:32:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C4A0128374; Wed, 7 Feb 2024 20:31:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mgtfnZ2H" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 7AE2F1B942; Wed, 7 Feb 2024 20:31:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707337901; cv=none; b=VsD90LdTGlOVD5roUm9MWkviYH6V/LzUHnL+fu/BeHL6O3iK4e7O7xvFSccWQqZzSBZ7s3T4RGZqzfkptmkTnZLVvdBOKbGpuinQA82ox6yQ14K8HJTjWGiRgGwClqD6t54ycuel8Ii/ijUujvnTW40CxEbNIyuHP3sKrWyp4Jk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707337901; c=relaxed/simple; bh=SF63Uy/W6gSlPDVcToCt1nQO7SUTdRa2P7SsA0ShYjQ=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=ZZmTUmgggDswgQadpqHeAscAVBN77VO7omvG0/Rw7uscJNdpvFi0IFFFGPlzl92ftctgrqqXzxN3qS5iFjejqR9ChyhCQ5PM3iqQ4mqA5xtipwPQv7HPWZ7fAF0notebCOOgQVfd+ZyvPxfcNcaRmLCiAR+4CTVwc8cOADkw6Ig= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mgtfnZ2H; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 520F1C433C7; Wed, 7 Feb 2024 20:31:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707337900; bh=SF63Uy/W6gSlPDVcToCt1nQO7SUTdRa2P7SsA0ShYjQ=; h=From:To:Cc:Subject:Date:From; b=mgtfnZ2HwNFkfRgtZgwVLxmVy7gbrtkqYaqlJBri8LGwuN+Oczb0VxW9S4xI0Ro7B OLA5fWfLDJeod7M0QdiFlXoXFHE8WUQ0YsJafPw8451Wbm1ZfRWbv0ZqvmL8fj2WdW YSOPTnfvNxO1co5/RMQDwIRUVfRARe0qv9Z3JO5/FmFBxR0TdpxptOzSchuVRo03N/ bn+hrIlWXRDBi4pOJu6AkIvsBlHClBmtDbsWAAKGP1K9yshrtCRulMj5x0nZNw0ZGJ dZKCiiQ0OVHqxAamNIHI3Krog1qMn0FsaxylaPdVKtCgikasmTboNe6yUq6mEJ0leH j2aN5mXc5STYQ== From: SeongJae Park <sj@kernel.org> To: Andrew Morton <akpm@linux-foundation.org> Cc: SeongJae Park <sj@kernel.org>, Shuah Khan <shuah@kernel.org>, damon@lists.linux.dev, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/8] selftests/damon: add more tests for core functionalities and corner cases Date: Wed, 7 Feb 2024 12:31:26 -0800 Message-Id: <20240207203134.69976-1-sj@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790273660013837890 X-GMAIL-MSGID: 1790273660013837890 |
Series |
selftests/damon: add more tests for core functionalities and corner cases
|
|
Message
SeongJae Park
Feb. 7, 2024, 8:31 p.m. UTC
Continue DAMON selftests' test coverage improvement works with a trivial improvement of the test code itself. The sequence of the patches in patchset is as follows. The first five patches add two DAMON core functionalities tests. Those begins with three patches (patches 1-3) that update the test-purpose DAMON sysfs interface wrapper to support DAMOS quota, stats, and apply interval features, respectively. The fourth patch implements and adds a selftest for DAMOS quota feature, using the DAMON sysfs interface wrapper's newly added support of the quota and the stats feature. The fifth patch further implements and adds a selftest for DAMOS apply interval using the DAMON sysfs interface wrapper's newly added support of the apply interval and the stats feature. Two patches (patches 6 and 7) for implementing and adding two corner cases handling selftests follow. Those try to avoid two previously fixed bugs from recurring. Finally, a patch for making DAMON debugfs selftests dependency checker to use /proc/mounts instead of the hard-coded mount point assumption follows. SeongJae Park (8): selftests/damon/_damon_sysfs: support DAMOS quota selftests/damon/_damon_sysfs: support DAMOS stats selftests/damon/_damon_sysfs: support DAMOS apply interval selftests/damon: add a test for DAMOS quota selftests/damon: add a test for DAMOS apply intervals selftests/damon: add a test for a race between target_ids_read() and dbgfs_before_terminate() selftests/damon: add a test for the pid leak of dbgfs_target_ids_write() selftests/damon/_chk_dependency: get debugfs mount point from /proc/mounts tools/testing/selftests/damon/.gitignore | 2 + tools/testing/selftests/damon/Makefile | 5 ++ .../selftests/damon/_chk_dependency.sh | 9 ++- tools/testing/selftests/damon/_damon_sysfs.py | 77 ++++++++++++++++-- .../selftests/damon/damos_apply_interval.py | 67 ++++++++++++++++ tools/testing/selftests/damon/damos_quota.py | 67 ++++++++++++++++ .../damon/debugfs_target_ids_pid_leak.c | 68 ++++++++++++++++ .../damon/debugfs_target_ids_pid_leak.sh | 22 +++++ ...fs_target_ids_read_before_terminate_race.c | 80 +++++++++++++++++++ ...s_target_ids_read_before_terminate_race.sh | 14 ++++ 10 files changed, 403 insertions(+), 8 deletions(-) create mode 100755 tools/testing/selftests/damon/damos_apply_interval.py create mode 100755 tools/testing/selftests/damon/damos_quota.py create mode 100644 tools/testing/selftests/damon/debugfs_target_ids_pid_leak.c create mode 100755 tools/testing/selftests/damon/debugfs_target_ids_pid_leak.sh create mode 100644 tools/testing/selftests/damon/debugfs_target_ids_read_before_terminate_race.c create mode 100755 tools/testing/selftests/damon/debugfs_target_ids_read_before_terminate_race.sh base-commit: f51e629727d8cc526a3156a2c80489b8f050410f