Skip to content

selftests/livepatch: rework of test-klp-{callbacks,shadow_vars}

Yannick Cote linux-kselftest live-patching lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 4 repliesIn review
  2. v14 patches 9 repliesSuperseded

Changes in v2 from the cover letter

- drop completion variables and flush workqueue [pmladek]
- comment typo/pr_info cleanup [kbabulal/mbenes]
- cleanup goto ret assignations [pmladek]
- allocate pndup[]'s, leave some svar allocations to shadow_get_or_alloc() [pmladek]
- change allocation order for cleaner test dmesg output [pmladek]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4selftests/livepatch: simplify test-klp-callbacks busy target testslib/livepatch/test_klp_callbacks_busy.c tools/testing/selftests/livepatch/test-callbacks.sh+42 -243 replies
2/4selftests/livepatch: rework test-klp-shadow-varslib/livepatch/test_klp_shadow_vars.c+57 -440 replies
3/4selftests/livepatch: more verification in test-klp-shadow-varslib/livepatch/test_klp_shadow_vars.c tools/testing/selftests/livepatch/test-shadow-vars.sh+143 -1301 reply
4/4selftests/livepatch: fix mem leaks in test-klp-shadow-varslib/livepatch/test_klp_shadow_vars.c+31 -120 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchPetr MladekKamalesh BabulalMiroslav BenesJoe Lawrence
1/4R-b A-b
2/4R-b R-b A-b A-b
3/4R-b R-b A-b A-b
4/4R-b R-b A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v2 thread

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

v2:
- drop completion variables and flush workqueue [pmladek]
- comment typo/pr_info cleanup [kbabulal/mbenes]
- cleanup goto ret assignations [pmladek]
- allocate pndup[]'s, leave some svar allocations to shadow_get_or_alloc() [pmladek]
- change allocation order for cleaner test dmesg output [pmladek]

The test-klp-callbacks change implements a synchronization replacement of initial code which relied on solely on sleep delays. Remove the sleeps and pass a block_transition flag from test script to module. Use flush_workqueue() to serialize module output for test result consideration.

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: simplify test-klp-callbacks busy target tests

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       |  37 ++-
 lib/livepatch/test_klp_shadow_vars.c          | 240 ++++++++++--------
 .../selftests/livepatch/test-callbacks.sh     |  29 +--
 .../selftests/livepatch/test-shadow-vars.sh   |  81 +++---
 4 files changed, 225 insertions(+), 162 deletions(-)
Signature · 1 line
2.25.4