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

Second round of output cleaning #440

Merged
merged 2 commits into from
Sep 11, 2024
Merged

Second round of output cleaning #440

merged 2 commits into from
Sep 11, 2024

Conversation

scaronni
Copy link
Collaborator

@scaronni scaronni commented Sep 8, 2024

Second out of output refining. Example with autoinstall and multiple modules, before:

dkms: running auto installation service for kernel 6.10.7-200.fc40.x86_64
Sign command: /lib/modules/6.10.7-200.fc40.x86_64/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub

Cleaning build area... done.
Building module(s)........................ done.
Signing module /var/lib/dkms/nvidia/560.35.03/build/kernel-open/nvidia.ko
Signing module /var/lib/dkms/nvidia/560.35.03/build/kernel-open/nvidia-modeset.ko
Signing module /var/lib/dkms/nvidia/560.35.03/build/kernel-open/nvidia-drm.ko
Signing module /var/lib/dkms/nvidia/560.35.03/build/kernel-open/nvidia-uvm.ko
Signing module /var/lib/dkms/nvidia/560.35.03/build/kernel-open/nvidia-peermem.ko
Cleaning build area... done.

Installing /lib/modules/6.10.7-200.fc40.x86_64/extra/nvidia.ko.xz
Installing /lib/modules/6.10.7-200.fc40.x86_64/extra/nvidia-modeset.ko.xz
Installing /lib/modules/6.10.7-200.fc40.x86_64/extra/nvidia-drm.ko.xz
Installing /lib/modules/6.10.7-200.fc40.x86_64/extra/nvidia-uvm.ko.xz
Installing /lib/modules/6.10.7-200.fc40.x86_64/extra/nvidia-peermem.ko.xz

Running depmod.... done.
Sign command: /lib/modules/6.10.7-200.fc40.x86_64/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub

Cleaning build area... done.
Building module(s)... done.
Signing module /var/lib/dkms/xpadneo/0.9.6/build/hid-xpadneo.ko
Cleaning build area... done.

Installing /lib/modules/6.10.7-200.fc40.x86_64/extra/hid-xpadneo.ko.xz

Running depmod.... done.
dkms autoinstall on 6.10.7-200.fc40.x86_64/x86_64 succeeded for nvidia xpadneo
dkms: autoinstall for kernel 6.10.7-200.fc40.x86_64 Done. 
dkms: running auto installation service for kernel 6.10.7-200.fc40.x86_64
dkms: autoinstall for kernel 6.10.7-200.fc40.x86_64 Done. 

Most of the autoinstall output is useless and not well placed. Also the depmod line should be attached to the "Installng [..]" output and separated from the "Sign [..]" output.

After changing the output, it's structured like this, with each block separated by context:


Sign command: /lib/modules/6.10.7-200.fc40.x86_64/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub

Cleaning build area... done.
Building module(s)........................ done.
Signing module /var/lib/dkms/nvidia/560.35.03/build/kernel-open/nvidia.ko
Signing module /var/lib/dkms/nvidia/560.35.03/build/kernel-open/nvidia-modeset.ko
Signing module /var/lib/dkms/nvidia/560.35.03/build/kernel-open/nvidia-drm.ko
Signing module /var/lib/dkms/nvidia/560.35.03/build/kernel-open/nvidia-uvm.ko
Signing module /var/lib/dkms/nvidia/560.35.03/build/kernel-open/nvidia-peermem.ko
Cleaning build area... done.

Installing /lib/modules/6.10.7-200.fc40.x86_64/extra/nvidia.ko.xz
Installing /lib/modules/6.10.7-200.fc40.x86_64/extra/nvidia-modeset.ko.xz
Installing /lib/modules/6.10.7-200.fc40.x86_64/extra/nvidia-drm.ko.xz
Installing /lib/modules/6.10.7-200.fc40.x86_64/extra/nvidia-uvm.ko.xz
Installing /lib/modules/6.10.7-200.fc40.x86_64/extra/nvidia-peermem.ko.xz
Running depmod.... done.

Sign command: /lib/modules/6.10.7-200.fc40.x86_64/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub

Cleaning build area... done.
Building module(s)... done.
Signing module /var/lib/dkms/xpadneo/0.9.6/build/hid-xpadneo.ko
Cleaning build area... done.

Installing /lib/modules/6.10.7-200.fc40.x86_64/extra/hid-xpadneo.ko.xz
Running depmod.... done.

Autoinstall on 6.10.8-200.fc40.x86_64 succeeded for modules nvidia xpadneo.

After spending lot of time trying to figure out why the output trapped by the tests is slightly different on old Alpine containers and the old Ubuntu VM that was used for the test, I narrowed it down to the invoke_command combined with stdbuf. Funny thing is that if you run the commands directly on the containers the output is consistent, and does not exhibit the extra blank line before "Cleaning build area".

To avoid this issue entirely, in generalize_expected_output remove all blank lines, so the output is trapped 100% the same on all containers.

@scaronni scaronni marked this pull request as draft September 8, 2024 09:19
@scaronni scaronni force-pushed the output2 branch 29 times, most recently from 373b6a1 to d103953 Compare September 8, 2024 12:01
@scaronni scaronni force-pushed the output2 branch 9 times, most recently from 8dbaa75 to 4c0919d Compare September 8, 2024 12:44
@scaronni scaronni changed the title Draft: Second round of output cleaning Second round of output cleaning Sep 8, 2024
@scaronni scaronni force-pushed the output2 branch 2 times, most recently from b225503 to f1b9d01 Compare September 8, 2024 13:12
@scaronni scaronni marked this pull request as ready for review September 8, 2024 13:34
dkms.in Show resolved Hide resolved
dkms_autoinstaller.in Outdated Show resolved Hide resolved
dkms_autoinstaller.in Show resolved Hide resolved
@scaronni
Copy link
Collaborator Author

scaronni commented Sep 9, 2024

Thanks for the review!

@scaronni scaronni force-pushed the output2 branch 2 times, most recently from e326f92 to 15e598d Compare September 9, 2024 06:30
Copy link
Collaborator

@evelikov evelikov left a comment

Choose a reason for hiding this comment

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

Greetings, I have emerged from the woodwork - sorry for dropping off the radar.

Can we split off /etc/sysconfig in separate commit please - I could swear I've saw some distro use it.

dkms.in Show resolved Hide resolved
dkms_autoinstaller.in Outdated Show resolved Hide resolved
dkms_autoinstaller.in Show resolved Hide resolved
@scaronni
Copy link
Collaborator Author

Greetings, I have emerged from the woodwork - sorry for dropping off the radar.

Can we split off /etc/sysconfig in separate commit please - I could swear I've saw some distro use it.

Sure, ok.

@scaronni
Copy link
Collaborator Author

/etc/sysconfig restored.

Copy link
Collaborator

@evelikov evelikov left a comment

Choose a reason for hiding this comment

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

Note: removing sysconfig thing is a good idea IMHO. We just need to a) ensure we have dkms.conf equivalent + is parsed and b) add a bit scary note in the release notes.

But that's for another day. Thanks, updated PR good.

@evelikov evelikov merged commit e2405f1 into master Sep 11, 2024
54 of 56 checks passed
@evelikov evelikov deleted the output2 branch September 11, 2024 17:21
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