Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>
To: Rae Moar <rmoar@google.com>
Cc: brendan.higgins@linux.dev, davidgow@google.com,
	linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kunit: Introduce autorun option
Date: Mon, 28 Oct 2024 11:16:52 -0700	[thread overview]
Message-ID: <20241028181652.GA825@skinsburskii.> (raw)
In-Reply-To: <CA+GJov4Kfo5EwjXRe8vufhMetsYzHG7bJS6VERaE8+1rNL69Vg@mail.gmail.com>

On Tue, Oct 22, 2024 at 05:16:31PM -0400, Rae Moar wrote:
> > diff --git a/lib/kunit/executor.c b/lib/kunit/executor.c
> > index 34b7b6833df3..340723571b0f 100644
> > --- a/lib/kunit/executor.c
> > +++ b/lib/kunit/executor.c
> > @@ -29,6 +29,22 @@ const char *kunit_action(void)
> >         return action_param;
> >  }
> >
> > +/*
> > + * Run KUnit tests after initialization
> > + */
> > +#ifdef CONFIG_KUNIT_AUTORUN_ENABLED
> > +static bool autorun_param = true;
> > +#else
> > +static bool autorun_param;
> > +#endif
> > +module_param_named(autorun, autorun_param, bool, 0);
> > +MODULE_PARM_DESC(autorun, "Run KUnit tests after initialization");
> > +
> > +bool kunit_autorun(void)
> > +{
> > +       return autorun_param;
> > +}
> > +
> >  static char *filter_glob_param;
> >  static char *filter_param;
> >  static char *filter_action_param;
> > @@ -266,7 +282,7 @@ void kunit_exec_run_tests(struct kunit_suite_set *suite_set, bool builtin)
> >                 pr_info("1..%zu\n", num_suites);
> 
> When using this feature, I still see some KTAP output that are printed
> from this function (kunit_exec_run_tests). I think it would be great
> if we could remove this output as to not clutter the kernel log.
> 
> At first, I was confused as to why we needed to call this function and
> initialize the tests but I realized the debugfs suites need to be
> created.
> 
> So instead, could we check for kunit_autorun() here instead as a
> condition before printing the output?
> 

Sure, I'll address it in the next revision.

Thanks,
Stanislav

  reply	other threads:[~2024-10-28 18:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-17 21:34 [PATCH] kunit: Introduce autorun option Stanislav Kinsburskii
2024-10-22 21:16 ` Rae Moar
2024-10-28 18:16   ` Stanislav Kinsburskii [this message]
2025-01-13 18:37 ` Stanislav Kinsburskii

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=20241028181652.GA825@skinsburskii. \
    --to=skinsburskii@linux.microsoft.com \
    --cc=brendan.higgins@linux.dev \
    --cc=davidgow@google.com \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=rmoar@google.com \
    /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