DAMON development mailing list
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "SeongJae Park" <sj@kernel.org>
Cc: damon@lists.linux.dev
Subject: Re: [RFC PATCH v1.1 06/11] selftests/damon/sysfs.sh: test dests dir
Date: Thu, 25 Jun 2026 05:14:49 +0000	[thread overview]
Message-ID: <20260625051449.E27CF1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260625050756.91115-7-sj@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The newly added `test_dests()` function is never invoked, and its helper `test_dest()` omits a required argument, causing the test to be both unexercised and structurally broken.
--

commit 53579293376a979c6b9c9914d1d77ffa57418d36
Author: SeongJae Park <sj@kernel.org>

selftests/damon/sysfs.sh: test dests dir

DAMON selftest interface essential file operations test (sysfs.sh) is
not testing DAMOS dests/ directory. This commit adds a test for the
dests directory.

> diff --git a/tools/testing/selftests/damon/sysfs.sh b/tools/testing/selftests/damon/sysfs.sh
> index 07a33995be852..ffa8413b5ab3d 100755
> --- a/tools/testing/selftests/damon/sysfs.sh
> +++ b/tools/testing/selftests/damon/sysfs.sh
> @@ -99,6 +99,29 @@ test_stats()
>  	done
>  }
>  
> +test_dest()
> +{
> +	dest_dir=$1
> +	ensure_file "$dest_dir/id" "exist"
> +	ensure_file "$dest_dir/weight" "exist"

[Severity: Medium]
Does ensure_file() require a third argument for the expected permission?
Without it, the underlying check might evaluate the file's permission against
an empty string and unconditionally fail the test.

> +}
> +
> +test_dests()
> +{

[Severity: Medium]
Is test_dests() ever invoked? It looks like this function is defined here
but remains unreferenced in the script. Should it be called from
test_scheme() to verify the directory under each scheme?

> +	dests_dir=$1
> +	ensure_file "$dests_dir/nr_dests" "exist" "600"
> +	ensure_write_succ "$dests_dir/nr_dests" "1" "valid input"
> +	test_dest "$dests_dir/0"

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260625050756.91115-1-sj@kernel.org?part=6

  reply	other threads:[~2026-06-25  5:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-25  5:07 [RFC PATCH v1.1 00/11] mm/damon: update, optimize, and clean up doc, tests, and code SeongJae Park
2026-06-25  5:07 ` [RFC PATCH v1.1 01/11] Docs/mm/damon/design: update for DAMOS_QUOTA_NODE_ELIGIBLE_MEM_BP SeongJae Park
2026-06-25  5:13   ` sashiko-bot
2026-06-25  5:20     ` SeongJae Park
2026-06-25  5:07 ` [RFC PATCH v1.1 02/11] Docs/ABI/damon: document probe files SeongJae Park
2026-06-25  5:14   ` sashiko-bot
2026-06-25  5:25     ` SeongJae Park
2026-06-25  5:07 ` [RFC PATCH v1.1 03/11] mm/damon/tests/core-kunit: test damon_rand() SeongJae Park
2026-06-25  5:13   ` sashiko-bot
2026-06-25  5:37     ` SeongJae Park
2026-06-25 14:08       ` SeongJae Park
2026-06-25  5:07 ` [RFC PATCH v1.1 04/11] selftests/damon/sysfs.sh: test multiple probe dirs creation SeongJae Park
2026-06-25  5:07 ` [RFC PATCH v1.1 05/11] selftests/damon/sysfs.sh: test {core,ops}_filters/ directories SeongJae Park
2026-06-25  5:07 ` [RFC PATCH v1.1 06/11] selftests/damon/sysfs.sh: test dests dir SeongJae Park
2026-06-25  5:14   ` sashiko-bot [this message]
2026-06-25  5:42     ` SeongJae Park
2026-06-25  5:07 ` [RFC PATCH v1.1 07/11] selftests/damon/sysfs.sh: test all files in quota goal dir SeongJae Park
2026-06-25  5:07 ` [RFC PATCH v1.1 08/11] mm/damon/core: reduce range setup in damon_commit_target_regions() SeongJae Park
2026-06-25  5:07 ` [RFC PATCH v1.1 09/11] mm/damon/sysfs: split probe setup function out SeongJae Park
2026-06-25  5:07 ` [RFC PATCH v1.1 10/11] mm/damon/sysfs: split out filters setup function SeongJae Park
2026-06-25  5:07 ` [RFC PATCH v1.1 11/11] mm/damon/sysfs: fix typos in probe_{add,rm}_dirs: s/attr/probe/ SeongJae Park

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260625051449.E27CF1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=damon@lists.linux.dev \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=sj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox