Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp553328rdh; Wed, 7 Feb 2024 12:32:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IEs8mzQ6xYmkNUOzRomyp5/n/kxoHE/cpf4ZCXPDfNHVFYn3nCyTiprkkQzEdpTIu0nNBxY X-Received: by 2002:a05:6a21:9206:b0:19c:9d4d:7d7 with SMTP id tl6-20020a056a21920600b0019c9d4d07d7mr6892792pzb.41.1707337939762; Wed, 07 Feb 2024 12:32:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707337939; cv=pass; d=google.com; s=arc-20160816; b=Cz3KxsKIdXIpTiDJ2sBBkVJTPKCpadSukwKckYYYoodATe6FdfxpWP1/oqnp4WwyPQ DW//IvNq2VtHKFrO4T9JydGgjHRapwirZZhLDd/XQzscPjuB+XXMogE1Khr94iEXxEk7 LrJzMmtk0MZuZcEEcDUe2mOPQ/fSbwfshICBoma9oR4oBhr5xeglO5JUnW70FIjzUpj5 L+ULcDaQtl75IjT1IS7wtzgpt5N3WlK0HcJlPbu4Wq359Ehe8Mo4CJt4252r+6WUUnOR l900H/JZY1mbAVjWB88QFzEwixx/MpnFJGDeNMVAu/uzBmuKDw0FUcTFMntHGiUfKTiL eWYQ== 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=sVzn5HNUN31UweMia2QyI1KiycSP0s6Xjf/G2JOrq6w=; b=ezZE807WuDqEzCQdfZMRCR58Pxxa7uz8O5aFZw4zllg/WJkL5halB1A9VZyx5SF9kZ F0kZvV5yUJncvOXO+gRLhmWZhnYz/PabYeYlCxMIbyCa9iu8Dff/lswmyD74zpL3vyRf mWm0a7vK21chO/MK4CCXCh0mXS+CApqaRmYYuoAprvVzISc7UzoFfeuIfukOqnkJ3SJ3 /cV8dAXqz1i3EzfjbgbEdcU9UnQXXeS/IKCjiwlhKRsbJfzWiVurKH1/liN3dc3AMB0u ozNXu85oC8HKzxb5dXR3T7weNrSuewKsudB9jVvuYO8cV/iBjthMOcy1qhNXajY2thNJ 3PJA==; 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-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57026-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCWMw8MLJ1E2nsvpUBQurxJw5BeQa5zKK48eqH/UgWzMipF0Uh7wlGG9EQHCUsaMV2OZPKkHlQaIJye7m0L1lCLVXXkoMybqL8qTkpRDsg== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e3-20020a17090a9a8300b00295f1aea266si2264131pjp.89.2024.02.07.12.32.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 12:32:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57026-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; 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-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57026-linux.lists.archive=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 817C928E6D5 for ; Wed, 7 Feb 2024 20:31:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5CA4AFC1D; Wed, 7 Feb 2024 20:31:42 +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 To: Andrew Morton Cc: SeongJae Park , Shuah Khan , 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: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 -- 2.39.2