dird: fix mark command not accepting full windows paths#1938
Merged
BareosBot merged 49 commits intobareos:masterfrom Nov 20, 2024
Merged
dird: fix mark command not accepting full windows paths#1938BareosBot merged 49 commits intobareos:masterfrom
BareosBot merged 49 commits intobareos:masterfrom
Conversation
Contributor
Author
|
This should enable the restore tests on windows (as they require this). |
Contributor
Author
|
cbafa1b to
578bd47
Compare
48ca4b3 to
0737d15
Compare
236b7dc to
856972e
Compare
c29c45d to
c799857
Compare
sebsura
commented
Nov 18, 2024
sebsura
commented
Nov 18, 2024
sebsura
commented
Nov 18, 2024
sebsura
commented
Nov 18, 2024
sebsura
commented
Nov 18, 2024
sebsura
commented
Nov 18, 2024
sebsura
commented
Nov 18, 2024
sebsura
commented
Nov 18, 2024
Both device_initialisation as well as the main stored function try to init the jcr chain at the same time. Sadly only device_initialisation takes the lock, meaning that sometimes a race happens and the sd crashes (notices on a test run).
On our build infrastructure (using cygwin) we get this uname: CYGWIN_NT-10.0-20348 So we need to check a bit more carefully
Now that windows supports hardlinks, we need to add them back to the count, as they are not deleted in setup_data anymore.
Previously the iteration order depended on the c++ lib implementation (and could also be change from run to run). This lead to issues where 'show job' would print jobs on linux but jobdefs on windows. To make sure that always the same element is chosen, we need to make sure the order is always the same. This is easily done by just using a vector here.
Its important that error messages output what bareos thinks and not what the user inputed (as the user knows that himself). This caused a weird issue on windows when 'show job=<jobname>' was interpreted as 'show jobdefs=<jobname>' which returned the error job resource <jobname> not found. Which is extremely misleading, as bareos never searched for a job in that case. If the error message would have been instead jobdefs resource <jobname> not found. then the user at least notices that bareos did something wrong and try some other input instead of trying to understand why the job was not found.
We replace /dev/null with a variable so that we can use NUL on windows instead!
dangling-link does not get created on windows, so we need to chose a different file.
You cannot set test properties on tests that do not exist. Subtests dont exist if you disable the main test, so this was leading to configuration errors on windows.
This test requires a shell script + flock to function correctly.
This test runs multiple backups and, since vss takes a long time to setup, runs into timeouts. As such we disable VSS for this test.
Our fix for invalid paths messed up our handling for relative paths as '.' was treated as an invalid character and was replaced. This caused the '.' that glob() generated to end up in an absolute path, which was is not valid. We can now also reenable the parser test as this was the only reason that it did not work.
The old code did not handle ./.. correctly, so we should not try to emulate that. The long_file_name was not setup correctly, so I fixed that and added a test that checked the previously checked behaviour.
4dbe6e1 to
bf88e3f
Compare
This file contains hidden or 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
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.
Thank you for contributing to the Bareos Project!
This pr also:
StartSocketServer()sometimes misdetecting started server. Caused test issuesand some other general fixes.
TODO:
Please check
If you have any questions or problems, please give a comment in the PR.
Helpful documentation and best practices
Checklist for the reviewer of the PR (will be processed by the Bareos team)
Make sure you check/merge the PR using
devtools/pr-toolto have some simple automated checks run and a proper changelog record added.General
Source code quality
Tests