Ports/stress-ng: Remove patches which disable lchown testing

Serenity's LibC now supports lchown, so we no longer need to disable
these stressors. The port can build and run cleanly without these
patches.
This commit is contained in:
Brian Gianforcaro 2022-01-06 18:02:13 -08:00
parent c21622ff4d
commit e2e9560580
Notes: sideshowbarker 2024-07-17 21:31:00 +09:00
2 changed files with 0 additions and 76 deletions

View file

@ -1,41 +0,0 @@
From 1c2a6348c19fa42e45c43a73b34c37db83391d5c Mon Sep 17 00:00:00 2001
From: Brian Gianforcaro <b.gianfo@gmail.com>
Date: Mon, 27 Dec 2021 23:28:58 -0800
Subject: [PATCH 06/14] serenity: Disable lchown() calls from sysbadaddr
stressor on Serenity
Serenity doesn't have an lchown implementation yet.
---
stress-sysbadaddr.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/stress-sysbadaddr.c b/stress-sysbadaddr.c
index 8d0481b..18166f3 100644
--- a/stress-sysbadaddr.c
+++ b/stress-sysbadaddr.c
@@ -424,10 +424,12 @@ static int bad_ioctl(void *addr)
}
#endif
+#ifndef __serenity__
static int bad_lchown(void *addr)
{
return lchown((char *)addr, getuid(), getgid());
}
+#endif
static int bad_link(void *addr)
{
@@ -856,7 +858,9 @@ static stress_bad_syscall_t bad_syscalls[] = {
#if defined(TCGETS)
bad_ioctl,
#endif
+#ifndef __serenity__
bad_lchown,
+#endif
bad_link,
bad_lstat,
#if defined(HAVE_MADVISE)
--
2.32.0

View file

@ -1,35 +0,0 @@
From 1903b9e5ddae07c13c56f6b7e85a0629450d2b6d Mon Sep 17 00:00:00 2001
From: Brian Gianforcaro <b.gianfo@gmail.com>
Date: Mon, 27 Dec 2021 23:37:23 -0800
Subject: [PATCH 08/14] serenity: Disable lchown() calls in stress-chown
stressor for SerenityOS
Serenity doesn't have an lchown implementation, so compile it out.
---
stress-chown.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/stress-chown.c b/stress-chown.c
index 5d53806..caefd90 100644
--- a/stress-chown.c
+++ b/stress-chown.c
@@ -221,6 +221,8 @@ static int stress_chown(const stress_args_t *args)
pr_fail("%s: chown %s failed, errno=%d (%s)\n",
args->name, filename, errno, strerror(errno));
}
+
+#ifndef __serenity__
ret = do_chown(lchown, filename, cap_chown, uid, gid);
if (ret < 0) {
if ((ret == -ENOENT) || (ret == -ENOTDIR)) {
@@ -235,6 +237,7 @@ static int stress_chown(const stress_args_t *args)
pr_fail("%s: chown %s failed, errno=%d (%s)\n",
args->name, filename, errno, strerror(errno));
}
+#endif
inc_counter(args);
} while (keep_stressing(args));
--
2.32.0