Ports: Regenerate stress-ng patches

And autogenerate a readme.
This fixes the one patch that wasn't made with git.
This commit is contained in:
Ali Mohammad Pur 2022-01-13 16:16:59 +03:30 committed by Ali Mohammad Pur
parent f81e28039b
commit ed87bd7fe1
Notes: sideshowbarker 2024-07-17 20:48:04 +09:00
15 changed files with 139 additions and 88 deletions

View file

@ -1,7 +1,7 @@
From 5ce9746b2885d2a3da7f5dbe6c15de858b093188 Mon Sep 17 00:00:00 2001
From d5955e243cc81d6565eec57ccec282523348e735 Mon Sep 17 00:00:00 2001
From: Brian Gianforcaro <b.gianfo@gmail.com>
Date: Mon, 27 Dec 2021 20:53:47 -0800
Subject: [PATCH 01/14] serenity: Disable linux scheduler integration on
Subject: [PATCH 01/12] serenity: Disable linux scheduler integration on
Serenity
Follow the path of other platforms, and make this code nop
@ -26,7 +26,7 @@ index a27d15a..65ebe8c 100644
static const char prefix[] = "sched";
diff --git a/stress-schedpolicy.c b/stress-schedpolicy.c
index ceaf535..3fdb74d 100644
index e57b1d8..749e0c1 100644
--- a/stress-schedpolicy.c
+++ b/stress-schedpolicy.c
@@ -33,7 +33,8 @@ static const stress_help_t help[] = {
@ -40,5 +40,5 @@ index ceaf535..3fdb74d 100644
static const int policies[] = {
#if defined(SCHED_IDLE)
--
2.32.0
2.34.1

View file

@ -1,7 +1,7 @@
From d378b4416270a99b321689f759e29fb5c9126c1a Mon Sep 17 00:00:00 2001
From c77af92eb60ed81f0956d82361ac3a4ae88e9cf6 Mon Sep 17 00:00:00 2001
From: Brian Gianforcaro <b.gianfo@gmail.com>
Date: Mon, 27 Dec 2021 20:57:05 -0800
Subject: [PATCH 02/14] serenity: Disable itimer testing when compiling for
Subject: [PATCH 02/12] serenity: Disable itimer testing when compiling for
Serenity
The itimer APIs are not implemented in serenity, so just disable
@ -113,5 +113,5 @@ index b7abae5..8d0481b 100644
ret = bad_syscall(addr);
if (ret < 0)
--
2.32.0
2.34.1

View file

@ -1,7 +1,7 @@
From d28829e86cc1c8dff2c46fbeb3d4d1217fa4fd5c Mon Sep 17 00:00:00 2001
From fc1915941417ecea79023636925448d2a0f06853 Mon Sep 17 00:00:00 2001
From: Brian Gianforcaro <b.gianfo@gmail.com>
Date: Mon, 27 Dec 2021 20:58:41 -0800
Subject: [PATCH 03/14] serenity: Fix duplicate definition of ALWAYS_INLINE on
Subject: [PATCH 03/12] serenity: Fix duplicate definition of ALWAYS_INLINE on
serenity
---
@ -9,10 +9,10 @@ Subject: [PATCH 03/14] serenity: Fix duplicate definition of ALWAYS_INLINE on
1 file changed, 5 insertions(+)
diff --git a/stress-ng.h b/stress-ng.h
index 73f549b..44f8bfa 100644
index 41fb906..837790b 100644
--- a/stress-ng.h
+++ b/stress-ng.h
@@ -1230,6 +1230,11 @@ typedef struct {
@@ -1234,6 +1234,11 @@ typedef struct {
#define WEAK
#endif
@ -25,5 +25,5 @@ index 73f549b..44f8bfa 100644
#if (defined(__GNUC__) && NEED_GNUC(3, 4, 0) \
&& ((!defined(__s390__) && !defined(__s390x__)) || NEED_GNUC(6, 0, 1))) || \
--
2.32.0
2.34.1

View file

@ -1,7 +1,7 @@
From c7856e765e893ff447b2309d06a55d0d06a70d02 Mon Sep 17 00:00:00 2001
From 871d6d7e7bc3d7f85bdff69cb4b6122e78a82063 Mon Sep 17 00:00:00 2001
From: Brian Gianforcaro <b.gianfo@gmail.com>
Date: Mon, 27 Dec 2021 20:59:35 -0800
Subject: [PATCH 04/14] serenity: ifdef out key_t type usage, which serenity
Subject: [PATCH 04/12] serenity: ifdef out key_t type usage, which serenity
does not have
---
@ -9,10 +9,10 @@ Subject: [PATCH 04/14] serenity: ifdef out key_t type usage, which serenity
1 file changed, 3 insertions(+)
diff --git a/stress-ng.h b/stress-ng.h
index 44f8bfa..edaa2ce 100644
index 837790b..2388815 100644
--- a/stress-ng.h
+++ b/stress-ng.h
@@ -2490,11 +2490,14 @@ typedef struct {
@@ -2501,11 +2501,14 @@ typedef struct {
uint32_t futex[STRESS_PROCS_MAX]; /* Shared futexes */
uint64_t timeout[STRESS_PROCS_MAX]; /* Shared futex timeouts */
} futex;
@ -28,5 +28,5 @@ index 44f8bfa..edaa2ce 100644
struct {
bool no_perf; /* true = Perf not available */
--
2.32.0
2.34.1

View file

@ -1,7 +1,7 @@
From 308c59d16757b935bc6ad7c369b80681fa879f80 Mon Sep 17 00:00:00 2001
From 6e46eec4b5490c810bf12e89aabc49c23ddd272e Mon Sep 17 00:00:00 2001
From: Brian Gianforcaro <b.gianfo@gmail.com>
Date: Mon, 27 Dec 2021 21:01:59 -0800
Subject: [PATCH 05/14] serenity: Mark hsearch stressor as not implemented on
Subject: [PATCH 05/12] serenity: Mark hsearch stressor as not implemented on
Serenity
---
@ -32,5 +32,5 @@ index 61c71a6..345a2ca 100644
+};
+#endif
--
2.32.0
2.34.1

View file

@ -1,7 +1,7 @@
From 08258d635aa54ad755a05757b14b047ae9754e0f Mon Sep 17 00:00:00 2001
From e8fd707250d04c8d782175bec85fc82c2fe9ac67 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
Subject: [PATCH 06/12] serenity: Disable signal code validation for Serenity
We don't currently have a definition for SEGV_ACCERR, so
this validation is meaningless for SerenityOS.
@ -28,5 +28,5 @@ index 18b1ca6..e6bdf17 100644
inc_counter(args);
} else {
--
2.32.0
2.34.1

View file

@ -1,7 +1,7 @@
From 2742eeb0aca33560354de125fb7af3cbe986b414 Mon Sep 17 00:00:00 2001
From c6fd5831cbd21c3c6d3689bea6c790a221b6c96d Mon Sep 17 00:00:00 2001
From: Brian Gianforcaro <b.gianfo@gmail.com>
Date: Mon, 27 Dec 2021 23:46:44 -0800
Subject: [PATCH 10/14] serenity: Disable rand48 cpu stressor, it's not
Subject: [PATCH 07/12] serenity: Disable rand48 cpu stressor, it's not
implemented for Serenity
---
@ -40,5 +40,5 @@ index 81dd882..b3a586d 100644
{ "sdbm", stress_cpu_sdbm },
{ "sieve", stress_cpu_sieve },
--
2.32.0
2.34.1

View file

@ -1,7 +1,7 @@
From 176c9d8becd0ea0469a9d75df46a78ae913acd33 Mon Sep 17 00:00:00 2001
From 72e43b83f27b9ea385a28c4f1e3f65ec3e442706 Mon Sep 17 00:00:00 2001
From: Brian Gianforcaro <b.gianfo@gmail.com>
Date: Mon, 27 Dec 2021 23:47:22 -0800
Subject: [PATCH 11/14] serenity: Make lsearch stressor a nop on Serenity
Subject: [PATCH 08/12] serenity: Make lsearch stressor a nop on Serenity
---
stress-lsearch.c | 9 +++++++++
@ -32,5 +32,5 @@ index 60174a2..74a9ef9 100644
+};
+#endif
--
2.32.0
2.34.1

View file

@ -1,32 +0,0 @@
From 950c136f14b983717963d5b5ae647ca3aebddd01 Mon Sep 17 00:00:00 2001
From: Brian Gianforcaro <b.gianfo@gmail.com>
Date: Mon, 27 Dec 2021 23:38:11 -0800
Subject: [PATCH 09/14] serenity: Add a empty O_NDELAY symbol so the dev
stressor will compile
Serenity doesn't yet support O_NDELAY, so just make it compile by making
the definition 0, so the bitmask will be meaningless.
---
stress-dev.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/stress-dev.c b/stress-dev.c
index 1fab38e..9ab1b31 100644
--- a/stress-dev.c
+++ b/stress-dev.c
@@ -24,6 +24,12 @@
*/
#include "stress-ng.h"
+#ifdef __serenity__
+ /* Serenity doesn't yet support O_NDELAY, so just make it compile */
+ #define O_NDELAY (0)
+#endif
+
+
static const stress_help_t help[] = {
{ NULL, "dev N", "start N device entry thrashing stressors" },
{ NULL, "dev-ops N", "stop after N device thrashing bogo ops" },
--
2.32.0

View file

@ -1,7 +1,7 @@
From 190c38897e6d8827f9cd6960e2b8e1f4f3d0cb40 Mon Sep 17 00:00:00 2001
From 060317ca43157cf27f7444932b032e1380c1c3a3 Mon Sep 17 00:00:00 2001
From: Brian Gianforcaro <b.gianfo@gmail.com>
Date: Mon, 27 Dec 2021 23:47:45 -0800
Subject: [PATCH 12/14] serenity: Fake O_SYNC for serenity so iomix stressor
Subject: [PATCH 09/12] serenity: Fake O_SYNC for serenity so iomix stressor
compiles
Serenity doesn't yet support O_SYNC, so just make it compile.
@ -27,5 +27,5 @@ index edf90f0..54176f8 100644
static const stress_help_t help[] = {
--
2.32.0
2.34.1

View file

@ -1,7 +1,7 @@
From 2db39e274a4dcdc5d4a892371ce5aba45e91c187 Mon Sep 17 00:00:00 2001
From e19e4ca90d68afd1a246a173d3a573342305df5c Mon Sep 17 00:00:00 2001
From: Brian Gianforcaro <b.gianfo@gmail.com>
Date: Mon, 27 Dec 2021 23:48:49 -0800
Subject: [PATCH 13/14] serenity: Disable lrand48 zlib stress, it is not
Subject: [PATCH 10/12] serenity: Disable lrand48 zlib stress, it is not
implemented for Serenity
---
@ -49,5 +49,5 @@ index dbe5758..95c65f5 100644
{ "nybble", stress_rand_data_nybble },
{ "objcode", stress_rand_data_objcode },
--
2.32.0
2.34.1

View file

@ -1,7 +1,7 @@
From 6583316ac6b13a131dc111ac8a8db2049f2f1cd2 Mon Sep 17 00:00:00 2001
From 556c1fcea9278f0147902334b16ec82f91ee3a2e Mon Sep 17 00:00:00 2001
From: Brian Gianforcaro <b.gianfo@gmail.com>
Date: Mon, 27 Dec 2021 23:49:39 -0800
Subject: [PATCH 14/14] serenity: Fix stress_get_prime64 variable type, uint ->
Subject: [PATCH 11/12] serenity: Fix stress_get_prime64 variable type, uint ->
uint64_t
Serenity doesn't have a definition for unit.
@ -23,5 +23,5 @@ index 8215c56..bb2b018 100644
if (n != p)
return p;
--
2.32.0
2.34.1

View file

@ -0,0 +1,31 @@
From 598edcb699a2b45dbd8f413e580145b39e1baa69 Mon Sep 17 00:00:00 2001
From: Ali Mohammad Pur <ali.mpfard@gmail.com>
Date: Thu, 13 Jan 2022 16:13:02 +0330
Subject: [PATCH 12/12] Makefile: Install to /usr/local
---
Makefile | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 47534a3..6a768d1 100644
--- a/Makefile
+++ b/Makefile
@@ -66,10 +66,10 @@ LDFLAGS += -static -z muldefs
CFLAGS += -DBUILD_STATIC
endif
-BINDIR=/usr/bin
-MANDIR=/usr/share/man/man1
-JOBDIR=/usr/share/stress-ng/example-jobs
-BASHDIR=/usr/share/bash-completion/completions
+BINDIR=/usr/local/bin
+MANDIR=/usr/local/share/man/man1
+JOBDIR=/usr/local/share/stress-ng/example-jobs
+BASHDIR=/usr/local/share/bash-completion/completions
#
# Stressors
--
2.34.1

View file

@ -1,18 +0,0 @@
diff -Naur stress-ng-0.11.23/Makefile stress-ng-0.11.23.serenity/Makefile
--- stress-ng-0.11.23/Makefile 2021-04-16 00:30:33.161310251 +0200
+++ stress-ng-0.11.23.serenity/Makefile 2021-04-16 00:33:59.731692012 +0200
@@ -53,10 +53,10 @@
CFLAGS += -DBUILD_STATIC
endif
-BINDIR=/usr/bin
-MANDIR=/usr/share/man/man1
-JOBDIR=/usr/share/stress-ng/example-jobs
-BASHDIR=/usr/share/bash-completion/completions
+BINDIR=/usr/local/bin
+MANDIR=/usr/local/share/man/man1
+JOBDIR=/usr/local/share/stress-ng/example-jobs
+BASHDIR=/usr/local/share/bash-completion/completions
#
# Stressors

View file

@ -0,0 +1,70 @@
# Patches for stress-ng on SerenityOS
## `0001-serenity-Disable-linux-scheduler-integration-on-Sere.patch`
serenity: Disable linux scheduler integration on Serenity
Follow the path of other platforms, and make this code nop
when compiling for serenity.
## `0002-serenity-Disable-itimer-testing-when-compiling-for-S.patch`
serenity: Disable itimer testing when compiling for Serenity
The itimer APIs are not implemented in serenity, so just disable
these tests.
## `0003-serenity-Fix-duplicate-definition-of-ALWAYS_INLINE-o.patch`
serenity: Fix duplicate definition of ALWAYS_INLINE on serenity
## `0004-serenity-ifdef-out-key_t-type-usage-which-serenity-d.patch`
serenity: ifdef out key_t type usage, which serenity does not have
## `0005-serenity-Mark-hsearch-stressor-as-not-implemented-on.patch`
serenity: Mark hsearch stressor as not implemented on Serenity
## `0006-serenity-Disable-signal-code-validation-for-Serenity.patch`
serenity: Disable signal code validation for Serenity
We don't currently have a definition for SEGV_ACCERR, so
this validation is meaningless for SerenityOS.
## `0007-serenity-Disable-rand48-cpu-stressor-it-s-not-implem.patch`
serenity: Disable rand48 cpu stressor, it's not implemented for Serenity
## `0008-serenity-Make-lsearch-stressor-a-nop-on-Serenity.patch`
serenity: Make lsearch stressor a nop on Serenity
## `0009-serenity-Fake-O_SYNC-for-serenity-so-iomix-stressor-.patch`
serenity: Fake O_SYNC for serenity so iomix stressor compiles
Serenity doesn't yet support O_SYNC, so just make it compile.
## `0010-serenity-Disable-lrand48-zlib-stress-it-is-not-imple.patch`
serenity: Disable lrand48 zlib stress, it is not implemented for Serenity
## `0011-serenity-Fix-stress_get_prime64-variable-type-uint-u.patch`
serenity: Fix stress_get_prime64 variable type, uint -> uint64_t
Serenity doesn't have a definition for unit.
## `0012-Makefile-Install-to-usr-local.patch`
Makefile: Install to /usr/local