@@ -464,7 +464,7 @@ def test_sections(kernel_initrd, tmpdir):
464464 dump = subprocess .check_output (['objdump' , '-h' , output ], text = True )
465465
466466 for sect in 'text osrel cmdline linux initrd uname test' .split ():
467- assert re .search (fr'^\s*\d+\s+.{ sect } \s+0 ' , dump , re .MULTILINE )
467+ assert re .search (fr'^\s*\d+\s+\ .{ sect } \s+[0-9a-f]+ ' , dump , re .MULTILINE )
468468
469469def test_addon (tmpdir ):
470470 output = f'{ tmpdir } /addon.efi'
@@ -499,7 +499,7 @@ def test_addon(tmpdir):
499499 dump = subprocess .check_output (['objdump' , '-h' , output ], text = True )
500500
501501 for sect in 'text cmdline test sbat' .split ():
502- assert re .search (fr'^\s*\d+\s+.{ sect } \s+0 ' , dump , re .MULTILINE )
502+ assert re .search (fr'^\s*\d+\s+\ .{ sect } \s+[0-9a-f]+ ' , dump , re .MULTILINE )
503503
504504 pe = pefile .PE (output , fast_load = True )
505505 found = False
@@ -694,7 +694,7 @@ def test_pcr_signing(kernel_initrd, tmpdir):
694694 dump = subprocess .check_output (['objdump' , '-h' , output ], text = True )
695695
696696 for sect in 'text osrel cmdline linux initrd uname pcrsig' .split ():
697- assert re .search (fr'^\s*\d+\s+.{ sect } \s+0 ' , dump , re .MULTILINE )
697+ assert re .search (fr'^\s*\d+\s+\ .{ sect } \s+[0-9a-f]+ ' , dump , re .MULTILINE )
698698
699699 # objcopy fails when called without an output argument (EPERM).
700700 # It also fails when called with /dev/null (file truncated).
@@ -767,7 +767,7 @@ def test_pcr_signing2(kernel_initrd, tmpdir):
767767 dump = subprocess .check_output (['objdump' , '-h' , output ], text = True )
768768
769769 for sect in 'text osrel cmdline linux initrd uname pcrsig' .split ():
770- assert re .search (fr'^\s*\d+\s+.{ sect } \s+0 ' , dump , re .MULTILINE )
770+ assert re .search (fr'^\s*\d+\s+\ .{ sect } \s+[0-9a-f]+ ' , dump , re .MULTILINE )
771771
772772 subprocess .check_call ([
773773 'objcopy' ,
0 commit comments