DAMON development mailing list
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
To: SeongJae Park <sj@kernel.org>
Cc: sashiko-bot@kernel.org, damon@lists.linux.dev
Subject: Re: [RFC PATCH 13/14] selftests/damon/sysfs.sh: test addr_unit file existence
Date: Wed, 20 May 2026 07:20:51 -0700	[thread overview]
Message-ID: <20260520142051.170627-1-sj@kernel.org> (raw)
In-Reply-To: <20260520140819.169963-1-sj@kernel.org>

On Wed, 20 May 2026 07:08:17 -0700 SeongJae Park <sj@kernel.org> wrote:

> On Wed, 20 May 2026 06:41:56 +0000 sashiko-bot@kernel.org wrote:
> 
> > Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> > - [Medium] The newly added test for the `addr_unit` sysfs file incorrectly passes 'exit' instead of 'exist' to `ensure_file()`, causing the test check to be silently skipped.
> > --
> > 
> > commit a9bc6162fe06c0405081aeb68c3f5e9a54287e20
> > Author: SeongJae Park <sj@kernel.org>
> > 
> > selftests/damon/sysfs.sh: test addr_unit file existence
> > 
> > This commit adds a test to verify the existence of the addr_unit sysfs
> > file in the DAMON selftests.
> > 
> > > diff --git a/tools/testing/selftests/damon/sysfs.sh b/tools/testing/selftests/damon/sysfs.sh
> > > index b3418214ed358..1e10881afabb6 100755
> > > --- a/tools/testing/selftests/damon/sysfs.sh
> > > +++ b/tools/testing/selftests/damon/sysfs.sh
> > > @@ -365,6 +365,7 @@ test_context()
> > >  	ensure_dir "$context_dir" "exist"
> > >  	ensure_file "$context_dir/avail_operations" "exit" 400
> > >  	ensure_file "$context_dir/operations" "exist" 600
> > > +	ensure_file "$context_dir/addr_unit" "exit" 600
> > 
> > [Severity: Medium]
> > Is "exit" a typo for "exist" in this new test?
> > 
> > If ensure_file() expects "exist" or "not_exist" as its second argument,
> > passing "exit" might cause the function to return immediately without
> > performing any file existence or permission checks, which would silently
> > skip the intended test coverage.
> 
> Good catch.  The ensure_file() expects "not_exist" or anything else for the
> second argument, so this test is working as intended.

Sashiko is correct.  The test was doing nothing.

> But definitely "exit" is
> a typo.  I will fix this in the next revision.

Anyway will be fixed in the next revision.


Thnks,
SJ

[...]

  reply	other threads:[~2026-05-20 14:21 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-20  6:28 [RFC PATCH 00/14] mm/damon: minor improvements for code readability and tests SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 01/14] mm/damon/core: safely handle no region case in damon_set_regions() SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 02/14] mm/damon/core: do not use region out of a loop " SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 03/14] samples/damon/mtier: replace damon_add_region() with damon_set_regions() SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 04/14] mm/damon/tests/vaddr-kunit: " SeongJae Park
2026-05-20  6:38   ` sashiko-bot
2026-05-20 13:53     ` SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 05/14] mm/damon/core: hide damon_add_region() SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 06/14] mm/damon/core: hide damon_insert_region() SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 07/14] mm/damon/core: hide damon_destroy_region() SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 08/14] mm/damon/core: add kdamond_call() debug_sanity check SeongJae Park
2026-05-20  6:52   ` sashiko-bot
2026-05-20 13:58     ` SeongJae Park
2026-05-20 14:04     ` SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 09/14] mm/damon/core: remove damon_verify_nr_regions() SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 10/14] mm/damon/tests/core-kunit: add damon_set_regions() test cases SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 11/14] selftests/damon/sysfs.py: stop kdamonds before failing SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 12/14] selftests/damon/sysfs.sh: test monitoring intervals goal dir SeongJae Park
2026-05-20  6:28 ` [RFC PATCH 13/14] selftests/damon/sysfs.sh: test addr_unit file existence SeongJae Park
2026-05-20  6:41   ` sashiko-bot
2026-05-20 14:08     ` SeongJae Park
2026-05-20 14:20       ` SeongJae Park [this message]
2026-05-20  6:28 ` [RFC PATCH 14/14] selftests/damon/sysfs.sh: test pause " SeongJae Park
2026-05-20  6:42   ` sashiko-bot
2026-05-20 14:11     ` 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=20260520142051.170627-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=damon@lists.linux.dev \
    --cc=sashiko-bot@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