-
Notifications
You must be signed in to change notification settings - Fork 83
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
Mark requirements #56
base: master
Are you sure you want to change the base?
Conversation
I really appreciate all of the efforts you put in.. but I’m going to softly decline your proposal. pytest a much more expressive/pluggable test infrastructure that avoids many of the shortcomings you’re identifying with testcase indexing and the like, and does M x N style testing with fixtures much more gracefully than the adhoc setup and tear down logic in pkdfstest does today. Moving to pytest for the test infrastructure would allow pjdfstest to focus more on what needs to be tested, instead of how it’s being tested. |
Rewriting the tests in Python sounds great! I believe that the MR would actually help in that endeavor. The patches add (or rather: make explicit) the list of requirements for the tests but do not alter the structure of the test files. That should be handy information to have and not get in the way of any work already done. Any idea how long the rewrite will take? I can see the merge request from March last year, but no activity after the first commit. If the rewrite takes longer, I think you might want to merge this MR anyway, as it is low risk, fixes a bug, and provides a solution to an issue that users would otherwise have to wait for quite long. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this PR with s3fs and gcsfuse and it makes testing with pjdfstest substantially less noisy. I prefer to merge this PR since I have some other workarounds that build on top of it.
@ngie-eign how is the Python rewrite coming along? And did you have a chance yet to consider the arguments I made in the last comments? I have rebased the patches onto current master, in case you change your mind. Let me know if there's anything else I can do to convince you that this PR is worthwhile. |
Can we merge this PR? I am interested in s3fs using pjdfstest again and having better support for requirements will avoid a lot of hard-coding demonstrated in s3fs-fuse/s3fs-fuse#1882. |
Signed-off-by: Tim Wiederhake <[email protected]>
This makes the output less confusing if "${r}" is empty. Signed-off-by: Tim Wiederhake <[email protected]>
Signed-off-by: Tim Wiederhake <[email protected]>
This helps diagnose which test is actually failing, as the test number alone does little to help find a test in a test file. Signed-off-by: Tim Wiederhake <[email protected]>
Signed-off-by: Tim Wiederhake <[email protected]>
This avoids overwriting variables of the same name. This happens e.g. for the variable "type" in "create_file()" and is a prerequisite to fix a bug in tests/rename/09.t in a later patch. Signed-off-by: Tim Wiederhake <[email protected]>
This allows a later patch to remove some calls to chown. Signed-off-by: Tim Wiederhake <[email protected]>
This allows a later patch to better group sections that require root permissions. Signed-off-by: Tim Wiederhake <[email protected]>
This allows a later patch to skip sleeping in disabled tests. Signed-off-by: Tim Wiederhake <[email protected]>
This allows a later patch to skip querying file statistics for disabled tests. Signed-off-by: Tim Wiederhake <[email protected]>
One special case less. Signed-off-by: Tim Wiederhake <[email protected]>
Sort by name and settle on unquoted spelling. Signed-off-by: Tim Wiederhake <[email protected]>
Idea is to be able to turn on and off requirements for certain sections of tests. If "skipmsg" is empty, no requirement is currently blocking the execution of tests. If "skipmsg" is not empty, it contains the name of the first unmet requirement. Signed-off-by: Tim Wiederhake <[email protected]>
Creation of block and character devices typically require root permissions. This is handy to mask out other unsupported file types, e.g. for testing a custom / special-purpose file system implementation. Signed-off-by: Tim Wiederhake <[email protected]>
This logic is currently spread out over the test files and repeated several times. A later patch will remove these instances and replace them with calls to "require" or "push_requirement". Signed-off-by: Tim Wiederhake <[email protected]>
Signed-off-by: Tim Wiederhake <[email protected]>
Signed-off-by: Tim Wiederhake <[email protected]>
Signed-off-by: Tim Wiederhake <[email protected]>
Signed-off-by: Tim Wiederhake <[email protected]>
Signed-off-by: Tim Wiederhake <[email protected]>
Signed-off-by: Tim Wiederhake <[email protected]>
Signed-off-by: Tim Wiederhake <[email protected]>
Signed-off-by: Tim Wiederhake <[email protected]>
This has been replaced by the more fine-grained ftype_* features. Signed-off-by: Tim Wiederhake <[email protected]>
What an unexpected call from the past 😀 As a favor to @gaul I rebased the merge request and resolved the conflicts. |
To make a point about how painful this is, I configure s3fs to run pjdfstest this way:
|
I guess the rust rewrite never panned out. Does anything block merging this PR? |
Hi @ngie-eign! Just a friendly ping to ask about the status of this pull request. Is there anything I can do to make this pull request go forward? |
Introduces two new functions, "push_requirement" and "pop_requirement", that govern a stack of current requirements. If the requirements are unmet, tests are skipped. This has several positive effects:
1..n
" lines)While at it, this series also fixes a bug in
rename/09.t
andrename/10.t
and provides more information in the output (not quite fixing #27, but certainly helping).