Skip to content

core: lots of test fixes, some crash fixes, switch to registry for windows version name#2346

Draft
sebsura wants to merge 16 commits intobareos:masterfrom
sebsura:dev/ssura/master/general-fixes-0825
Draft

core: lots of test fixes, some crash fixes, switch to registry for windows version name#2346
sebsura wants to merge 16 commits intobareos:masterfrom
sebsura:dev/ssura/master/general-fixes-0825

Conversation

@sebsura
Copy link
Contributor

@sebsura sebsura commented Aug 21, 2025

Thank you for contributing to the Bareos Project!

This pr

  • fixes some crashes by making nullptr a valid POOLMEM*,
  • makes sure that a reload causes the scheduler too update the schedule immediately,
  • refactors some tests to either restore their functionality or enhance them in other ways, and
  • make the windows daemons actually report the runtime windows version.

The last part should also be done on *nix as well.

TODO:

  • use /etc/os-release on *nix for the version name.

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

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-tool to have some simple automated checks run and a proper changelog record added.

General
  • Is the PR title usable as CHANGELOG entry?
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Required backport PRs have been created
  • Correct milestone is set
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR
Tests
  • Decision taken that a test is required (if not, then remove this paragraph)
  • The choice of the type of test (unit test or systemtest) is reasonable
  • Testname matches exactly what is being tested
  • On a fail, output of the test leads quickly to the origin of the fault

@sebsura sebsura changed the title core: lots of test fixes, some crash fixes core: lots of test fixes, some crash fixes, switch to registry for windows version name Aug 21, 2025
@sebsura sebsura marked this pull request as draft August 21, 2025 05:56
@bruno-at-bareos
Copy link
Contributor

I love the make the windows daemons actually report the runtime windows version. Do you think to certain extent it would be possible for *nix daemon to do the same ?
like grep /etc/os-release in most case would be enough ?

@sebsura sebsura force-pushed the dev/ssura/master/general-fixes-0825 branch 3 times, most recently from 2fced48 to b59aabe Compare September 17, 2025 08:15
time_t is a 64bit signed value.  Currently python truncates
our times to 32bit unsigned values.  These truncation
cause (previously silenced) warnings that become visible when used
under grpc.
There is no need to run the same commands twice here ...
The computation is just wrong even in our simple example.  Im not sure
why this solution does not work, but it seems much simpler.
if this error popped up during a test it was not clear at all what
exactly broke.  At least now you can immediately see that the problem
is in some expect_grep invocation.
Now the test actually checks if bscan correctly recovered the size of
the disk.
When we copy configuration pointers from one jcr to the next, we need
to make sure that the configuration actually stays alive.

To do this we simply copy the configuration container from the old jcr
into the new jcr, as that container keeps alive everything that we
need.

Maybe we should instead try to match the resources to their new
counterpart ?
@sebsura sebsura force-pushed the dev/ssura/master/general-fixes-0825 branch from b59aabe to cc8ed7b Compare October 13, 2025 06:26
@pstorz pstorz mentioned this pull request Nov 24, 2025
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants