summaryrefslogtreecommitdiff
path: root/Ports/stress-ng/patches/0007-disable-signal-code-validation.patch
blob: 5f79d926817e6580ff8991da0ba66458d3c4f850 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 08258d635aa54ad755a05757b14b047ae9754e0f Mon Sep 17 00:00:00 2001
From: Brian Gianforcaro <b.gianfo@gmail.com>
Date: Mon, 27 Dec 2021 23:30:03 -0800
Subject: [PATCH 07/14] serenity: Disable signal code validation for Serenity

We don't currently have a definition for SEGV_ACCERR, so
this validation is meaningless for SerenityOS.
---
 stress-sigsegv.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/stress-sigsegv.c b/stress-sigsegv.c
index 18b1ca6..e6bdf17 100644
--- a/stress-sigsegv.c
+++ b/stress-sigsegv.c
@@ -196,10 +196,13 @@ static int stress_sigsegv(const stress_args_t *args)
 				pr_fail("%s: expecting SIGSEGV/SIGILL/SIGBUS, got %s instead\n",
 					args->name, strsignal(signo));
 			}
+
+#if !defined(__serenity__)
 			if (verify && (signo == SIGBUS) && (code != SEGV_ACCERR)) {
 				pr_fail("%s: expecting SIGBUS si_code SEGV_ACCERR (%d), got %d instead\n",
 					args->name, SEGV_ACCERR, code);
 			}
+#endif
 #endif
 			inc_counter(args);
 		} else {
-- 
2.32.0