mbox series

[0/4] selftests/livepatch: rework of test-klp-{callbacks,shadow_vars}

Message ID 20200528134849.7890-1-ycote@redhat.com (mailing list archive)
Headers show
Series selftests/livepatch: rework of test-klp-{callbacks,shadow_vars} | expand

Message

Yannick Cote May 28, 2020, 1:48 p.m. UTC
The test-klp-callbacks change implement a synchronization replacement of
initial code to use completion variables instead of delays. The
completion variable interlocks the busy module with the concurrent
loading of the target livepatch patches which works with the execution
flow instead of estimated time delays.

The test-klp-shadow-vars changes first refactors the code to be more of
a readable example as well as continuing to verify the component code.
The patch is broken in two to display the renaming and restructuring in
part 1 and the addition and change of logic in part 2. The last change
frees memory before bailing in case of errors.

Patchset to be merged via the livepatching tree is against: livepatching/for-next

Joe Lawrence (1):
  selftests/livepatch: rework test-klp-callbacks to use completion
    variables

Yannick Cote (3):
  selftests/livepatch: rework test-klp-shadow-vars
  selftests/livepatch: more verification in test-klp-shadow-vars
  selftests/livepatch: fix mem leaks in test-klp-shadow-vars

 lib/livepatch/test_klp_callbacks_busy.c       |  42 +++-
 lib/livepatch/test_klp_shadow_vars.c          | 222 +++++++++---------
 .../selftests/livepatch/test-callbacks.sh     |  29 ++-
 .../selftests/livepatch/test-shadow-vars.sh   |  85 ++++---
 4 files changed, 214 insertions(+), 164 deletions(-)

Comments

Joe Lawrence May 29, 2020, 3:12 p.m. UTC | #1
On 5/28/20 9:48 AM, Yannick Cote wrote:
> The test-klp-callbacks change implement a synchronization replacement of
> initial code to use completion variables instead of delays. The
> completion variable interlocks the busy module with the concurrent
> loading of the target livepatch patches which works with the execution
> flow instead of estimated time delays.
> 

For more context: we had been seeing occasional glitches with this test 
in our continuous kernel integration suite.  In every case, it seemed 
that the worker thread wasn't running when expected, so I assumed that 
system load had something to do with it.  We shuffled the ordering of 
tests, but still encountered issues and I decided life was too sort to 
continue remotely debugging sleep-"synchronized" code.

> The test-klp-shadow-vars changes first refactors the code to be more of
> a readable example as well as continuing to verify the component code.
> The patch is broken in two to display the renaming and restructuring in
> part 1 and the addition and change of logic in part 2. The last change
> frees memory before bailing in case of errors.
> 

Yannick's patches look fine to me, so for those:

Acked-by: Joe Lawrence <joe.lawrence@redhat.com>

(I can ack individually if required, let me know.)

-- Joe
Miroslav Benes June 1, 2020, 11:48 a.m. UTC | #2
On Thu, 28 May 2020, Yannick Cote wrote:

> The test-klp-callbacks change implement a synchronization replacement of
> initial code to use completion variables instead of delays. The
> completion variable interlocks the busy module with the concurrent
> loading of the target livepatch patches which works with the execution
> flow instead of estimated time delays.
> 
> The test-klp-shadow-vars changes first refactors the code to be more of
> a readable example as well as continuing to verify the component code.
> The patch is broken in two to display the renaming and restructuring in
> part 1 and the addition and change of logic in part 2. The last change
> frees memory before bailing in case of errors.

With the small comments, I made, fixed

Acked-by: Miroslav Benes <mbenes@suse.cz>

M
Kamalesh Babulal June 2, 2020, 5:01 a.m. UTC | #3
On 5/28/20 7:18 PM, Yannick Cote wrote:
> The test-klp-callbacks change implement a synchronization replacement of
> initial code to use completion variables instead of delays. The
> completion variable interlocks the busy module with the concurrent
> loading of the target livepatch patches which works with the execution
> flow instead of estimated time delays.
> 
> The test-klp-shadow-vars changes first refactors the code to be more of
> a readable example as well as continuing to verify the component code.
> The patch is broken in two to display the renaming and restructuring in
> part 1 and the addition and change of logic in part 2. The last change
> frees memory before bailing in case of errors.
> 
> Patchset to be merged via the livepatching tree is against: livepatching/for-next
> 
> Joe Lawrence (1):
>   selftests/livepatch: rework test-klp-callbacks to use completion
>     variables
> 
> Yannick Cote (3):
>   selftests/livepatch: rework test-klp-shadow-vars
>   selftests/livepatch: more verification in test-klp-shadow-vars
>   selftests/livepatch: fix mem leaks in test-klp-shadow-vars
> 
>  lib/livepatch/test_klp_callbacks_busy.c       |  42 +++-
>  lib/livepatch/test_klp_shadow_vars.c          | 222 +++++++++---------
>  .../selftests/livepatch/test-callbacks.sh     |  29 ++-
>  .../selftests/livepatch/test-shadow-vars.sh   |  85 ++++---
>  4 files changed, 214 insertions(+), 164 deletions(-)
> 

Series looks good to me, with one minor typo in patch 3 (s/kpatch-patch//),
which Miroslav as already mentioned.

Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>