-
Notifications
You must be signed in to change notification settings - Fork 187
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
CFE-3292: Removed soft fail related to the use of globs (3.21) #5555
Closed
Conversation
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
Ticket: None Changelog: None Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech> (cherry picked from commit a95b724)
Resolved acceptance test failure on Windows caused by invalid use of regular expressions consisting of paths with backslashes. The paths were triggering illegal escape sequence errors in PCRE2. Recognizing the complexity of the existing test, I opted for a complete rewrite. Additionally, I eliminated all dependencies to facilitate a standalone file that can easily be run on Windows. Ticket: None Changelog: None Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech> (cherry picked from commit 7b28b81)
The backwards directory traversial in policy function findfiles_up() did not work properly when using forward slashes in the path argument on Windows. Fixed this issue by changing forward slashes to backslashes in the path argument before performing the backwards traversial. Ticket: None Changelog: Fixed bug related to failing backwards directory traversial when using forward slashes in path argument of the findfiles_up() policy function on Windows. Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech> (cherry picked from commit 4736ad4)
Previously the shell pattern `**` matched from one to six subdirectories, while it should match any number of subdirectories from zero. NorthernTechHQ/libntech#207 patrially fixes this problem by making it match from zero to six subdirectories, with a note to fix the limit (six) in CFE-4317. This fix caused this acceptance test to break, as it now also include the test directory itself (`"$(G.testdir)"`) in the actual result when testing the `"$(G.testdir)/**"` shell pattern. It was easily fixed by modifying the shell pattern to `"$(G.testdir)/*/**"`. Ticket: None Changelog: None Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech> (cherry picked from commit 710985e) Conflicts: tests/acceptance/01_vars/02_functions/findfiles.cf Some different changes here. Tried my best to merge.
Ticket: None Changelog: None Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech> (cherry picked from commit e86b4d2)
Ticket: None Changelog: None Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech> (cherry picked from commit c803201)
Also needed to make same changes in order for it to work on Windows. Ticket: None Changelog: None Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech> (cherry picked from commit d60340f) Conflicts: tests/acceptance/01_vars/02_functions/findfiles.cf
Ticket: CFE-3292 Changelog: None Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech> (cherry picked from commit 7a3c2dc)
2 tasks
Thank you for submitting a pull request! Maybe @larsewi can review this? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
include <glob_lib.h>
where needed after moving GlobFileList()merge together:
https://github.com/cfengine/enterprise/pull/801
#5555