[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] xen/livepatch: fix livepatch tests
On Tue, Nov 28, 2023 at 5:41 PM Roger Pau Monne <roger.pau@xxxxxxxxxx> 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@xxxxxxxxxx> > --- > 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@xxxxxxxxxx>
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |