Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Vishal Chourasia <vishalc@linux.ibm.com>
Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: selftests/sched_ext: enq_last_no_enq_fails testcase fails
Date: Wed, 23 Oct 2024 11:46:25 -1000	[thread overview]
Message-ID: <Zxluscvm4S9qPgKo@slm.duckdns.org> (raw)
In-Reply-To: <Zxknp7RAVNjmdJSc@linux.ibm.com>

Hello,

On Wed, Oct 23, 2024 at 10:13:19PM +0530, Vishal Chourasia wrote:
...
> static int scx_ops_enable(struct sched_ext_ops *ops, struct bpf_link *link)
> {
> ...
>          ret = validate_ops(ops);
>           if (ret)
>                   goto err_disable;
> ...
>   err_disable:
>           mutex_unlock(&scx_ops_enable_mutex);
>           /*
>            * Returning an error code here would not pass all the error information
>            * to userspace. Record errno using scx_ops_error() for cases
>            * scx_ops_error() wasn't already invoked and exit indicating success so
>            * that the error is notified through ops.exit() with all the details.
>            *
>            * Flush scx_ops_disable_work to ensure that error is reported before
>            * init completion.
>            */
>           scx_ops_error("scx_ops_enable() failed (%d)", ret);
>           kthread_flush_work(&scx_ops_disable_work);
>           return 0;
>   }
> 
> validate_ops() correctly reports the error, but err_disable path ultimately
> returns with a value of zero

Yeah, this is because the failure is now communicated through the scheduler
unload path which has richer error reporting. The exit is triggered
immediately but loading still succeeds. We need to update the test framework
to detect this failure mode too.

Thanks.

-- 
tejun

      reply	other threads:[~2024-10-23 21:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-23 16:43 selftests/sched_ext: enq_last_no_enq_fails testcase fails Vishal Chourasia
2024-10-23 21:46 ` Tejun Heo [this message]

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=Zxluscvm4S9qPgKo@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=vishalc@linux.ibm.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