-
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
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 |
68e5cfe
to
f893ed9
Compare
@jlsalvador sorry for the delay. This is looking pretty close! Did you intend to remove the entire |
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 <[email protected]>
f893ed9
to
cfa28bf
Compare
I'll look at it this weekend. I force-pushed another revision incorporating @robn's suggestions to rename |
Let's work on resolving this issue! 💪 Current issue details: Buildroot Job Log. What do we need to include a fix for this issue? Can the patch be backported as it was for the original issue? |
This update addresses the issue of uClibc support by skipping ZFS tests that require SEEK_DATA support. This is a work-in-progress patch while we wait for an upstream fix. Current upstream efforts can be followed here: openzfs/zfs#16169 Context: - OpenZFS includes a test for a bug that occurs when copying a large number of PUNCHED files. - OpenZFS has backported this test to v2.2.x. - uClibc does not support SEEK_DATA and SEEK_HOLE. - The ZFS test `cp_stress` can not be compiled using uClibc. This commit fix: - https://gitlab.com/buildroot.org/buildroot/-/jobs/7391793226 Signed-off-by: José Luis Salvador Rufo <[email protected]> Signed-off-by: Thomas Petazzoni <[email protected]>
The
I would prefer to make the needed definitions by hand for now and opened another pull request for this: #16413. |
As I read it, the test passed correctly; it just was expected to be skipped (hard-coded as-is in this patch). This is because I included the line uClibc-NG has just added SEEK_DATA and SEEK_HOLE support for the next versions: |
The test shouldn't be expected to be skipped by default. The other way around it would be better. I searched for uClibc and uClibc-ng ... and it looks like your own project should use uClibc-ng :) How does this pull request deal with the other user of SEEK_DATA: |
Your patch is cleaner and smaller than mine. Thanks. Thank you all! |
This update addresses the issue of uClibc support by skipping ZFS tests that require SEEK_DATA support. This is a work-in-progress patch while we wait for an upstream fix. Current upstream efforts can be followed here: openzfs/zfs#16169 Context: - OpenZFS includes a test for a bug that occurs when copying a large number of PUNCHED files. - OpenZFS has backported this test to v2.2.x. - uClibc does not support SEEK_DATA and SEEK_HOLE. - The ZFS test `cp_stress` can not be compiled using uClibc. This commit fix: - https://gitlab.com/buildroot.org/buildroot/-/jobs/7391793226 Signed-off-by: José Luis Salvador Rufo <[email protected]> Signed-off-by: Thomas Petazzoni <[email protected]> (cherry picked from commit f17fa2c) Signed-off-by: Peter Korsgaard <[email protected]>
This update addresses the issue of uClibc support by skipping ZFS tests that require SEEK_DATA support. This is a work-in-progress patch while we wait for an upstream fix. Current upstream efforts can be followed here: openzfs/zfs#16169 Context: - OpenZFS includes a test for a bug that occurs when copying a large number of PUNCHED files. - OpenZFS has backported this test to v2.2.x. - uClibc does not support SEEK_DATA and SEEK_HOLE. - The ZFS test `cp_stress` can not be compiled using uClibc. This commit fix: - https://gitlab.com/buildroot.org/buildroot/-/jobs/7391793226 Signed-off-by: José Luis Salvador Rufo <[email protected]> Signed-off-by: Thomas Petazzoni <[email protected]> (cherry picked from commit f17fa2c) Signed-off-by: Peter Korsgaard <[email protected]>
This update addresses the issue of uClibc support by skipping ZFS tests that require SEEK_DATA support. This is a work-in-progress patch while we wait for an upstream fix. Current upstream efforts can be followed here: openzfs/zfs#16169 Context: - OpenZFS includes a test for a bug that occurs when copying a large number of PUNCHED files. - OpenZFS has backported this test to v2.2.x. - uClibc does not support SEEK_DATA and SEEK_HOLE. - The ZFS test `cp_stress` can not be compiled using uClibc. This commit fix: - https://gitlab.com/buildroot.org/buildroot/-/jobs/7391793226 Signed-off-by: José Luis Salvador Rufo <[email protected]> Signed-off-by: Thomas Petazzoni <[email protected]> (cherry picked from commit f17fa2c) Signed-off-by: Peter Korsgaard <[email protected]>
This update addresses the issue of uClibc support by skipping ZFS tests that require SEEK_DATA support. This is a work-in-progress patch while we wait for an upstream fix. Current upstream efforts can be followed here: openzfs/zfs#16169 Context: - OpenZFS includes a test for a bug that occurs when copying a large number of PUNCHED files. - OpenZFS has backported this test to v2.2.x. - uClibc does not support SEEK_DATA and SEEK_HOLE. - The ZFS test `cp_stress` can not be compiled using uClibc. This commit fix: - https://gitlab.com/buildroot.org/buildroot/-/jobs/7391793226 Signed-off-by: José Luis Salvador Rufo <[email protected]> Signed-off-by: Thomas Petazzoni <[email protected]> (cherry picked from commit f17fa2c) Signed-off-by: Peter Korsgaard <[email protected]>
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
.