Skip to content

Expand selftest utils

Benjamin Gray linuxppc-dev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest7 patches 5 repliesIn review
  2. v27 patches 1 replySuperseded
  3. v17 patches 1 replySuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7selftests/powerpc: Use mfspr/mtspr macrostools/testing/selftests/powerpc/dscr/dscr.h tools/testing/selftests/powerpc/ptrace/ptrace-hwbreak.c tools/testing/selftests/powerpc/ptrace/ptrace.h +1 more+10 -210 replies
2/7selftests/powerpc: Add ptrace setup_core_pattern() null-terminatortools/testing/selftests/powerpc/ptrace/core-pkey.c+3 -11 reply
3/7selftests/powerpc: Add generic read/write file utiltools/testing/selftests/powerpc/dscr/dscr.h tools/testing/selftests/powerpc/dscr/dscr_sysfs_test.c tools/testing/selftests/powerpc/include/utils.h +4 more+107 -1642 replies
4/7selftests/powerpc: Add read/write debugfs file, inttools/testing/selftests/powerpc/include/utils.h tools/testing/selftests/powerpc/security/entry_flush.c tools/testing/selftests/powerpc/security/rfi_flush.c +2 more+47 -351 reply
5/7selftests/powerpc: Parse long/unsigned long value safelytools/testing/selftests/powerpc/include/utils.h tools/testing/selftests/powerpc/pmu/lib.c tools/testing/selftests/powerpc/utils.c+59 -80 replies
6/7selftests/powerpc: Add {read,write}_{long,ulong}tools/testing/selftests/powerpc/dscr/dscr.h tools/testing/selftests/powerpc/dscr/dscr_sysfs_test.c tools/testing/selftests/powerpc/include/utils.h +2 more+76 -220 replies
7/7selftests/powerpc: Add automatically allocating read_filetools/testing/selftests/powerpc/include/utils.h tools/testing/selftests/powerpc/nx-gzip/gzfht_test.c tools/testing/selftests/powerpc/syscalls/Makefile +2 more+75 -1080 replies

Reviews trailers per patch

3 of 7 patches have a Reviewed-by or Acked-by.

PatchAndrew Donnellan
1/7R-b
2/7R-b
3/7
4/7R-b
5/7
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/7] Expand selftest utils

Started this when writing tests for a feature I'm working on, needing a way to read/write numbers to system files. After writing some utils to safely handle file IO and parsing, I realised I'd made the ~6th file read/write implementation and only(?) number parser that checks all the failure modes when expecting to parse a single number from a file.

So these utils ended up becoming this series. I also modified some other test utils I came across while doing so. My understanding is selftests are not expected to be backported, so I wasn't concerned about only introducing new utils and leaving the existing implementations be.

V3: * Add reviewed-by from previous version
* Fix write(2) call to include creation mode

Benjamin Gray (7):
selftests/powerpc: Use mfspr/mtspr macros selftests/powerpc: Add ptrace setup_core_pattern() null-terminator selftests/powerpc: Add generic read/write file util selftests/powerpc: Add read/write debugfs file, int selftests/powerpc: Parse long/unsigned long value safely selftests/powerpc: Add {read,write}_{long,ulong} selftests/powerpc: Add automatically allocating read_file

 tools/testing/selftests/powerpc/dscr/dscr.h   |  56 +---
 .../selftests/powerpc/dscr/dscr_sysfs_test.c  |  23 +-
 .../testing/selftests/powerpc/include/utils.h |  18 +-
 .../selftests/powerpc/nx-gzip/gzfht_test.c    |  52 +--
 tools/testing/selftests/powerpc/pmu/lib.c     |  35 +-
 .../selftests/powerpc/ptrace/core-pkey.c      |  28 +-
 .../selftests/powerpc/ptrace/ptrace-hwbreak.c |   6 +-
 .../testing/selftests/powerpc/ptrace/ptrace.h |   5 +-
 .../selftests/powerpc/security/entry_flush.c  |  12 +-
 .../selftests/powerpc/security/flush_utils.c  |   3 +-
 .../selftests/powerpc/security/rfi_flush.c    |  12 +-
 .../powerpc/security/uaccess_flush.c          |  18 +-
 .../selftests/powerpc/syscalls/Makefile       |   2 +-
 .../selftests/powerpc/syscalls/rtas_filter.c  |  80 +----
 tools/testing/selftests/powerpc/utils.c       | 314 ++++++++++++++----
 15 files changed, 341 insertions(+), 323 deletions(-)

base-commit: 247f34f7b80357943234f93f247a1ae6b6c3a740 --
2.38.1