1 // SPDX-License-Identifier: MIT
2 // SPDX-FileCopyrightText: 2024 Michael Jeanson <mjeanson@efficios.com>
16 * Check the state of the public symbols when the rseq syscall is available but
17 * no thread has registered.
22 struct rseq_abi
*rseq_abi
;
26 if (!rseq_available(RSEQ_AVAILABLE_QUERY_KERNEL
)) {
27 skip(NR_TESTS
, "rseq syscall unavailable");
31 /* The syscall is available but the current thread is not registered. */
33 ok(rseq_flags
== 0, "rseq_flags prior to registration is 0 (%d)", rseq_flags
);
34 ok(rseq_size
>= 32, "rseq_size prior to registration is 32 or greater (%d)", rseq_size
);
35 ok(rseq_feature_size
>= 20, "rseq_feature_size prior to registration is 20 or greater (%d)", rseq_feature_size
);
36 ok(rseq_offset
!= 0, "rseq_offset prior to registration is not 0 (%td)", rseq_offset
);
38 rseq_abi
= rseq_get_abi();
39 ok((int32_t) rseq_abi
->cpu_id
== RSEQ_ABI_CPU_ID_UNINITIALIZED
,
40 "rseq->cpu_id is set to RSEQ_ABI_CPU_ID_UNINITIALIZED (%d)",
41 (int32_t) rseq_abi
->cpu_id
);