-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
Validate default_kernel global property on set #613
Conversation
Additional side notes: I did not go to the extreme of doing it like how it is done in the QubesVM class. A simpler approach of just using the Kernel Pool is implemented. It is similar to how it is done in Qubes Manager. |
Humm. The pylint complain is very well understandable:
On the other hand, the failed test is confusing:
p.s.: Oh. I see. It is not possible to cheat and reuse the test for |
f03a57e
to
b044b86
Compare
The nice fact about the two last failed tests is that it shows that the code is actually working. 1st. test failed since I guess there is no need for additional unit tests. |
b044b86
to
029ae55
Compare
Fixing few remaining unit tests. |
31daa6c
to
4bec5ec
Compare
run-tests
Outdated
@@ -19,6 +19,17 @@ if sudo --non-interactive "$name/ci/lvm-manage" setup-lvm vg$$/pool; then | |||
CLEANUP_LVM=yes | |||
fi | |||
|
|||
CLEANUP_KERNEL_POOL= | |||
if [ ! -d "/var/lib/qubes/vm-kernels" ]; then |
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.
This won't work when running tests in actual dom0 (vm-kernels dir exists, but "1.0" kernel doesn't).
Some of the tests patch qubes_kernels_base_dir
, see for example test_260_kernelopts
in qubes/tests/vm/qubesvm.py
which should be safer approach.
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.
Yes. Just recognized it. I will do the tests locally in order to avoid abusing the CI/CD servers and cluttering the logs. Will come back after I fix it properly
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.
@marmarek I finally managed to patch one of the major base classes (AdminAPITestCase
). I believe that I can go forward and properly patch the rest.
I have a question regarding the CI/CD servers. Are they owned by Qubes project or they belong to Gitlab? I am trying to avoid using the online ones as much as possible and test the patches locally. But using the online ones are sometimes more convenient.
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 have a question regarding the CI/CD servers. Are they owned by Qubes project or they belong to Gitlab? I am trying to avoid using the online ones as much as possible and test the patches locally. But using the online ones are sometimes more convenient.
We use our own runners, you can use them as much as you like :)
Nice. The tearDown function is purging I am not going to abuse CI/CD server anymore. Reverting to local tests and will come back after I patched all unittests |
386961c
to
134e971
Compare
The approach of patching the existing untitests to allow |
134e971
to
62ff1f1
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #613 +/- ##
==========================================
+ Coverage 69.32% 69.35% +0.02%
==========================================
Files 58 58
Lines 11953 11958 +5
==========================================
+ Hits 8286 8293 +7
+ Misses 3667 3665 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Ok. We have passed CI checks and Codecov is advising on the new Unittests. I should use the helper function for QubesVM as well and add the necessary unittests. Hopefully tomorrow |
8b03df9
to
9991c35
Compare
@marmarek This is ready for review |
9991c35
to
151010d
Compare
fixes: QubesOS/qubes-issues#8992