linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Berg <benjamin@sipsolutions.net>
To: kunit-dev@googlegroups.com, linux-um@lists.infradead.org,
	"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Cc: Benjamin Berg <benjamin.berg@intel.com>
Subject: [RFC 0/2] Experimental kunit test for signal context handling
Date: Thu, 26 Jun 2025 21:57:12 +0200	[thread overview]
Message-ID: <20250626195714.2123694-1-benjamin@sipsolutions.net> (raw)

From: Benjamin Berg <benjamin.berg@intel.com>

Hi,

so I saw the UAPI testing framework patches and wondered whether I could
hack up a kunit test for userspace signal mcontext handling. I already
had some code, but never knew where to include it. Having it as a kunit
test in this way seems nice as it makes running the test really simple.

This is a very rough attempt with an extra patch to add sigaction
support as that is needed by the test.

Note that this type of test could possibly be shared with the x86
architecture (though UM does not support all features). And, a 64 bit
build might even want to include a second 32 bit binary. So, I suppose
one would ideally want the test to be in arch/x86/tests, with some way
to pick up it up in arch/x86/um/tests.

Does this seem sensible in general?

Benjamin

Benjamin Berg (2):
  tools/nolibc: add sigaction()
  um: add a mcontext FP register handling test

 arch/x86/um/Makefile                     |   2 +
 arch/x86/um/tests/Makefile               |  12 +++
 arch/x86/um/tests/registers.c            |  22 +++++
 arch/x86/um/tests/test-fp-save-restore.c | 118 +++++++++++++++++++++++
 tools/include/nolibc/nolibc.h            |   3 +
 tools/include/nolibc/signal.h            |  34 +++++++
 6 files changed, 191 insertions(+)
 create mode 100644 arch/x86/um/tests/Makefile
 create mode 100644 arch/x86/um/tests/registers.c
 create mode 100644 arch/x86/um/tests/test-fp-save-restore.c

-- 
2.50.0



             reply	other threads:[~2025-06-26 21:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-26 19:57 Benjamin Berg [this message]
2025-06-26 19:57 ` [RFC 1/2] tools/nolibc: add sigaction() Benjamin Berg
2025-06-27  4:48   ` Thomas Weißschuh
2025-06-27  6:46     ` Berg, Benjamin
2025-06-27  7:45       ` Thomas Weißschuh
2025-06-27  8:14         ` Berg, Benjamin
2025-06-26 19:57 ` [RFC 2/2] um: add a mcontext FP register handling test Benjamin Berg
2025-06-27  5:01   ` Thomas Weißschuh
2025-07-02  6:04   ` David Gow
2025-06-27  4:33 ` [RFC 0/2] Experimental kunit test for signal context handling Thomas Weißschuh
2025-06-27  7:29   ` Benjamin Berg
2025-06-27  8:43     ` Thomas Weißschuh
2025-06-27  8:48       ` Benjamin Berg
2025-06-27  9:22         ` Thomas Weißschuh
2025-06-27  9:28           ` Benjamin Berg

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=20250626195714.2123694-1-benjamin@sipsolutions.net \
    --to=benjamin@sipsolutions.net \
    --cc=benjamin.berg@intel.com \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-um@lists.infradead.org \
    --cc=thomas.weissschuh@linutronix.de \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).