From fad9da335e27accddbaca7b3c5183baef397a562 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Fri, 2 Aug 2024 22:18:14 +1200 Subject: [PATCH] Accept cases where we don't have permission to disable `PR_SPEC_STORE_BYPASS` --- src/test/prctl_speculation_ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/prctl_speculation_ctrl.c b/src/test/prctl_speculation_ctrl.c index 3c19e639265..61aa78e6fbb 100644 --- a/src/test/prctl_speculation_ctrl.c +++ b/src/test/prctl_speculation_ctrl.c @@ -34,7 +34,7 @@ int main(void) { } else if (ret & PR_SPEC_ENABLE) { test_assert(-1 == prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_DISABLE, 0, 0) && - errno == ENXIO); + (errno == ENXIO || errno == EPERM)); } else { test_assert(-1 == prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_ENABLE, 0, 0) &&