Page MenuHomeFreeBSD

Basic signal tests: Can we deliver a signal?

Authored by imp on Nov 22 2021, 4:34 PM.



Basic signal tests that tests can we deliver a signal via raise() and
can we deliver one via SIGALARM asynchronously.

In addition, tests whether or not on ARM T32 (Thumb) code can interrupt
A32 (normal) and vice versa.

While this test is aimed at ensuring basic qemu signals are working,
it's good to have in the base.

Sponsored by: Netflix

Test Plan

Tested on x86 and passes.
Haven't tested the armv7 stuff yet.

Diff Detail

rS FreeBSD src repository - subversion
Lint OK
No Unit Test Coverage
Build Status
Buildable 42917
Build 39805: arc lint + arc unit

Event Timeline

imp requested review of this revision.Nov 22 2021, 4:34 PM
imp created this revision.



+volatile here and on the ARM ones


I think this and the below will need alternative GCC versions; the GCC documentation seems to indicate that arch= is specifically for -march options, and the GCC equivalents to this specifically are just target("arm") and target("thumb").

I wonder if these are worth macros in cdefs.h, but I really can't come up with a good name for those... __thumb is maybe not terrible, but __arm probably is. __a32 and __t32 maybe, but that feels a bit obscure.


I think clang now support the GNU syntax, so maybe using it would be enough ?


They build and appear to work on both. I'm not sure I want to invent something for FreeBSD for an architecture that may be the long glide path after peaking that currently only has use in a test.

imp edited the test plan for this revision. (Show Details)

+ volatile.


Hmmm, there may be a clang issue... Rebuilding to make sure.

imp marked 2 inline comments as done.Nov 22 2021, 11:31 PM

Updated with the 'marker' things. Didn't see that we had this in the rest of the tree, so I thought I'd limit them to this file...


As you see, I needed to update since the above code review doesn't seem to be in the clang tree yet. Or at least the latest tree needs them...

... The only other place that we'd need them is when we do T32 / A32 thread tests...


Shouldn't that be just target("arm") and target("thumb") for gcc ? :)

Turns out cognet was right. target("arm") not target("arch=arm") is the
form. And it seems to work for both clang and arm.

better comments. remind the reader that thumb function addresses have the low
bit set.

imp marked 2 inline comments as done.Nov 23 2021, 8:40 PM

I'm going to go ahead and commit this: it passes in my env for amd64, aarch64 and armv7 (running in a chroot on aarch64).


My last comment is wrong: this code was wrong in arch=arm. target(arm) and target(thumb) just work for both gcc and clang.

This revision was not accepted when it landed; it landed in state Needs Review.Nov 23 2021, 8:42 PM
This revision was automatically updated to reflect the committed changes.