-
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
tests/cp_files: fallback for C libs w/o SEEK_DATA #16169
base: master
Are you sure you want to change the base?
tests/cp_files: fallback for C libs w/o SEEK_DATA #16169
Conversation
Hello all, Any alternative instead of SEEK_END? |
I think the right thing to do, if SEEK_DATA/SEEK_HOLE are not available, is to make all the tests that rely on that constant get marked SKIP, rather than substituting one with different semantics to test. I'd probably do this with a configure time check that checked for support for those and then defined something for the test suite and that test program to change their behavior around, but that's off the top of my head, I don't know offhand how we do this for other platform-specific checks. |
Right, instead of changing the behavior of this test we should disable it as @rincebrain suggested. |
Another option would be to define those two if they're missing:
That particular value gets passed directly into Though as I type is, I feel a little uncomfortable about it. Disabling makes more sense. @jlsalvador if you'd like a hand with the detection bits, let me know - I do know my way around that stuff. |
5ff16e9
to
68e5cfe
Compare
Hello again, I force-pushed a commit with another solution as @rincebrain suggested. I have made a few assumptions. Could someone please check if the patch follows the ZFS guidelines? Perhaps someone could improve it by skipping the test case at runtime (printing I tested it by building Buildroot using GLIBC, UCLIBC, and MUSL toolchains. @robn, thank you for offering to help. Could you please confirm if the patch is correct? |
The way we've handled this before is to only build the |
Not all C libraries support SEEK_DATA (e.g., uClibc). Skip the test case cp_files if SEEK_DATA is not defined. Signed-off-by: José Luis Salvador Rufo <salvador.joseluis@gmail.com>
68e5cfe
to
f893ed9
Compare
Not all C libraries support
SEEK_DATA
(e.g., uClibc). WhenSEEK_DATA
is not defined, fallback toSEEK_END
.Motivation and Context
Currently, uClibc does not compile OpenZFS because the test
cp_files
usesSEEK_DATA
as thewhence
parameter for thelseek
method.Description
When
SEEK_DATA
is not defined, useSEEK_END
as the fallback value.How Has This Been Tested?
Types of changes
Checklist:
Signed-off-by
.