TEST_SIGNAL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ TEST_SIGNAL(9) β€” Kernel API Manual, but make it group-chat ✨

Okay bestie, welcome to the TEST_SIGNAL(9) page from the Kernel API Manual. It's giving tiny macro, huge selftest energy, and we're gonna walk through it with zero skips. πŸ’…


✨ NAME ✨

  • TEST_SIGNAL β€” that's the name, and the original page literally just has TEST_SIGNAL - with no description after the dash. Not me inventing lore that isn't there. 🫢

🫢 SYNOPSIS 🫢

TEST_SIGNAL (test_name , signal );

πŸŽ€ ARGUMENTS πŸŽ€

  • test_name β€” test name.
  • signal β€” signal number.

πŸ’– DESCRIPTION πŸ’–

The shape of it is:

TEST_SIGNAL(name, signal) { implementation }

So basically TEST_SIGNAL(name, signal) defines a test by name and the expected term signal. Slay.

⚠️ Names must be unique, and tests must not be run in parallel. That's not a vibe suggestion, bestie, it's the rule.

The implementation containing block is a function, and scoping should be treated as such. Returning early may be performed with a bare return; statement. So yes, you can dip out early with just return;.

EXPECT_* and ASSERT_* are valid in a TEST { } context. Periodt.


🌈 SEE ALSO 🌈

The extended universe is linked here in the exact original order, no skips: Kernel file ./tools/testing/selftests/kselftest_harness.h example(9), TH_LOG(9), SKIP(9), TEST(9), FIXTURE_DATA(9), FIXTURE(9), FIXTURE_SETUP(9), FIXTURE_TEARDOWN(9), FIXTURE_TEARDOWN_PARENT(9), FIXTURE_VARIANT(9), FIXTURE_VARIANT_ADD(9), TEST_F(9), TEST_HARNESS_MAIN(9), operators(9), ASSERT_EQ(9), ASSERT_NE(9), ASSERT_LT(9), ASSERT_LE(9), ASSERT_GT(9), ASSERT_GE(9), ASSERT_NULL(9), ASSERT_TRUE(9), ASSERT_FALSE(9), ASSERT_STREQ(9), ASSERT_STRNE(9), EXPECT_EQ(9), EXPECT_NE(9), EXPECT_LT(9), EXPECT_LE(9), EXPECT_GT(9), EXPECT_GE(9), EXPECT_NULL(9), EXPECT_TRUE(9), EXPECT_FALSE(9), EXPECT_STREQ(9), EXPECT_STRNE(9), XFAIL_ADD(9).

Mwah πŸ’‹ β€” this page's source/version is ./tools/testing/selftests, dated October 2026, and it's still TEST_SIGNAL(9) at heart. πŸŽ€

πŸ“¦ where this page comes from