All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Ross Lagerwall <ross.lagerwall@cloud.com>
Cc: xen-devel@lists.xenproject.org,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: [PATCH] xen/livepatch: fix livepatch tests
Date: Wed, 29 Nov 2023 15:07:00 +0100	[thread overview]
Message-ID: <ZWdFhCa9Umew4sQR@macbook> (raw)
In-Reply-To: <CAG7k0EqEjbL2LFoB4gn+VNQu_QEDVR8oaCjwdPp++B=Q3jA7CA@mail.gmail.com>

On Wed, Nov 29, 2023 at 10:32:32AM +0000, Ross Lagerwall wrote:
> On Tue, Nov 28, 2023 at 5:41 PM Roger Pau Monne <roger.pau@citrix.com> wrote:
> >
> > The current set of in-tree livepatch tests in xen/test/livepatch started
> > failing after the constify of the payload funcs array, and the movement of the
> > status data into a separate array.
> >
> > Fix the tests so they respect the constness of the funcs array and also make
> > use of the new location of the per-func state data.
> >
> > Fixes: 82182ad7b46e ('livepatch: do not use .livepatch.funcs section to store internal state')
> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> > ---
> > I will see about getting those tests build in gitlab, in the meantime we should
> > take this fix in order to unblock osstest.
> > ---
> >  xen/test/livepatch/xen_action_hooks.c         | 12 +++++-----
> >  xen/test/livepatch/xen_action_hooks_marker.c  | 20 ++++++++++-------
> >  xen/test/livepatch/xen_action_hooks_noapply.c | 22 +++++++++++--------
> >  xen/test/livepatch/xen_action_hooks_nofunc.c  |  6 ++---
> >  .../livepatch/xen_action_hooks_norevert.c     | 22 +++++++++++--------
> >  xen/test/livepatch/xen_prepost_hooks.c        |  8 +++----
> >  xen/test/livepatch/xen_prepost_hooks_fail.c   |  2 +-
> >  7 files changed, 53 insertions(+), 39 deletions(-)
> >
> snip
> > diff --git a/xen/test/livepatch/xen_action_hooks_norevert.c b/xen/test/livepatch/xen_action_hooks_norevert.c
> > index ef77e720713e..1c4873f55640 100644
> > --- a/xen/test/livepatch/xen_action_hooks_norevert.c
> > +++ b/xen/test/livepatch/xen_action_hooks_norevert.c
> > @@ -25,9 +25,10 @@ static int pre_apply_hook(livepatch_payload_t *payload)
> >
> >      for (i = 0; i < payload->nfuncs; i++)
> >      {
> > -        struct livepatch_func *func = &payload->funcs[i];
> > +        const struct livepatch_func *func = &payload->funcs[i];
> > +        struct livepatch_fstate *fstate = &payload->fstate[i];
> >
> > -        BUG_ON(func->applied == LIVEPATCH_FUNC_APPLIED);
> > +        BUG_ON(fstate->applied == LIVEPATCH_FUNC_APPLIED);
> >          printk(KERN_DEBUG "%s: pre applied: %s\n", __func__, func->name);
> >      }
> >
> > @@ -44,9 +45,10 @@ static void post_apply_hook(livepatch_payload_t *payload)
> >
> >      for (i = 0; i < payload->nfuncs; i++)
> >      {
> > -        struct livepatch_func *func = &payload->funcs[i];
> > +        const struct livepatch_func *func = &payload->funcs[i];
> > +        struct livepatch_fstate *fstate = &payload->fstate[i];
> >
> > -        BUG_ON(func->applied != LIVEPATCH_FUNC_APPLIED);
> > +        BUG_ON(fstate->applied != LIVEPATCH_FUNC_APPLIED);
> >          printk(KERN_DEBUG "%s: post applied: %s\n", __func__, func->name);
> >      }
> >
> > @@ -62,8 +64,9 @@ static int pre_revert_hook(livepatch_payload_t *payload)
> >      for (i = 0; i < payload->nfuncs; i++)
> >      {
> >          struct livepatch_func *func = &payload->funcs[i];
> 
> const here too?
> 
> With that fixed...
> Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>

Oh, so that file is not even built.  Will see about getting it built.

Thanks, Roger.


      reply	other threads:[~2023-11-29 14:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-28 17:41 [PATCH] xen/livepatch: fix livepatch tests Roger Pau Monne
2023-11-28 17:44 ` Andrew Cooper
2023-11-29 10:32 ` Ross Lagerwall
2023-11-29 14:07   ` Roger Pau Monné [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=ZWdFhCa9Umew4sQR@macbook \
    --to=roger.pau@citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=ross.lagerwall@cloud.com \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.