linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] selftests/mm/uffd: refactor global variables
@ 2025-05-01 16:38 Ujwal Kundur
  2025-05-01 16:38 ` [PATCH 1/4] selftests/mm/uffd: Refactor non-composite global vars into struct Ujwal Kundur
                   ` (9 more replies)
  0 siblings, 10 replies; 39+ messages in thread
From: Ujwal Kundur @ 2025-05-01 16:38 UTC (permalink / raw)
  To: akpm, peterx, shuah; +Cc: linux-mm, linux-kselftest, linux-kernel, Ujwal Kundur

This patchset refactors non-composite global variables into a common
struct that can be initialized and passed around per-test instead of
relying on the presence of global variables.

This allows:
- Better encapsulation
- Debugging becomes easier -- local variable state can be viewed per
  stack frame, and we can more easily reason about the variable
  mutations

Patch 1 needs to be applied first and can be followed by any of the
other patches.
I've ensured that the tests are passing locally (or atleast have the
same output as the code on master).

Ujwal Kundur (4):
  selftests/mm/uffd: Refactor non-composite global vars into struct
  selftests/mm/uffd: Swap global vars with global test options
  selftests/mm/uffd: Swap global variables with global test opts
  selftests/mm/uffd: Swap global variables with global test opts

 tools/testing/selftests/mm/uffd-common.c     | 269 +++++-----
 tools/testing/selftests/mm/uffd-common.h     |  78 +--
 tools/testing/selftests/mm/uffd-stress.c     | 226 ++++----
 tools/testing/selftests/mm/uffd-unit-tests.c | 523 ++++++++++---------
 tools/testing/selftests/mm/uffd-wp-mremap.c  |  23 +-
 5 files changed, 591 insertions(+), 528 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2025-08-16 14:12 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-01 16:38 [PATCH 0/4] selftests/mm/uffd: refactor global variables Ujwal Kundur
2025-05-01 16:38 ` [PATCH 1/4] selftests/mm/uffd: Refactor non-composite global vars into struct Ujwal Kundur
2025-05-02 12:16   ` Brendan Jackman
2025-05-02 12:28     ` Brendan Jackman
2025-05-03 18:16       ` Ujwal Kundur
2025-05-04  2:25         ` Andrew Morton
2025-05-01 16:38 ` [PATCH 2/4] selftests/mm/uffd: Swap global vars with global test options Ujwal Kundur
2025-05-01 16:38 ` [PATCH 3/4] selftests/mm/uffd: Swap global variables with global test opts Ujwal Kundur
2025-05-01 16:38 ` [PATCH 4/4] " Ujwal Kundur
2025-05-02 12:18 ` [PATCH 0/4] selftests/mm/uffd: refactor global variables Brendan Jackman
2025-05-04  9:48 ` [PATCH v2 1/1] selftests/mm/uffd: Refactor non-composite global vars into struct Ujwal Kundur
2025-05-06  0:57   ` Andrew Morton
2025-05-10 16:03 ` [PATCH v3 " Ujwal Kundur
2025-05-13 12:12   ` Brendan Jackman
2025-05-19 13:50     ` Ujwal Kundur
2025-05-19 21:40       ` Andrew Morton
2025-05-20  9:16       ` Brendan Jackman
2025-05-25 19:19         ` Ujwal Kundur
2025-05-26  9:08           ` Brendan Jackman
2025-05-30  7:45             ` Ujwal Kundur
2025-05-31  7:46 ` [PATCH v4 " Ujwal Kundur
2025-06-10  6:57   ` Ujwal Kundur
2025-06-10 11:32   ` Brendan Jackman
2025-06-16  6:38     ` Ujwal Kundur
2025-06-16 10:04 ` [PATCH v5 " Ujwal Kundur
2025-06-17  0:26   ` Andrew Morton
2025-06-17 15:52     ` Peter Xu
2025-06-17 17:22       ` Peter Xu
2025-06-18 10:00         ` Brendan Jackman
2025-06-26  5:22           ` Ujwal Kundur
2025-06-26 14:12             ` Peter Xu
2025-06-30 11:25               ` Ujwal Kundur
2025-07-02 15:20 ` [PATCH v6 " Ujwal Kundur
2025-07-04 16:20   ` Peter Xu
2025-07-10  5:07     ` Ujwal Kundur
2025-08-06 15:03       ` Ujwal Kundur
2025-08-07 16:45         ` Peter Xu
2025-08-13 11:33         ` Brendan Jackman
2025-08-16 14:12           ` Ujwal Kundur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).