Live-Patching Archive on lore.kernel.org
 help / color / Atom feed
From: Miroslav Benes <mbenes@suse.cz>
To: Yannick Cote <ycote@redhat.com>
Cc: live-patching@vger.kernel.org, linux-kselftest@vger.kernel.org,
	joe.lawrence@redhat.com
Subject: Re: [PATCH 3/4] selftests/livepatch: more verification in test-klp-shadow-vars
Date: Mon, 1 Jun 2020 13:27:55 +0200 (CEST)
Message-ID: <alpine.LSU.2.21.2006011325170.2043@pobox.suse.cz> (raw)
In-Reply-To: <20200528134849.7890-4-ycote@redhat.com>

On Thu, 28 May 2020, Yannick Cote wrote:

> This change makes the test feel more familiar with narrowing to a
> typical usage by operating on a number of identical structure instances
> and populating the same two new shadow variables symmetrically while
> keeping the same testing and verification criteria for the extra
> variables.

It changes the order of shadow vars allocation and freeing (now we 
allocate everything first, while previously the order was more 
complicated), but it does not matter, I think.

One nit below and I have to trust you with the output.
 
> Signed-off-by: Yannick Cote <ycote@redhat.com>
> ---
>  lib/livepatch/test_klp_shadow_vars.c          | 182 ++++++++----------
>  .../selftests/livepatch/test-shadow-vars.sh   |  85 +++++---
>  2 files changed, 135 insertions(+), 132 deletions(-)
> 
> diff --git a/lib/livepatch/test_klp_shadow_vars.c b/lib/livepatch/test_klp_shadow_vars.c
> index ec2635cff974..195309e1edf3 100644
> --- a/lib/livepatch/test_klp_shadow_vars.c
> +++ b/lib/livepatch/test_klp_shadow_vars.c
> @@ -128,6 +128,11 @@ static int shadow_ctor(void *obj, void *shadow_data, void *ctor_data)
>  	return 0;
>  }
>  
> +/*
> + * With more than one item to free in the list, order is not determined and
> + * shadow_dtor will not be passed to shadow_free_all() which would make the
> + * test fail. (see pass 6)
> + */
>  static void shadow_dtor(void *obj, void *shadow_data)
>  {
>  	int **sv = shadow_data;
> @@ -136,6 +141,9 @@ static void shadow_dtor(void *obj, void *shadow_data)
>  		__func__, ptr_id(obj), ptr_id(sv));
>  }
>  
> +/* number of objects we simulate that need kpatch-patch shadow vars */

s/kpatch-patch// ?

Miroslav

  reply index

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28 13:48 [PATCH 0/4] selftests/livepatch: rework of test-klp-{callbacks,shadow_vars} Yannick Cote
2020-05-28 13:48 ` [PATCH 1/4] selftests/livepatch: rework test-klp-callbacks to use completion variables Yannick Cote
2020-06-02  8:16   ` Petr Mladek
2020-05-28 13:48 ` [PATCH 2/4] selftests/livepatch: rework test-klp-shadow-vars Yannick Cote
2020-06-02  9:25   ` Petr Mladek
2020-05-28 13:48 ` [PATCH 3/4] selftests/livepatch: more verification in test-klp-shadow-vars Yannick Cote
2020-06-01 11:27   ` Miroslav Benes [this message]
2020-06-01 11:39   ` Miroslav Benes
2020-06-02 12:35   ` Petr Mladek
2020-05-28 13:48 ` [PATCH 4/4] selftests/livepatch: fix mem leaks " Yannick Cote
2020-06-02  9:57   ` Petr Mladek
2020-05-29 15:12 ` [PATCH 0/4] selftests/livepatch: rework of test-klp-{callbacks,shadow_vars} Joe Lawrence
2020-06-01 11:48 ` Miroslav Benes
2020-06-02  5:01 ` Kamalesh Babulal

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=alpine.LSU.2.21.2006011325170.2043@pobox.suse.cz \
    --to=mbenes@suse.cz \
    --cc=joe.lawrence@redhat.com \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=ycote@redhat.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

Live-Patching Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/live-patching/0 live-patching/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 live-patching live-patching/ https://lore.kernel.org/live-patching \
		live-patching@vger.kernel.org
	public-inbox-index live-patching

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.live-patching


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git