-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
package/zfs: replace wip patch by upstream patch
Signed-off-by: José Luis Salvador Rufo <[email protected]> Signed-off-by: Thomas Petazzoni <[email protected]>
- Loading branch information
1 parent
3e0ff92
commit 08edb3c
Showing
3 changed files
with
70 additions
and
165 deletions.
There are no files selected for viewing
70 changes: 70 additions & 0 deletions
70
package/zfs/0001-ZTS-small-fix-for-SEEK_DATA-SEEK_HOLE-tests.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
From 2ccefd4aff98cf355c7d13b3f92bb4d390dfa522 Mon Sep 17 00:00:00 2001 | ||
From: Tino Reichardt <[email protected]> | ||
Date: Sun, 4 Aug 2024 11:58:13 +0200 | ||
Subject: [PATCH] ZTS: small fix for SEEK_DATA/SEEK_HOLE tests | ||
|
||
Some libc's like uClibc lag the proper definition of SEEK_DATA | ||
and SEEK_HOLE. Since we have only two files in ZTS which use | ||
these definitons, let's define them by hand: | ||
|
||
``` | ||
#ifndef SEEK_DATA | ||
#define SEEK_DATA 3 | ||
#endif | ||
#ifndef SEEK_HOLE | ||
#define SEEK_HOLE 4 | ||
#endif | ||
``` | ||
|
||
There should be no failures, because: | ||
- FreeBSD has support for SEEK_DATA/SEEK_HOLE since FreeBSD 8 | ||
- Linux has it since Linux 3.1 | ||
- the libc will submit the parameters unchanged to the kernel | ||
|
||
Signed-off-by: Tino Reichardt <[email protected]> | ||
Signed-off-by: José Luis Salvador Rufo <[email protected]> | ||
Upstream: https://github.com/openzfs/zfs/commit/bd949b10bed3d99e3b40249d9c8d74a0b4304774 | ||
--- | ||
tests/zfs-tests/cmd/mmap_seek.c | 10 ++++++++++ | ||
tests/zfs-tests/tests/functional/cp_files/seekflood.c | 7 +++++++ | ||
2 files changed, 17 insertions(+) | ||
|
||
diff --git a/tests/zfs-tests/cmd/mmap_seek.c b/tests/zfs-tests/cmd/mmap_seek.c | ||
index 7be92d109565..2d250554a13f 100644 | ||
--- a/tests/zfs-tests/cmd/mmap_seek.c | ||
+++ b/tests/zfs-tests/cmd/mmap_seek.c | ||
@@ -35,6 +35,16 @@ | ||
#include <linux/fs.h> | ||
#endif | ||
|
||
+/* some older uClibc's lack the defines, so we'll manually define them */ | ||
+#ifdef __UCLIBC__ | ||
+#ifndef SEEK_DATA | ||
+#define SEEK_DATA 3 | ||
+#endif | ||
+#ifndef SEEK_HOLE | ||
+#define SEEK_HOLE 4 | ||
+#endif | ||
+#endif | ||
+ | ||
static void | ||
seek_data(int fd, off_t offset, off_t expected) | ||
{ | ||
diff --git a/tests/zfs-tests/tests/functional/cp_files/seekflood.c b/tests/zfs-tests/tests/functional/cp_files/seekflood.c | ||
index 02c2c8e6eca5..f832db85970d 100644 | ||
--- a/tests/zfs-tests/tests/functional/cp_files/seekflood.c | ||
+++ b/tests/zfs-tests/tests/functional/cp_files/seekflood.c | ||
@@ -36,6 +36,13 @@ | ||
#include <sys/stat.h> | ||
#include <sys/wait.h> | ||
|
||
+/* some older uClibc's lack the defines, so we'll manually define them */ | ||
+#ifdef __UCLIBC__ | ||
+#ifndef SEEK_DATA | ||
+#define SEEK_DATA 3 | ||
+#endif | ||
+#endif | ||
+ | ||
#define DATASIZE (4096) | ||
char data[DATASIZE]; | ||
|
162 changes: 0 additions & 162 deletions
162
package/zfs/0001-tests-cp_files-ignore-if-SEEK_DATA-is-not-defined.patch
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters