Skip to content
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

Fix compressed modules #54

Merged
merged 4 commits into from
Feb 12, 2025
Merged

Fix compressed modules #54

merged 4 commits into from
Feb 12, 2025

Conversation

thir820
Copy link
Collaborator

@thir820 thir820 commented Feb 11, 2025

Changes

  • Fix initrd module handling for compressed modules (ending ko.xz or ko.zst)
  • Fix busybox install for dynamically linked busybox binary
  • Increase version to 1.3.11

Dependencies:

  • none

Tests results

(.venv) (venv) ebcl@8f01a72b6746:/workspace$ pytest .
============================================================================================ test session starts =============================================================================================
platform linux -- Python 3.10.12, pytest-8.3.3, pluggy-1.5.0
rootdir: /workspace
configfile: pyproject.toml
plugins: cov-6.0.0
collected 133 items                                                                                                                                                                                          

tests/hypervisor/test_config_gen.py ......                                                                                                                                                             [  4%]
tests/hypervisor/test_model.py ...........                                                                                                                                                             [ 12%]
tests/hypervisor/test_model_gen.py ...................                                                                                                                                                 [ 27%]
tests/hypervisor/test_schema_loader.py ................                                                                                                                                                [ 39%]
tests/test_apt.py ...........                                                                                                                                                                          [ 47%]
tests/test_boot.py ..                                                                                                                                                                                  [ 48%]
tests/test_cache.py ........                                                                                                                                                                           [ 54%]
tests/test_config.py .....                                                                                                                                                                             [ 58%]
tests/test_deb.py ..                                                                                                                                                                                   [ 60%]
tests/test_dependency.py ..                                                                                                                                                                            [ 61%]
tests/test_fake.py ....                                                                                                                                                                                [ 64%]
tests/test_files.py ...................                                                                                                                                                                [ 78%]
tests/test_initrd.py .........                                                                                                                                                                         [ 85%]
tests/test_proxy.py .......                                                                                                                                                                            [ 90%]
tests/test_root.py .ssss..                                                                                                                                                                             [ 96%]
tests/test_version.py .....                                                                                                                                                                            [100%]

================================================================================= 129 passed, 4 skipped in 186.09s (0:03:06) =================================================================================
(.venv) (venv) ebcl@8f01a72b6746:/workspace/robot_tests$ robot *.robot
==============================================================================
Boot & Initrd & Root                                                          
==============================================================================
Boot & Initrd & Root.Boot                                                     
==============================================================================
Kernel exists                                                         | PASS |
------------------------------------------------------------------------------
Config is OK                                                          | PASS |
------------------------------------------------------------------------------
Script was executed                                                   | PASS |
------------------------------------------------------------------------------
Boot & Initrd & Root.Boot                                             | PASS |
3 tests, 3 passed, 0 failed
==============================================================================
Boot & Initrd & Root.Initrd                                                   
==============================================================================
Root Device is Mounted                                                | PASS |
------------------------------------------------------------------------------
Devices are Created                                                   | PASS |
------------------------------------------------------------------------------
Rootfs should be set up                                               | PASS |
------------------------------------------------------------------------------
File dummy.txt should be OK                                           | PASS |
------------------------------------------------------------------------------
File other.txt should be OK                                           | PASS |
------------------------------------------------------------------------------
Modules are installed                                                 | PASS |
------------------------------------------------------------------------------
Check modules loaded by init                                          | PASS |
------------------------------------------------------------------------------
Boot & Initrd & Root.Initrd                                           | PASS |
7 tests, 7 passed, 0 failed
==============================================================================
Boot & Initrd & Root.Root                                                     
==============================================================================
Systemd should exist                                                  | PASS |
------------------------------------------------------------------------------
Fakeoot config executed                                               | PASS |
------------------------------------------------------------------------------
Fakechroot config was executed                                        | PASS |
------------------------------------------------------------------------------
Chroot config was executed                                            | PASS |
------------------------------------------------------------------------------
Boot & Initrd & Root.Root                                             | PASS |
4 tests, 4 passed, 0 failed
==============================================================================
Boot & Initrd & Root                                                  | PASS |
14 tests, 14 passed, 0 failed
==============================================================================
Output:  /workspace/robot_tests/output.xml
Log:     /workspace/robot_tests/log.html
Report:  /workspace/robot_tests/report.html

Developer Checklist:

  • Test: Changes are tested
  • Doc: Documentation has been updated
  • Git: Informative git commit message(s)
  • N/A Issue: If a related GitHub issue exists, linking is done

Reviewer checklist:

  • Review: Changes are reviewed
  • Review: Tested by the reviewer

@thir820 thir820 requested a review from MofX February 11, 2025 08:34
Copy link
Collaborator

@simone-weiss simone-weiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too many empty lines for sure and ideally add such a module in the robot test

@MofX
Copy link
Collaborator

MofX commented Feb 11, 2025

Where are compressed modules used? I have seen the feature, but never compressed modules...

And I have to agree with Simone: Add tests (although I would go for pytests if possible). I am inclined to refuse every PR, that does not add tests...

@thir820 thir820 requested a review from simone-weiss February 11, 2025 12:40
@thir820
Copy link
Collaborator Author

thir820 commented Feb 11, 2025

Where are compressed modules used? I have seen the feature, but never compressed modules...

And I have to agree with Simone: Add tests (although I would go for pytests if possible). I am inclined to refuse every PR, that does not add tests...

The compressed modules are used by Ubuntu 24.04.

@thir820 thir820 force-pushed the fix_compressed_modules branch from 7113f25 to a5382bd Compare February 11, 2025 12:58
ebcl/tools/initrd/initrd.py Outdated Show resolved Hide resolved
@thir820 thir820 force-pushed the fix_compressed_modules branch from 8b25095 to 0229beb Compare February 11, 2025 16:23
@thir820
Copy link
Collaborator Author

thir820 commented Feb 11, 2025

@MofX @simone-weiss Test added, please continue review.

@thir820 thir820 force-pushed the fix_compressed_modules branch 2 times, most recently from 9785f8a to 4d426b7 Compare February 11, 2025 17:07
ebcl/tools/initrd/initrd.py Outdated Show resolved Hide resolved
tests/test_initrd.py Outdated Show resolved Hide resolved
@thir820 thir820 force-pushed the fix_compressed_modules branch from b2e8e73 to 6d17212 Compare February 12, 2025 07:23
ebcl/tools/initrd/initrd.py Outdated Show resolved Hide resolved
ebcl/tools/initrd/initrd.py Outdated Show resolved Hide resolved
robot_tests/initrd.robot Outdated Show resolved Hide resolved
tests/test_initrd.py Show resolved Hide resolved
tests/test_initrd.py Show resolved Hide resolved
@thir820 thir820 force-pushed the fix_compressed_modules branch from 6d17212 to 5483c3f Compare February 12, 2025 08:18
improved tempdir handling

Co-authored-by: Jörg Vehlow <github@jv-coder.de>
@thir820 thir820 force-pushed the fix_compressed_modules branch from 5483c3f to 4f475e8 Compare February 12, 2025 08:23
@thir820 thir820 merged commit b2fe039 into main Feb 12, 2025
1 check passed
@thir820 thir820 deleted the fix_compressed_modules branch February 12, 2025 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants