-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ZTS: small fix for SEEK_DATA/SEEK_HOLE tests #16413
Conversation
619eb33
to
fbe3375
Compare
Are you sure that defining this does not crash at runtime?
|
The test will fail then, because the seek will return -1, that should be fine.
I didn't check uClibc itself. Is there a way that uClibc will get support for it? Edit: oh, uClibc was last updated in 2012?! I can change my PR so that it handles |
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]>
fbe3375
to
2ccefd4
Compare
I have already tested this patch for Buildroot (uClibc). It works correctly 👏. Thank you all! |
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]> Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]>
Motivation and Context
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.
There should be no failures, because:
There is another pull request for fixing this by skipping the tests here: #16169.
This one is a bit more complex and not finished currently.
Description
I would prefer to make the needed definitions by hand for now:
Some more details about the
Defines
themself:So in the end, ZTS uses the
Defines
here:tests/zfs-tests/cmd/mmap_seek.c
tests/zfs-tests/tests/functional/cp_files/seekflood.c
So let's define them in order to do the tests on uClibc based ZTS runs also.
How Has This Been Tested?
Types of changes
Checklist:
Signed-off-by
.