sigsys test: correct count of delivered signals

(cherry picked from commit 09dd7240ac)
This commit is contained in:
Konstantin Belousov 2024-02-25 03:36:27 +02:00
parent 846bf43ca4
commit b9880e247b

View File

@ -41,23 +41,23 @@ sigsys_test(int knob)
ATF_REQUIRE(syscall(273) == -1); /* reserved */ ATF_REQUIRE(syscall(273) == -1); /* reserved */
ATF_CHECK_ERRNO(ENOSYS, true); ATF_CHECK_ERRNO(ENOSYS, true);
atomic_signal_fence(memory_order_seq_cst); atomic_signal_fence(memory_order_seq_cst);
ATF_CHECK_EQ(1 * knob, sigsys_cnt * knob); ATF_CHECK_EQ(1 * knob, sigsys_cnt);
ATF_REQUIRE(syscall(440) == -1); /* SYS_kse_switchin */ ATF_REQUIRE(syscall(440) == -1); /* SYS_kse_switchin */
ATF_CHECK_ERRNO(ENOSYS, true); ATF_CHECK_ERRNO(ENOSYS, true);
atomic_signal_fence(memory_order_seq_cst); atomic_signal_fence(memory_order_seq_cst);
ATF_CHECK_EQ(2 * knob, sigsys_cnt * knob); ATF_CHECK_EQ(2 * knob, sigsys_cnt);
/* Hope this is enough for say next two months */ /* Hope this is enough for say next two months */
ATF_REQUIRE(syscall(3000000) == -1); ATF_REQUIRE(syscall(3000000) == -1);
ATF_CHECK_ERRNO(ENOSYS, true); ATF_CHECK_ERRNO(ENOSYS, true);
atomic_signal_fence(memory_order_seq_cst); atomic_signal_fence(memory_order_seq_cst);
ATF_CHECK_EQ(3 * knob, sigsys_cnt * knob); ATF_CHECK_EQ(3 * knob, sigsys_cnt);
ATF_REQUIRE(syscall(SYS_afs3_syscall) == -1); ATF_REQUIRE(syscall(SYS_afs3_syscall) == -1);
ATF_CHECK_ERRNO(ENOSYS, true); ATF_CHECK_ERRNO(ENOSYS, true);
atomic_signal_fence(memory_order_seq_cst); atomic_signal_fence(memory_order_seq_cst);
ATF_CHECK_EQ(4 * knob, sigsys_cnt * knob); ATF_CHECK_EQ(4 * knob, sigsys_cnt);
} }
static void static void