File tree Expand file tree Collapse file tree
crates/tests-integration/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11use indoc:: indoc;
22use scopeguard:: defer;
33use serde:: Deserialize ;
4- use std:: fs;
54use std:: process:: Command ;
5+ use std:: { fs, path:: Path } ;
66
77use anyhow:: { Context , Result } ;
88use camino:: Utf8Path ;
@@ -51,8 +51,6 @@ pub(crate) fn test_bootc_container_inspect() -> Result<()> {
5151 . as_bool ( )
5252 . expect ( "kernel.unified should be a boolean" ) ;
5353
54- println ! ( "kernel: {kernel:#?}" ) ;
55-
5654 let is_uki = std:: env:: var ( "BOOTC_boot_type" ) . is_ok_and ( |var| var == "uki" ) ;
5755
5856 if let Some ( variant) = std:: env:: var ( "BOOTC_variant" ) . ok ( ) {
@@ -74,6 +72,18 @@ pub(crate) fn test_bootc_container_inspect() -> Result<()> {
7472 ) ;
7573 // Version should be non-empty after stripping extension
7674 assert ! ( !version. is_empty( ) , "version should not be empty for UKI" ) ;
75+
76+ // For UKI make sure vmlinuz + initrd don't exist
77+ let usr_lib_mod = Path :: new ( "/usr/lib/modules" ) . join ( version) ;
78+ assert ! ( usr_lib_mod. exists( ) , "'{usr_lib_mod:?}' does not exist" ) ;
79+ assert ! (
80+ !usr_lib_mod. join( "vmlinuz" ) . exists( ) ,
81+ "vmlinuz should not exist for UKI"
82+ ) ;
83+ assert ! (
84+ !usr_lib_mod. join( "initramfs.img" ) . exists( ) ,
85+ "initramfs should not exist for UKI"
86+ ) ;
7787 }
7888 o => eprintln ! ( "notice: Unhandled variant for kernel check: {o:?}" ) ,
7989 }
You can’t perform that action at this time.
0 commit comments