binman: test: Organise test files into subdirectories
Subsystems (5)
cover binman: test: Organise test files into subdirectories
From: Simon Glass <[email protected]>
There are about 350 numbered .dts test files in tools/binman/test/ and we sometimes have trouble with numbers being reused.
As an alternative approach, this series moves the files into thematic subdirectories, without the numeric prefixes. This means it's no-longer possible to simply type a three-digit number to get the right file, but the names are shorter so it is still easy enough.
The subdirectories chosen are: blob, capsule, cbfs, cros, entry, fdt, fip, fit, mkimage, pack, security, symbols, vendor, x86, and xpl.
Simon Glass (16):
binman: test: Move pack/layout test files to test/pack/
binman: test: Move U-Boot variant test files to test/xpl/
binman: test: Move x86 and Intel test files to test/x86/
binman: test: Move FIT image test files to test/fit/
binman: test: Move FDT/fdtmap test files to test/fdt/
binman: test: Move blob test files to test/blob/
binman: test: Move security test files to test/security/
binman: test: Move CBFS test files to test/cbfs/
binman: test: Move ChromeOS test files to test/cros/
binman: test: Move mkimage test files to test/mkimage/
binman: test: Move FIP/TF-A test files to test/fip/
binman: test: Move UEFI capsule test files to test/capsule/
binman: test: Move vendor-specific test files to test/vendor/
binman: test: Move symbol test files to test/symbols/
binman: test: Move remaining test files to test/entry/
binman: doc: Update binman_tests.rst for subdirectory layout
doc/develop/binman_tests.rst | 25 +-
tools/binman/entry_test.py | 2 +-
tools/binman/fdt_test.py | 4 +-
tools/binman/ftest.py | 924 +++++++++---------
.../test/{023_blob.dts => blob/blob.dts} | 0
.../test/{157_blob_ext.dts => blob/ext.dts} | 0
.../ext_list.dts} | 0
.../ext_list_fake.dts} | 0
.../ext_list_missing.dts} | 0
.../ext_missing.dts} | 0
.../ext_missing_sect.dts} | 0
.../ext_opt.dts} | 0
.../test/{217_fake_blob.dts => blob/fake.dts} | 0
.../missing.dts} | 0
.../named_by_arg.dts} | 0
.../{273_blob_symbol.dts => blob/symbol.dts} | 0
.../accept.dts} | 0
.../accept_missing_guid.dts} | 0
.../accept_revert_missing.dts} | 0
.../{311_capsule.dts => capsule/capsule.dts} | 0
.../empty_type_missing.dts} | 0
.../missing_guid.dts} | 0
.../missing_index.dts} | 0
.../missing_key.dts} | 0
.../oemflags.dts} | 0
.../revert.dts} | 0
.../signed.dts} | 0
.../signed_ver.dts} | 0
.../version.dts} | 0
.../bad_arch.dts} | 0
.../bad_compress.dts} | 0
.../bad_type.dts} | 0
.../test/{110_cbfs_name.dts => cbfs/name.dts} | 0
.../no_contents.dts} | 0
.../no_size.dts} | 0
.../{114_cbfs_offset.dts => cbfs/offset.dts} | 0
.../test/{102_cbfs_raw.dts => cbfs/raw.dts} | 0
.../raw_compress.dts} | 0
.../raw_ppc.dts} | 0
.../replace.dts} | 0
.../{104_cbfs_stage.dts => cbfs/stage.dts} | 0
.../{125_cbfs_update.dts => cbfs/update.dts} | 0
.../test/{067_fmap.dts => cros/fmap.dts} | 0
.../binman/test/{071_gbb.dts => cros/gbb.dts} | 0
.../gbb_no_size.dts} | 0
.../gbb_too_small.dts} | 0
.../test/{074_vblock.dts => cros/vblock.dts} | 0
.../vblock_bad_entry.dts} | 0
.../vblock_bad_phandle.dts} | 0
.../vblock_content.dts} | 0
.../vblock_no_content.dts} | 0
.../test/{262_absent.dts => entry/absent.dts} | 0
.../collection.dts} | 0
.../collection_other.dts} | 0
.../collection_section.dts} | 0
.../{083_compress.dts => entry/compress.dts} | 0
.../compress_extra.dts} | 0
.../compress_image.dts} | 0
.../compress_image_less.dts} | 0
.../compress_section.dts} | 0
.../compress_section_size.dts} | 0
.../test/{096_elf.dts => entry/elf.dts} | 0
.../elf_strip.dts} | 0
.../entry_args.dts} | 0
.../entry_args_missing.dts} | 0
.../entry_args_required.dts} | 0
.../entry_args_unknown_datatype.dts} | 0
.../test/{174_env.dts => entry/env.dts} | 0
.../env_no_size.dts} | 0
.../env_too_small.dts} | 0
.../test/{084_files.dts => entry/files.dts} | 0
.../files_align.dts} | 0
.../files_compress.dts} | 0
.../files_no_pattern.dts} | 0
.../files_none.dts} | 0
.../test/{069_fill.dts => entry/fill.dts} | 0
.../fill_empty.dts} | 0
.../fill_no_size.dts} | 0
.../image_entryarg.dts} | 0
.../test/{127_list.dts => entry/list.dts} | 0
.../name_prefix.dts} | 0
.../test/{268_null.dts => entry/null.dts} | 0
.../offset_from_elf.dts} | 0
.../{269_overlap.dts => entry/overlap.dts} | 0
.../overlap_bad.dts} | 0
.../overlap_no_size.dts} | 0
.../overlap_null.dts} | 0
.../prop_test.dts} | 0
.../read_image_skip.dts} | 0
.../remove_template.dts} | 0
.../{132_replace.dts => entry/replace.dts} | 0
.../replace_all.dts} | 0
.../replace_multi.dts} | 0
.../replace_repack.dts} | 0
.../replace_section_deep.dts} | 0
.../replace_section_simple.dts} | 0
.../replace_with_bintool.dts} | 0
.../section_fname.dts} | 0
.../section_timeout.dts} | 0
.../{055_sections.dts => entry/sections.dts} | 0
.../{259_symlink.dts => entry/symlink.dts} | 0
.../test/{222_tee_os.dts => entry/tee_os.dts} | 0
.../tee_os_opt.dts} | 0
.../{286_template.dts => entry/template.dts} | 0
.../template_multi.dts} | 0
.../template_phandle.dts} | 0
.../template_phandle_dup.dts} | 0
.../template_section.dts} | 0
.../test/{066_text.dts => entry/text.dts} | 0
.../unique_names.dts} | 0
.../unique_names_multi.dts} | 0
.../unknown_contents.dts} | 0
.../unknown_pos_size.dts} | 0
.../alternates_fdt.dts} | 0
.../alternates_fdtgrep.dts} | 0
.../alternates_inval.dts} | 0
.../alternates_spl.dts} | 0
.../alternates_vpl.dts} | 0
.../bootph_prop.dts} | 0
.../compress_dtb.dts} | 0
.../compress_dtb_invalid.dts} | 0
.../compress_dtb_prepend_invalid.dts} | 0
.../compress_dtb_prepend_length.dts} | 0
.../compress_dtb_zstd.dts} | 0
.../decode_image.dts} | 0
.../decode_image_nohdr.dts} | 0
.../test/{115_fdtmap.dts => fdt/fdtmap.dts} | 0
.../fdtmap_alt_format.dts} | 0
.../fdtmap_hdr.dts} | 0
.../fdtmap_hdr_endbad.dts} | 0
.../fdtmap_hdr_middle.dts} | 0
.../fdtmap_hdr_missing.dts} | 0
.../fdtmap_hdr_nosize.dts} | 0
.../fdtmap_hdr_pos.dts} | 0
.../fdtmap_hdr_start.dts} | 0
.../fdtmap_hdr_startbad.dts} | 0
.../hdr_no_location.dts} | 0
.../test/{194_fdt_incl.dts => fdt/incl.dts} | 0
.../incl_tpl.dts} | 0
.../incl_vpl.dts} | 0
.../list_fdtmap.dts} | 0
.../no_alt_format.dts} | 0
.../{060_fdt_update.dts => fdt/update.dts} | 0
.../update_all.dts} | 0
.../update_all_repack.dts} | 0
.../update_bad.dts} | 0
.../{169_atf_bl31.dts => fip/atf_bl31.dts} | 0
.../bad_align.dts} | 0
.../binman/test/{354_bl1.dts => fip/bl1.dts} | 0
.../collection.dts} | 0
.../binman/test/{203_fip.dts => fip/fip.dts} | 0
.../test/{207_fip_ls.dts => fip/ls.dts} | 0
.../{209_fip_missing.dts => fip/missing.dts} | 0
.../{205_fip_no_type.dts => fip/no_type.dts} | 0
.../test/{201_opensbi.dts => fip/opensbi.dts} | 0
.../test/{204_fip_other.dts => fip/other.dts} | 0
.../{208_fip_replace.dts => fip/replace.dts} | 0
.../binman/test/{172_scp.dts => fip/scp.dts} | 0
.../test/{210_fip_size.dts => fip/size.dts} | 0
.../test/{206_fip_uuid.dts => fip/uuid.dts} | 0
.../test/{275_fit_align.dts => fit/align.dts} | 0
.../{227_fit_bad_dir.dts => fit/bad_dir.dts} | 2 +-
.../bad_dir_config.dts} | 2 +-
.../bad_oper.dts} | 0
.../encrypt_data.dts} | 0
.../encrypt_data_no_key.dts} | 0
.../external.dts} | 0
.../extract_replace.dts} | 0
.../test/{170_fit_fdt.dts => fit/fdt.dts} | 0
.../fdt_compat.dts} | 0
.../{333_fit_fdt_dir.dts => fit/fdt_dir.dts} | 0
.../fdt_list.dts} | 0
.../fdt_missing_prop.dts} | 0
.../fdt_name.dts} | 0
.../fdt_oper.dts} | 0
.../fdt_phase.dts} | 0
.../firmware_loadables.dts} | 0
.../binman/test/{161_fit.dts => fit/fit.dts} | 0
.../{219_fit_gennode.dts => fit/gennode.dts} | 0
.../image_subentry_alignment.dts} | 0
.../key_name_hint_dir_signature.dts} | 0
.../missing_blob.dts} | 0
.../replace_sibling.dts} | 0
.../test/{280_fit_sign.dts => fit/sign.dts} | 0
.../signature.dts} | 0
.../signature_engine.dts} | 0
.../signature_engine_encrypt.dts} | 0
.../signature_engine_pkcs11.dts} | 0
.../signature_engine_pkcs11_object.dts} | 0
.../signature_multi_key.dts} | 0
.../signature_no_nodes.dts} | 0
.../split_elf.dts} | 0
.../subentry_bintool.dts} | 0
.../subentry_hash.dts} | 0
.../tee_os_opt.dts} | 0
.../tee_os_opt_bad.dts} | 0
.../template.dts} | 0
.../coll.dts} | 0
.../filename.dts} | 0
.../image.dts} | 0
.../image_bad.dts} | 0
.../image_no_content.dts} | 0
.../missing.dts} | 0
.../missing_multiple.dts} | 0
.../{156_mkimage.dts => mkimage/mkimage.dts} | 0
.../mult_data.dts} | 0
.../mult_no_content.dts} | 0
.../name.dts} | 0
.../special.dts} | 0
.../{290_mkimage_sym.dts => mkimage/sym.dts} | 0
.../4gb_and_skip_at_start_together.dts} | 0
.../align_default.dts} | 0
.../assume_size.dts} | 0
.../assume_size_ok.dts} | 0
.../{007_bad_align.dts => pack/bad_align.dts} | 0
.../change_size.dts} | 0
.../dual_image.dts} | 0
.../test/{003_empty.dts => pack/empty.dts} | 0
.../entry_extend.dts} | 0
.../entry_extend_section.dts} | 0
.../entry_extend_twice.dts} | 0
.../entry_shrink.dts} | 0
.../expand_size_bad.dts} | 0
.../extend_size.dts} | 0
.../extend_size_bad.dts} | 0
.../image_name.dts} | 0
.../{021_image_pad.dts => pack/image_pad.dts} | 0
.../{001_invalid.dts => pack/invalid.dts} | 0
.../invalid_entry.dts} | 0
.../missing_node.dts} | 0
.../test/{008_pack.dts => pack/pack.dts} | 0
.../pack_4gb_no_size.dts} | 0
.../pack_4gb_outside.dts} | 0
.../pack_align_power2.dts} | 0
.../pack_align_section.dts} | 0
.../pack_align_size_power2.dts} | 0
.../pack_extra.dts} | 0
.../pack_image_align.dts} | 0
.../pack_image_overflow.dts} | 0
.../pack_image_size.dts} | 0
.../pack_inv_align.dts} | 0
.../pack_inv_image_align.dts} | 0
.../pack_inv_image_align_power2.dts} | 0
.../pack_inv_size_align.dts} | 0
.../pack_overflow.dts} | 0
.../pack_overlap.dts} | 0
.../pack_overlap_zero.dts} | 0
.../pack_zero_size.dts} | 0
.../pad_in_sections.dts} | 0
.../section_align.dts} | 0
.../section_inner.dts} | 0
.../section_pad.dts} | 0
.../sections_offset.dts} | 0
.../test/{005_simple.dts => pack/simple.dts} | 0
.../skip_at_start.dts} | 0
.../skip_at_start_pad.dts} | 0
.../skip_at_start_section_pad.dts} | 0
.../test/{024_sorted.dts => pack/sorted.dts} | 0
.../unit_address.dts} | 0
.../{079_uses_pos.dts => pack/uses_pos.dts} | 0
.../encrypted_invalid_iv_file.dts} | 0
.../encrypted_key_file.dts} | 0
.../encrypted_key_source.dts} | 0
.../encrypted_missing_key.dts} | 0
.../encrypted_no_algo.dts} | 0
.../test/{090_hash.dts => security/hash.dts} | 0
.../hash_bad_algo.dts} | 0
.../hash_no_algo.dts} | 0
.../hash_section.dts} | 0
.../key_name_hint_dir_spl_pubkey_dtb.dts} | 0
.../pre_load.dts} | 0
.../pre_load_invalid_algo.dts} | 0
.../pre_load_invalid_key.dts} | 0
.../pre_load_invalid_padding.dts} | 0
.../pre_load_invalid_sha.dts} | 0
.../pre_load_pkcs.dts} | 0
.../pre_load_pss.dts} | 0
.../section_ignore_hash_signature.dts} | 0
.../sign_non_fit.dts} | 0
.../spl_pubkey_dtb.dts} | 0
.../x509_cert.dts} | 0
.../xilinx_bootgen_sign.dts} | 0
.../xilinx_bootgen_sign_enc.dts} | 0
.../base.dts} | 0
.../base_expand.dts} | 0
.../comp.dts} | 0
.../disable.dts} | 0
.../{260_symbols_elf.dts => symbols/elf.dts} | 0
.../expand.dts} | 0
.../nodtb.dts} | 0
.../{187_symbols_sub.dts => symbols/sub.dts} | 0
.../{053_symbols.dts => symbols/symbols.dts} | 0
.../{149_symbols_tpl.dts => symbols/tpl.dts} | 0
.../nxp_ddrfw_imx95.dts} | 0
.../{339_nxp_imx8.dts => vendor/nxp_imx8.dts} | 0
.../nxp_imx8_csf.dts} | 0
.../nxp_imx8_csf_fast_auth.dts} | 0
.../nxp_imx8_imagename.dts} | 0
.../nxp_imx95.dts} | 0
.../powerpc_mpc85xx_bootpg_resetvec.dts} | 0
.../renesas_rcar4_sa0.dts} | 0
.../renesas_rcar4_sa0_size.dts} | 0
.../rockchip_tpl.dts} | 0
.../ti_board_cfg.dts} | 0
.../ti_board_cfg_combined.dts} | 0
.../ti_board_cfg_no_type.dts} | 0
.../ti_board_cfg_phony.dts} | 0
.../test/{351_ti_dm.dts => vendor/ti_dm.dts} | 0
.../ti_secure.dts} | 0
.../ti_secure_firewall.dts} | 0
.../ti_secure_firewall_missing_property.dts} | 0
.../ti_secure_rom.dts} | 0
.../ti_secure_rom_a.dts} | 0
.../ti_secure_rom_b.dts} | 0
.../ti_secure_rom_combined.dts} | 0
.../descriptor_offset.dts} | 0
.../test/{094_fmap_x86.dts => x86/fmap.dts} | 0
.../fmap_section.dts} | 0
.../{043_intel_cmc.dts => x86/intel_cmc.dts} | 0
.../{147_intel_fit.dts => x86/intel_fit.dts} | 0
.../intel_fit_missing.dts} | 0
.../{042_intel_fsp.dts => x86/intel_fsp.dts} | 0
.../intel_fsp_m.dts} | 0
.../intel_fsp_s.dts} | 0
.../intel_fsp_t.dts} | 0
.../{050_intel_mrc.dts => x86/intel_mrc.dts} | 0
.../intel_refcode.dts} | 0
.../{046_intel_vbt.dts => x86/intel_vbt.dts} | 0
.../{032_intel_vga.dts => x86/intel_vga.dts} | 0
.../no_ucode.dts} | 0
.../optional_ucode.dts} | 0
.../{144_x86_reset16.dts => x86/reset16.dts} | 0
.../reset16_spl.dts} | 0
.../reset16_tpl.dts} | 0
.../test/{029_x86_rom.dts => x86/rom.dts} | 0
.../rom_ifwi.dts} | 0
.../rom_ifwi_nodata.dts} | 0
.../rom_ifwi_nodesc.dts} | 0
.../rom_ifwi_section.dts} | 0
.../{031_x86_rom_me.dts => x86/rom_me.dts} | 0
.../rom_me_empty.dts} | 0
.../rom_me_missing.dts} | 0
.../rom_me_no_desc.dts} | 0
.../single_ucode.dts} | 0
.../{033_x86_start16.dts => x86/start16.dts} | 0
.../start16_spl.dts} | 0
.../start16_tpl.dts} | 0
.../symbols_tpl.dts} | 0
.../tpl_ucode.dts} | 0
.../test/{034_x86_ucode.dts => x86/ucode.dts} | 0
.../ucode_missing_node.dts} | 0
.../ucode_missing_node2.dts} | 0
.../ucode_not_in_image.dts} | 0
.../ucode_spl.dts} | 0
.../ucode_spl_needs_retry.dts} | 0
.../test/{036_u_boot_img.dts => xpl/img.dts} | 0
.../pack_dtb.dts} | 0
.../spl_bss_pad.dts} | 0
.../spl_dtb.dts} | 0
.../spl_expand.dts} | 0
.../spl_nodtb.dts} | 0
.../test/{078_u_boot_tpl.dts => xpl/tpl.dts} | 0
.../tpl_bss_pad.dts} | 0
.../tpl_nodtb.dts} | 0
.../test/{255_u_boot_vpl.dts => xpl/vpl.dts} | 0
.../vpl_bss_pad.dts} | 0
.../vpl_nodtb.dts} | 0
367 files changed, 480 insertions(+), 479 deletions(-)
rename tools/binman/test/{023_blob.dts => blob/blob.dts} (100%)
rename tools/binman/test/{157_blob_ext.dts => blob/ext.dts} (100%)
rename tools/binman/test/{215_blob_ext_list.dts => blob/ext_list.dts} (100%)
rename tools/binman/test/{218_blob_ext_list_fake.dts => blob/ext_list_fake.dts} (100%)
rename tools/binman/test/{216_blob_ext_list_missing.dts => blob/ext_list_missing.dts} (100%)
rename tools/binman/test/{158_blob_ext_missing.dts => blob/ext_missing.dts} (100%)
rename tools/binman/test/{159_blob_ext_missing_sect.dts => blob/ext_missing_sect.dts} (100%)
rename tools/binman/test/{266_blob_ext_opt.dts => blob/ext_opt.dts} (100%)
rename tools/binman/test/{217_fake_blob.dts => blob/fake.dts} (100%)
rename tools/binman/test/{173_missing_blob.dts => blob/missing.dts} (100%)
rename tools/binman/test/{068_blob_named_by_arg.dts => blob/named_by_arg.dts} (100%)
rename tools/binman/test/{273_blob_symbol.dts => blob/symbol.dts} (100%)
rename tools/binman/test/{319_capsule_accept.dts => capsule/accept.dts} (100%)
rename tools/binman/test/{321_capsule_accept_missing_guid.dts => capsule/accept_missing_guid.dts} (100%)
rename tools/binman/test/{323_capsule_accept_revert_missing.dts => capsule/accept_revert_missing.dts} (100%)
rename tools/binman/test/{311_capsule.dts => capsule/capsule.dts} (100%)
rename tools/binman/test/{322_empty_capsule_type_missing.dts => capsule/empty_type_missing.dts} (100%)
rename tools/binman/test/{318_capsule_missing_guid.dts => capsule/missing_guid.dts} (100%)
rename tools/binman/test/{317_capsule_missing_index.dts => capsule/missing_index.dts} (100%)
rename tools/binman/test/{316_capsule_missing_key.dts => capsule/missing_key.dts} (100%)
rename tools/binman/test/{315_capsule_oemflags.dts => capsule/oemflags.dts} (100%)
rename tools/binman/test/{320_capsule_revert.dts => capsule/revert.dts} (100%)
rename tools/binman/test/{312_capsule_signed.dts => capsule/signed.dts} (100%)
rename tools/binman/test/{314_capsule_signed_ver.dts => capsule/signed_ver.dts} (100%)
rename tools/binman/test/{313_capsule_version.dts => capsule/version.dts} (100%)
rename tools/binman/test/{106_cbfs_bad_arch.dts => cbfs/bad_arch.dts} (100%)
rename tools/binman/test/{109_cbfs_bad_compress.dts => cbfs/bad_compress.dts} (100%)
rename tools/binman/test/{126_cbfs_bad_type.dts => cbfs/bad_type.dts} (100%)
rename tools/binman/test/{110_cbfs_name.dts => cbfs/name.dts} (100%)
rename tools/binman/test/{108_cbfs_no_contents.dts => cbfs/no_contents.dts} (100%)
rename tools/binman/test/{107_cbfs_no_size.dts => cbfs/no_size.dts} (100%)
rename tools/binman/test/{114_cbfs_offset.dts => cbfs/offset.dts} (100%)
rename tools/binman/test/{102_cbfs_raw.dts => cbfs/raw.dts} (100%)
rename tools/binman/test/{105_cbfs_raw_compress.dts => cbfs/raw_compress.dts} (100%)
rename tools/binman/test/{103_cbfs_raw_ppc.dts => cbfs/raw_ppc.dts} (100%)
rename tools/binman/test/{142_replace_cbfs.dts => cbfs/replace.dts} (100%)
rename tools/binman/test/{104_cbfs_stage.dts => cbfs/stage.dts} (100%)
rename tools/binman/test/{125_cbfs_update.dts => cbfs/update.dts} (100%)
rename tools/binman/test/{067_fmap.dts => cros/fmap.dts} (100%)
rename tools/binman/test/{071_gbb.dts => cros/gbb.dts} (100%)
rename tools/binman/test/{073_gbb_no_size.dts => cros/gbb_no_size.dts} (100%)
rename tools/binman/test/{072_gbb_too_small.dts => cros/gbb_too_small.dts} (100%)
rename tools/binman/test/{074_vblock.dts => cros/vblock.dts} (100%)
rename tools/binman/test/{077_vblock_bad_entry.dts => cros/vblock_bad_entry.dts} (100%)
rename tools/binman/test/{076_vblock_bad_phandle.dts => cros/vblock_bad_phandle.dts} (100%)
rename tools/binman/test/{189_vblock_content.dts => cros/vblock_content.dts} (100%)
rename tools/binman/test/{075_vblock_no_content.dts => cros/vblock_no_content.dts} (100%)
rename tools/binman/test/{262_absent.dts => entry/absent.dts} (100%)
rename tools/binman/test/{198_collection.dts => entry/collection.dts} (100%)
rename tools/binman/test/{246_collection_other.dts => entry/collection_other.dts} (100%)
rename tools/binman/test/{199_collection_section.dts => entry/collection_section.dts} (100%)
rename tools/binman/test/{083_compress.dts => entry/compress.dts} (100%)
rename tools/binman/test/{186_compress_extra.dts => entry/compress_extra.dts} (100%)
rename tools/binman/test/{182_compress_image.dts => entry/compress_image.dts} (100%)
rename tools/binman/test/{183_compress_image_less.dts => entry/compress_image_less.dts} (100%)
rename tools/binman/test/{185_compress_section.dts => entry/compress_section.dts} (100%)
rename tools/binman/test/{184_compress_section_size.dts => entry/compress_section_size.dts} (100%)
rename tools/binman/test/{096_elf.dts => entry/elf.dts} (100%)
rename tools/binman/test/{097_elf_strip.dts => entry/elf_strip.dts} (100%)
rename tools/binman/test/{062_entry_args.dts => entry/entry_args.dts} (100%)
rename tools/binman/test/{063_entry_args_missing.dts => entry/entry_args_missing.dts} (100%)
rename tools/binman/test/{064_entry_args_required.dts => entry/entry_args_required.dts} (100%)
rename tools/binman/test/{065_entry_args_unknown_datatype.dts => entry/entry_args_unknown_datatype.dts} (100%)
rename tools/binman/test/{174_env.dts => entry/env.dts} (100%)
rename tools/binman/test/{175_env_no_size.dts => entry/env_no_size.dts} (100%)
rename tools/binman/test/{176_env_too_small.dts => entry/env_too_small.dts} (100%)
rename tools/binman/test/{084_files.dts => entry/files.dts} (100%)
rename tools/binman/test/{190_files_align.dts => entry/files_align.dts} (100%)
rename tools/binman/test/{085_files_compress.dts => entry/files_compress.dts} (100%)
rename tools/binman/test/{087_files_no_pattern.dts => entry/files_no_pattern.dts} (100%)
rename tools/binman/test/{086_files_none.dts => entry/files_none.dts} (100%)
rename tools/binman/test/{069_fill.dts => entry/fill.dts} (100%)
rename tools/binman/test/{080_fill_empty.dts => entry/fill_empty.dts} (100%)
rename tools/binman/test/{070_fill_no_size.dts => entry/fill_no_size.dts} (100%)
rename tools/binman/test/{188_image_entryarg.dts => entry/image_entryarg.dts} (100%)
rename tools/binman/test/{127_list.dts => entry/list.dts} (100%)
rename tools/binman/test/{056_name_prefix.dts => entry/name_prefix.dts} (100%)
rename tools/binman/test/{268_null.dts => entry/null.dts} (100%)
rename tools/binman/test/{274_offset_from_elf.dts => entry/offset_from_elf.dts} (100%)
rename tools/binman/test/{269_overlap.dts => entry/overlap.dts} (100%)
rename tools/binman/test/{271_overlap_bad.dts => entry/overlap_bad.dts} (100%)
rename tools/binman/test/{272_overlap_no_size.dts => entry/overlap_no_size.dts} (100%)
rename tools/binman/test/{270_overlap_null.dts => entry/overlap_null.dts} (100%)
rename tools/binman/test/{045_prop_test.dts => entry/prop_test.dts} (100%)
rename tools/binman/test/{191_read_image_skip.dts => entry/read_image_skip.dts} (100%)
rename tools/binman/test/{346_remove_template.dts => entry/remove_template.dts} (100%)
rename tools/binman/test/{132_replace.dts => entry/replace.dts} (100%)
rename tools/binman/test/{143_replace_all.dts => entry/replace_all.dts} (100%)
rename tools/binman/test/{133_replace_multi.dts => entry/replace_multi.dts} (100%)
rename tools/binman/test/{139_replace_repack.dts => entry/replace_repack.dts} (100%)
rename tools/binman/test/{278_replace_section_deep.dts => entry/replace_section_deep.dts} (100%)
rename tools/binman/test/{241_replace_section_simple.dts => entry/replace_section_simple.dts} (100%)
rename tools/binman/test/{239_replace_with_bintool.dts => entry/replace_with_bintool.dts} (100%)
rename tools/binman/test/{261_section_fname.dts => entry/section_fname.dts} (100%)
rename tools/binman/test/{202_section_timeout.dts => entry/section_timeout.dts} (100%)
rename tools/binman/test/{055_sections.dts => entry/sections.dts} (100%)
rename tools/binman/test/{259_symlink.dts => entry/symlink.dts} (100%)
rename tools/binman/test/{222_tee_os.dts => entry/tee_os.dts} (100%)
rename tools/binman/test/{263_tee_os_opt.dts => entry/tee_os_opt.dts} (100%)
rename tools/binman/test/{286_template.dts => entry/template.dts} (100%)
rename tools/binman/test/{287_template_multi.dts => entry/template_multi.dts} (100%)
rename tools/binman/test/{309_template_phandle.dts => entry/template_phandle.dts} (100%)
rename tools/binman/test/{310_template_phandle_dup.dts => entry/template_phandle_dup.dts} (100%)
rename tools/binman/test/{289_template_section.dts => entry/template_section.dts} (100%)
rename tools/binman/test/{066_text.dts => entry/text.dts} (100%)
rename tools/binman/test/{237_unique_names.dts => entry/unique_names.dts} (100%)
rename tools/binman/test/{238_unique_names_multi.dts => entry/unique_names_multi.dts} (100%)
rename tools/binman/test/{057_unknown_contents.dts => entry/unknown_contents.dts} (100%)
rename tools/binman/test/{041_unknown_pos_size.dts => entry/unknown_pos_size.dts} (100%)
rename tools/binman/test/{328_alternates_fdt.dts => fdt/alternates_fdt.dts} (100%)
rename tools/binman/test/{329_alternates_fdtgrep.dts => fdt/alternates_fdtgrep.dts} (100%)
rename tools/binman/test/{332_alternates_inval.dts => fdt/alternates_inval.dts} (100%)
rename tools/binman/test/{331_alternates_spl.dts => fdt/alternates_spl.dts} (100%)
rename tools/binman/test/{330_alternates_vpl.dts => fdt/alternates_vpl.dts} (100%)
rename tools/binman/test/{347_bootph_prop.dts => fdt/bootph_prop.dts} (100%)
rename tools/binman/test/{124_compress_dtb.dts => fdt/compress_dtb.dts} (100%)
rename tools/binman/test/{250_compress_dtb_invalid.dts => fdt/compress_dtb_invalid.dts} (100%)
rename tools/binman/test/{248_compress_dtb_prepend_invalid.dts => fdt/compress_dtb_prepend_invalid.dts} (100%)
rename tools/binman/test/{249_compress_dtb_prepend_length.dts => fdt/compress_dtb_prepend_length.dts} (100%)
rename tools/binman/test/{251_compress_dtb_zstd.dts => fdt/compress_dtb_zstd.dts} (100%)
rename tools/binman/test/{128_decode_image.dts => fdt/decode_image.dts} (100%)
rename tools/binman/test/{129_decode_image_nohdr.dts => fdt/decode_image_nohdr.dts} (100%)
rename tools/binman/test/{115_fdtmap.dts => fdt/fdtmap.dts} (100%)
rename tools/binman/test/{213_fdtmap_alt_format.dts => fdt/fdtmap_alt_format.dts} (100%)
rename tools/binman/test/{116_fdtmap_hdr.dts => fdt/fdtmap_hdr.dts} (100%)
rename tools/binman/test/{137_fdtmap_hdr_endbad.dts => fdt/fdtmap_hdr_endbad.dts} (100%)
rename tools/binman/test/{135_fdtmap_hdr_middle.dts => fdt/fdtmap_hdr_middle.dts} (100%)
rename tools/binman/test/{119_fdtmap_hdr_missing.dts => fdt/fdtmap_hdr_missing.dts} (100%)
rename tools/binman/test/{138_fdtmap_hdr_nosize.dts => fdt/fdtmap_hdr_nosize.dts} (100%)
rename tools/binman/test/{118_fdtmap_hdr_pos.dts => fdt/fdtmap_hdr_pos.dts} (100%)
rename tools/binman/test/{117_fdtmap_hdr_start.dts => fdt/fdtmap_hdr_start.dts} (100%)
rename tools/binman/test/{136_fdtmap_hdr_startbad.dts => fdt/fdtmap_hdr_startbad.dts} (100%)
rename tools/binman/test/{120_hdr_no_location.dts => fdt/hdr_no_location.dts} (100%)
rename tools/binman/test/{194_fdt_incl.dts => fdt/incl.dts} (100%)
rename tools/binman/test/{195_fdt_incl_tpl.dts => fdt/incl_tpl.dts} (100%)
rename tools/binman/test/{257_fdt_incl_vpl.dts => fdt/incl_vpl.dts} (100%)
rename tools/binman/test/{130_list_fdtmap.dts => fdt/list_fdtmap.dts} (100%)
rename tools/binman/test/{214_no_alt_format.dts => fdt/no_alt_format.dts} (100%)
rename tools/binman/test/{060_fdt_update.dts => fdt/update.dts} (100%)
rename tools/binman/test/{082_fdt_update_all.dts => fdt/update_all.dts} (100%)
rename tools/binman/test/{134_fdt_update_all_repack.dts => fdt/update_all_repack.dts} (100%)
rename tools/binman/test/{061_fdt_update_bad.dts => fdt/update_bad.dts} (100%)
rename tools/binman/test/{169_atf_bl31.dts => fip/atf_bl31.dts} (100%)
rename tools/binman/test/{211_fip_bad_align.dts => fip/bad_align.dts} (100%)
rename tools/binman/test/{354_bl1.dts => fip/bl1.dts} (100%)
rename tools/binman/test/{212_fip_collection.dts => fip/collection.dts} (100%)
rename tools/binman/test/{203_fip.dts => fip/fip.dts} (100%)
rename tools/binman/test/{207_fip_ls.dts => fip/ls.dts} (100%)
rename tools/binman/test/{209_fip_missing.dts => fip/missing.dts} (100%)
rename tools/binman/test/{205_fip_no_type.dts => fip/no_type.dts} (100%)
rename tools/binman/test/{201_opensbi.dts => fip/opensbi.dts} (100%)
rename tools/binman/test/{204_fip_other.dts => fip/other.dts} (100%)
rename tools/binman/test/{208_fip_replace.dts => fip/replace.dts} (100%)
rename tools/binman/test/{172_scp.dts => fip/scp.dts} (100%)
rename tools/binman/test/{210_fip_size.dts => fip/size.dts} (100%)
rename tools/binman/test/{206_fip_uuid.dts => fip/uuid.dts} (100%)
rename tools/binman/test/{275_fit_align.dts => fit/align.dts} (100%)
rename tools/binman/test/{227_fit_bad_dir.dts => fit/bad_dir.dts} (71%)
rename tools/binman/test/{228_fit_bad_dir_config.dts => fit/bad_dir_config.dts} (71%)
rename tools/binman/test/{224_fit_bad_oper.dts => fit/bad_oper.dts} (100%)
rename tools/binman/test/{343_fit_encrypt_data.dts => fit/encrypt_data.dts} (100%)
rename tools/binman/test/{344_fit_encrypt_data_no_key.dts => fit/encrypt_data_no_key.dts} (100%)
rename tools/binman/test/{162_fit_external.dts => fit/external.dts} (100%)
rename tools/binman/test/{240_fit_extract_replace.dts => fit/extract_replace.dts} (100%)
rename tools/binman/test/{170_fit_fdt.dts => fit/fdt.dts} (100%)
rename tools/binman/test/{334_fit_fdt_compat.dts => fit/fdt_compat.dts} (100%)
rename tools/binman/test/{333_fit_fdt_dir.dts => fit/fdt_dir.dts} (100%)
rename tools/binman/test/{284_fit_fdt_list.dts => fit/fdt_list.dts} (100%)
rename tools/binman/test/{171_fit_fdt_missing_prop.dts => fit/fdt_missing_prop.dts} (100%)
rename tools/binman/test/{345_fit_fdt_name.dts => fit/fdt_name.dts} (100%)
rename tools/binman/test/{223_fit_fdt_oper.dts => fit/fdt_oper.dts} (100%)
rename tools/binman/test/{335_fit_fdt_phase.dts => fit/fdt_phase.dts} (100%)
rename tools/binman/test/{276_fit_firmware_loadables.dts => fit/firmware_loadables.dts} (100%)
rename tools/binman/test/{161_fit.dts => fit/fit.dts} (100%)
rename tools/binman/test/{219_fit_gennode.dts => fit/gennode.dts} (100%)
rename tools/binman/test/{167_fit_image_subentry_alignment.dts => fit/image_subentry_alignment.dts} (100%)
rename tools/binman/test/{355_key_name_hint_dir_fit_signature.dts => fit/key_name_hint_dir_signature.dts} (100%)
rename tools/binman/test/{168_fit_missing_blob.dts => fit/missing_blob.dts} (100%)
rename tools/binman/test/{277_replace_fit_sibling.dts => fit/replace_sibling.dts} (100%)
rename tools/binman/test/{280_fit_sign.dts => fit/sign.dts} (100%)
rename tools/binman/test/{340_fit_signature.dts => fit/signature.dts} (100%)
rename tools/binman/test/{360_fit_signature_engine.dts => fit/signature_engine.dts} (100%)
rename tools/binman/test/{361_fit_signature_engine_encrypt.dts => fit/signature_engine_encrypt.dts} (100%)
rename tools/binman/test/{362_fit_signature_engine_pkcs11.dts => fit/signature_engine_pkcs11.dts} (100%)
rename tools/binman/test/{363_fit_signature_engine_pkcs11_object.dts => fit/signature_engine_pkcs11_object.dts} (100%)
rename tools/binman/test/{341_fit_signature.dts => fit/signature_multi_key.dts} (100%)
rename tools/binman/test/{342_fit_signature.dts => fit/signature_no_nodes.dts} (100%)
rename tools/binman/test/{226_fit_split_elf.dts => fit/split_elf.dts} (100%)
rename tools/binman/test/{220_fit_subentry_bintool.dts => fit/subentry_bintool.dts} (100%)
rename tools/binman/test/{221_fit_subentry_hash.dts => fit/subentry_hash.dts} (100%)
rename tools/binman/test/{264_tee_os_opt_fit.dts => fit/tee_os_opt.dts} (100%)
rename tools/binman/test/{265_tee_os_opt_fit_bad.dts => fit/tee_os_opt_bad.dts} (100%)
rename tools/binman/test/{288_template_fit.dts => fit/template.dts} (100%)
rename tools/binman/test/{247_mkimage_coll.dts => mkimage/coll.dts} (100%)
rename tools/binman/test/{254_mkimage_filename.dts => mkimage/filename.dts} (100%)
rename tools/binman/test/{243_mkimage_image.dts => mkimage/image.dts} (100%)
rename tools/binman/test/{245_mkimage_image_bad.dts => mkimage/image_bad.dts} (100%)
rename tools/binman/test/{244_mkimage_image_no_content.dts => mkimage/image_no_content.dts} (100%)
rename tools/binman/test/{229_mkimage_missing.dts => mkimage/missing.dts} (100%)
rename tools/binman/test/{292_mkimage_missing_multiple.dts => mkimage/missing_multiple.dts} (100%)
rename tools/binman/test/{156_mkimage.dts => mkimage/mkimage.dts} (100%)
rename tools/binman/test/{252_mkimage_mult_data.dts => mkimage/mult_data.dts} (100%)
rename tools/binman/test/{253_mkimage_mult_no_content.dts => mkimage/mult_no_content.dts} (100%)
rename tools/binman/test/{242_mkimage_name.dts => mkimage/name.dts} (100%)
rename tools/binman/test/{283_mkimage_special.dts => mkimage/special.dts} (100%)
rename tools/binman/test/{290_mkimage_sym.dts => mkimage/sym.dts} (100%)
rename tools/binman/test/{098_4gb_and_skip_at_start_together.dts => pack/4gb_and_skip_at_start_together.dts} (100%)
rename tools/binman/test/{200_align_default.dts => pack/align_default.dts} (100%)
rename tools/binman/test/{326_assume_size.dts => pack/assume_size.dts} (100%)
rename tools/binman/test/{327_assume_size_ok.dts => pack/assume_size_ok.dts} (100%)
rename tools/binman/test/{007_bad_align.dts => pack/bad_align.dts} (100%)
rename tools/binman/test/{059_change_size.dts => pack/change_size.dts} (100%)
rename tools/binman/test/{006_dual_image.dts => pack/dual_image.dts} (100%)
rename tools/binman/test/{003_empty.dts => pack/empty.dts} (100%)
rename tools/binman/test/{121_entry_extend.dts => pack/entry_extend.dts} (100%)
rename tools/binman/test/{123_entry_extend_section.dts => pack/entry_extend_section.dts} (100%)
rename tools/binman/test/{122_entry_extend_twice.dts => pack/entry_extend_twice.dts} (100%)
rename tools/binman/test/{140_entry_shrink.dts => pack/entry_shrink.dts} (100%)
rename tools/binman/test/{225_expand_size_bad.dts => pack/expand_size_bad.dts} (100%)
rename tools/binman/test/{088_extend_size.dts => pack/extend_size.dts} (100%)
rename tools/binman/test/{089_extend_size_bad.dts => pack/extend_size_bad.dts} (100%)
rename tools/binman/test/{022_image_name.dts => pack/image_name.dts} (100%)
rename tools/binman/test/{021_image_pad.dts => pack/image_pad.dts} (100%)
rename tools/binman/test/{001_invalid.dts => pack/invalid.dts} (100%)
rename tools/binman/test/{004_invalid_entry.dts => pack/invalid_entry.dts} (100%)
rename tools/binman/test/{002_missing_node.dts => pack/missing_node.dts} (100%)
rename tools/binman/test/{008_pack.dts => pack/pack.dts} (100%)
rename tools/binman/test/{027_pack_4gb_no_size.dts => pack/pack_4gb_no_size.dts} (100%)
rename tools/binman/test/{028_pack_4gb_outside.dts => pack/pack_4gb_outside.dts} (100%)
rename tools/binman/test/{010_pack_align_power2.dts => pack/pack_align_power2.dts} (100%)
rename tools/binman/test/{131_pack_align_section.dts => pack/pack_align_section.dts} (100%)
rename tools/binman/test/{011_pack_align_size_power2.dts => pack/pack_align_size_power2.dts} (100%)
rename tools/binman/test/{009_pack_extra.dts => pack/pack_extra.dts} (100%)
rename tools/binman/test/{018_pack_image_align.dts => pack/pack_image_align.dts} (100%)
rename tools/binman/test/{016_pack_image_overflow.dts => pack/pack_image_overflow.dts} (100%)
rename tools/binman/test/{017_pack_image_size.dts => pack/pack_image_size.dts} (100%)
rename tools/binman/test/{012_pack_inv_align.dts => pack/pack_inv_align.dts} (100%)
rename tools/binman/test/{019_pack_inv_image_align.dts => pack/pack_inv_image_align.dts} (100%)
rename tools/binman/test/{020_pack_inv_image_align_power2.dts => pack/pack_inv_image_align_power2.dts} (100%)
rename tools/binman/test/{013_pack_inv_size_align.dts => pack/pack_inv_size_align.dts} (100%)
rename tools/binman/test/{015_pack_overflow.dts => pack/pack_overflow.dts} (100%)
rename tools/binman/test/{014_pack_overlap.dts => pack/pack_overlap.dts} (100%)
rename tools/binman/test/{160_pack_overlap_zero.dts => pack/pack_overlap_zero.dts} (100%)
rename tools/binman/test/{025_pack_zero_size.dts => pack/pack_zero_size.dts} (100%)
rename tools/binman/test/{166_pad_in_sections.dts => pack/pad_in_sections.dts} (100%)
rename tools/binman/test/{181_section_align.dts => pack/section_align.dts} (100%)
rename tools/binman/test/{267_section_inner.dts => pack/section_inner.dts} (100%)
rename tools/binman/test/{180_section_pad.dts => pack/section_pad.dts} (100%)
rename tools/binman/test/{101_sections_offset.dts => pack/sections_offset.dts} (100%)
rename tools/binman/test/{005_simple.dts => pack/simple.dts} (100%)
rename tools/binman/test/{177_skip_at_start.dts => pack/skip_at_start.dts} (100%)
rename tools/binman/test/{178_skip_at_start_pad.dts => pack/skip_at_start_pad.dts} (100%)
rename tools/binman/test/{179_skip_at_start_section_pad.dts => pack/skip_at_start_section_pad.dts} (100%)
rename tools/binman/test/{024_sorted.dts => pack/sorted.dts} (100%)
rename tools/binman/test/{054_unit_address.dts => pack/unit_address.dts} (100%)
rename tools/binman/test/{079_uses_pos.dts => pack/uses_pos.dts} (100%)
rename tools/binman/test/{302_encrypted_invalid_iv_file.dts => security/encrypted_invalid_iv_file.dts} (100%)
rename tools/binman/test/{305_encrypted_key_file.dts => security/encrypted_key_file.dts} (100%)
rename tools/binman/test/{304_encrypted_key_source.dts => security/encrypted_key_source.dts} (100%)
rename tools/binman/test/{303_encrypted_missing_key.dts => security/encrypted_missing_key.dts} (100%)
rename tools/binman/test/{301_encrypted_no_algo.dts => security/encrypted_no_algo.dts} (100%)
rename tools/binman/test/{090_hash.dts => security/hash.dts} (100%)
rename tools/binman/test/{092_hash_bad_algo.dts => security/hash_bad_algo.dts} (100%)
rename tools/binman/test/{091_hash_no_algo.dts => security/hash_no_algo.dts} (100%)
rename tools/binman/test/{099_hash_section.dts => security/hash_section.dts} (100%)
rename tools/binman/test/{356_key_name_hint_dir_spl_pubkey_dtb.dts => security/key_name_hint_dir_spl_pubkey_dtb.dts} (100%)
rename tools/binman/test/{230_pre_load.dts => security/pre_load.dts} (100%)
rename tools/binman/test/{235_pre_load_invalid_algo.dts => security/pre_load_invalid_algo.dts} (100%)
rename tools/binman/test/{236_pre_load_invalid_key.dts => security/pre_load_invalid_key.dts} (100%)
rename tools/binman/test/{233_pre_load_invalid_padding.dts => security/pre_load_invalid_padding.dts} (100%)
rename tools/binman/test/{234_pre_load_invalid_sha.dts => security/pre_load_invalid_sha.dts} (100%)
rename tools/binman/test/{231_pre_load_pkcs.dts => security/pre_load_pkcs.dts} (100%)
rename tools/binman/test/{232_pre_load_pss.dts => security/pre_load_pss.dts} (100%)
rename tools/binman/test/{165_section_ignore_hash_signature.dts => security/section_ignore_hash_signature.dts} (100%)
rename tools/binman/test/{281_sign_non_fit.dts => security/sign_non_fit.dts} (100%)
rename tools/binman/test/{306_spl_pubkey_dtb.dts => security/spl_pubkey_dtb.dts} (100%)
rename tools/binman/test/{279_x509_cert.dts => security/x509_cert.dts} (100%)
rename tools/binman/test/{307_xilinx_bootgen_sign.dts => security/xilinx_bootgen_sign.dts} (100%)
rename tools/binman/test/{308_xilinx_bootgen_sign_enc.dts => security/xilinx_bootgen_sign_enc.dts} (100%)
rename tools/binman/test/{336_symbols_base.dts => symbols/base.dts} (100%)
rename tools/binman/test/{337_symbols_base_expand.dts => symbols/base_expand.dts} (100%)
rename tools/binman/test/{338_symbols_comp.dts => symbols/comp.dts} (100%)
rename tools/binman/test/{282_symbols_disable.dts => symbols/disable.dts} (100%)
rename tools/binman/test/{260_symbols_elf.dts => symbols/elf.dts} (100%)
rename tools/binman/test/{197_symbols_expand.dts => symbols/expand.dts} (100%)
rename tools/binman/test/{196_symbols_nodtb.dts => symbols/nodtb.dts} (100%)
rename tools/binman/test/{187_symbols_sub.dts => symbols/sub.dts} (100%)
rename tools/binman/test/{053_symbols.dts => symbols/symbols.dts} (100%)
rename tools/binman/test/{149_symbols_tpl.dts => symbols/tpl.dts} (100%)
rename tools/binman/test/{353_nxp_ddrfw_imx95.dts => vendor/nxp_ddrfw_imx95.dts} (100%)
rename tools/binman/test/{339_nxp_imx8.dts => vendor/nxp_imx8.dts} (100%)
rename tools/binman/test/{364_nxp_imx8_csf.dts => vendor/nxp_imx8_csf.dts} (100%)
rename tools/binman/test/{365_nxp_imx8_csf_fast_auth.dts => vendor/nxp_imx8_csf_fast_auth.dts} (100%)
rename tools/binman/test/{366_nxp_imx8_imagename.dts => vendor/nxp_imx8_imagename.dts} (100%)
rename tools/binman/test/{359_nxp_imx95.dts => vendor/nxp_imx95.dts} (100%)
rename tools/binman/test/{150_powerpc_mpc85xx_bootpg_resetvec.dts => vendor/powerpc_mpc85xx_bootpg_resetvec.dts} (100%)
rename tools/binman/test/{357_renesas_rcar4_sa0.dts => vendor/renesas_rcar4_sa0.dts} (100%)
rename tools/binman/test/{358_renesas_rcar4_sa0_size.dts => vendor/renesas_rcar4_sa0_size.dts} (100%)
rename tools/binman/test/{291_rockchip_tpl.dts => vendor/rockchip_tpl.dts} (100%)
rename tools/binman/test/{293_ti_board_cfg.dts => vendor/ti_board_cfg.dts} (100%)
rename tools/binman/test/{294_ti_board_cfg_combined.dts => vendor/ti_board_cfg_combined.dts} (100%)
rename tools/binman/test/{295_ti_board_cfg_no_type.dts => vendor/ti_board_cfg_no_type.dts} (100%)
rename tools/binman/test/{352_ti_board_cfg_phony.dts => vendor/ti_board_cfg_phony.dts} (100%)
rename tools/binman/test/{351_ti_dm.dts => vendor/ti_dm.dts} (100%)
rename tools/binman/test/{296_ti_secure.dts => vendor/ti_secure.dts} (100%)
rename tools/binman/test/{324_ti_secure_firewall.dts => vendor/ti_secure_firewall.dts} (100%)
rename tools/binman/test/{325_ti_secure_firewall_missing_property.dts => vendor/ti_secure_firewall_missing_property.dts} (100%)
rename tools/binman/test/{297_ti_secure_rom.dts => vendor/ti_secure_rom.dts} (100%)
rename tools/binman/test/{299_ti_secure_rom_a.dts => vendor/ti_secure_rom_a.dts} (100%)
rename tools/binman/test/{300_ti_secure_rom_b.dts => vendor/ti_secure_rom_b.dts} (100%)
rename tools/binman/test/{298_ti_secure_rom_combined.dts => vendor/ti_secure_rom_combined.dts} (100%)
rename tools/binman/test/{141_descriptor_offset.dts => x86/descriptor_offset.dts} (100%)
rename tools/binman/test/{094_fmap_x86.dts => x86/fmap.dts} (100%)
rename tools/binman/test/{095_fmap_x86_section.dts => x86/fmap_section.dts} (100%)
rename tools/binman/test/{043_intel_cmc.dts => x86/intel_cmc.dts} (100%)
rename tools/binman/test/{147_intel_fit.dts => x86/intel_fit.dts} (100%)
rename tools/binman/test/{148_intel_fit_missing.dts => x86/intel_fit_missing.dts} (100%)
rename tools/binman/test/{042_intel_fsp.dts => x86/intel_fsp.dts} (100%)
rename tools/binman/test/{152_intel_fsp_m.dts => x86/intel_fsp_m.dts} (100%)
rename tools/binman/test/{153_intel_fsp_s.dts => x86/intel_fsp_s.dts} (100%)
rename tools/binman/test/{154_intel_fsp_t.dts => x86/intel_fsp_t.dts} (100%)
rename tools/binman/test/{050_intel_mrc.dts => x86/intel_mrc.dts} (100%)
rename tools/binman/test/{100_intel_refcode.dts => x86/intel_refcode.dts} (100%)
rename tools/binman/test/{046_intel_vbt.dts => x86/intel_vbt.dts} (100%)
rename tools/binman/test/{032_intel_vga.dts => x86/intel_vga.dts} (100%)
rename tools/binman/test/{037_x86_no_ucode.dts => x86/no_ucode.dts} (100%)
rename tools/binman/test/{044_x86_optional_ucode.dts => x86/optional_ucode.dts} (100%)
rename tools/binman/test/{144_x86_reset16.dts => x86/reset16.dts} (100%)
rename tools/binman/test/{145_x86_reset16_spl.dts => x86/reset16_spl.dts} (100%)
rename tools/binman/test/{146_x86_reset16_tpl.dts => x86/reset16_tpl.dts} (100%)
rename tools/binman/test/{029_x86_rom.dts => x86/rom.dts} (100%)
rename tools/binman/test/{111_x86_rom_ifwi.dts => x86/rom_ifwi.dts} (100%)
rename tools/binman/test/{113_x86_rom_ifwi_nodata.dts => x86/rom_ifwi_nodata.dts} (100%)
rename tools/binman/test/{112_x86_rom_ifwi_nodesc.dts => x86/rom_ifwi_nodesc.dts} (100%)
rename tools/binman/test/{151_x86_rom_ifwi_section.dts => x86/rom_ifwi_section.dts} (100%)
rename tools/binman/test/{031_x86_rom_me.dts => x86/rom_me.dts} (100%)
rename tools/binman/test/{163_x86_rom_me_empty.dts => x86/rom_me_empty.dts} (100%)
rename tools/binman/test/{164_x86_rom_me_missing.dts => x86/rom_me_missing.dts} (100%)
rename tools/binman/test/{030_x86_rom_me_no_desc.dts => x86/rom_me_no_desc.dts} (100%)
rename tools/binman/test/{035_x86_single_ucode.dts => x86/single_ucode.dts} (100%)
rename tools/binman/test/{033_x86_start16.dts => x86/start16.dts} (100%)
rename tools/binman/test/{048_x86_start16_spl.dts => x86/start16_spl.dts} (100%)
rename tools/binman/test/{081_x86_start16_tpl.dts => x86/start16_tpl.dts} (100%)
rename tools/binman/test/{155_symbols_tpl_x86.dts => x86/symbols_tpl.dts} (100%)
rename tools/binman/test/{093_x86_tpl_ucode.dts => x86/tpl_ucode.dts} (100%)
rename tools/binman/test/{034_x86_ucode.dts => x86/ucode.dts} (100%)
rename tools/binman/test/{038_x86_ucode_missing_node.dts => x86/ucode_missing_node.dts} (100%)
rename tools/binman/test/{039_x86_ucode_missing_node2.dts => x86/ucode_missing_node2.dts} (100%)
rename tools/binman/test/{040_x86_ucode_not_in_image.dts => x86/ucode_not_in_image.dts} (100%)
rename tools/binman/test/{049_x86_ucode_spl.dts => x86/ucode_spl.dts} (100%)
rename tools/binman/test/{058_x86_ucode_spl_needs_retry.dts => x86/ucode_spl_needs_retry.dts} (100%)
rename tools/binman/test/{036_u_boot_img.dts => xpl/img.dts} (100%)
rename tools/binman/test/{026_pack_u_boot_dtb.dts => xpl/pack_dtb.dts} (100%)
rename tools/binman/test/{047_spl_bss_pad.dts => xpl/spl_bss_pad.dts} (100%)
rename tools/binman/test/{051_u_boot_spl_dtb.dts => xpl/spl_dtb.dts} (100%)
rename tools/binman/test/{285_spl_expand.dts => xpl/spl_expand.dts} (100%)
rename tools/binman/test/{052_u_boot_spl_nodtb.dts => xpl/spl_nodtb.dts} (100%)
rename tools/binman/test/{078_u_boot_tpl.dts => xpl/tpl.dts} (100%)
rename tools/binman/test/{193_tpl_bss_pad.dts => xpl/tpl_bss_pad.dts} (100%)
rename tools/binman/test/{192_u_boot_tpl_nodtb.dts => xpl/tpl_nodtb.dts} (100%)
rename tools/binman/test/{255_u_boot_vpl.dts => xpl/vpl.dts} (100%)
rename tools/binman/test/{258_vpl_bss_pad.dts => xpl/vpl_bss_pad.dts} (100%)
rename tools/binman/test/{256_u_boot_vpl_nodtb.dts => xpl/vpl_nodtb.dts} (100%)Signature · 4 lines
2.43.0 base-commit: 4d060dd7ce03abf83bce96fb9c65a8b8e715fe88 branch: bini-us
RFC PATCH 1/16 binman: test: Move pack/layout test files to test/pack/
From: Simon Glass <[email protected]>
Move about 50 test files related to basic layout, packing, alignment, sections, and image structure into a pack/ subdirectory. Drop the numeric prefixes from the filenames and update all references in ftest.py, entry_test.py, and binman_tests.rst
---
doc/develop/binman_tests.rst | 2 +-
tools/binman/entry_test.py | 2 +-
tools/binman/ftest.py | 120 +++++++++---------
.../4gb_and_skip_at_start_together.dts} | 0
.../align_default.dts} | 0
.../assume_size.dts} | 0
.../assume_size_ok.dts} | 0
.../{007_bad_align.dts => pack/bad_align.dts} | 0
.../change_size.dts} | 0
.../dual_image.dts} | 0
.../test/{003_empty.dts => pack/empty.dts} | 0
.../entry_extend.dts} | 0
.../entry_extend_section.dts} | 0
.../entry_extend_twice.dts} | 0
.../entry_shrink.dts} | 0
.../expand_size_bad.dts} | 0
.../extend_size.dts} | 0
.../extend_size_bad.dts} | 0
.../image_name.dts} | 0
.../{021_image_pad.dts => pack/image_pad.dts} | 0
.../{001_invalid.dts => pack/invalid.dts} | 0
.../invalid_entry.dts} | 0
.../missing_node.dts} | 0
.../test/{008_pack.dts => pack/pack.dts} | 0
.../pack_4gb_no_size.dts} | 0
.../pack_4gb_outside.dts} | 0
.../pack_align_power2.dts} | 0
.../pack_align_section.dts} | 0
.../pack_align_size_power2.dts} | 0
.../pack_extra.dts} | 0
.../pack_image_align.dts} | 0
.../pack_image_overflow.dts} | 0
.../pack_image_size.dts} | 0
.../pack_inv_align.dts} | 0
.../pack_inv_image_align.dts} | 0
.../pack_inv_image_align_power2.dts} | 0
.../pack_inv_size_align.dts} | 0
.../pack_overflow.dts} | 0
.../pack_overlap.dts} | 0
.../pack_overlap_zero.dts} | 0
.../pack_zero_size.dts} | 0
.../pad_in_sections.dts} | 0
.../section_align.dts} | 0
.../section_inner.dts} | 0
.../section_pad.dts} | 0
.../sections_offset.dts} | 0
.../test/{005_simple.dts => pack/simple.dts} | 0
.../skip_at_start.dts} | 0
.../skip_at_start_pad.dts} | 0
.../skip_at_start_section_pad.dts} | 0
.../test/{024_sorted.dts => pack/sorted.dts} | 0
.../unit_address.dts} | 0
.../{079_uses_pos.dts => pack/uses_pos.dts} | 0
53 files changed, 62 insertions(+), 62 deletions(-)
rename tools/binman/test/{098_4gb_and_skip_at_start_together.dts => pack/4gb_and_skip_at_start_together.dts} (100%)
rename tools/binman/test/{200_align_default.dts => pack/align_default.dts} (100%)
rename tools/binman/test/{326_assume_size.dts => pack/assume_size.dts} (100%)
rename tools/binman/test/{327_assume_size_ok.dts => pack/assume_size_ok.dts} (100%)
rename tools/binman/test/{007_bad_align.dts => pack/bad_align.dts} (100%)
rename tools/binman/test/{059_change_size.dts => pack/change_size.dts} (100%)
rename tools/binman/test/{006_dual_image.dts => pack/dual_image.dts} (100%)
rename tools/binman/test/{003_empty.dts => pack/empty.dts} (100%)
rename tools/binman/test/{121_entry_extend.dts => pack/entry_extend.dts} (100%)
rename tools/binman/test/{123_entry_extend_section.dts => pack/entry_extend_section.dts} (100%)
rename tools/binman/test/{122_entry_extend_twice.dts => pack/entry_extend_twice.dts} (100%)
rename tools/binman/test/{140_entry_shrink.dts => pack/entry_shrink.dts} (100%)
rename tools/binman/test/{225_expand_size_bad.dts => pack/expand_size_bad.dts} (100%)
rename tools/binman/test/{088_extend_size.dts => pack/extend_size.dts} (100%)
rename tools/binman/test/{089_extend_size_bad.dts => pack/extend_size_bad.dts} (100%)
rename tools/binman/test/{022_image_name.dts => pack/image_name.dts} (100%)
rename tools/binman/test/{021_image_pad.dts => pack/image_pad.dts} (100%)
rename tools/binman/test/{001_invalid.dts => pack/invalid.dts} (100%)
rename tools/binman/test/{004_invalid_entry.dts => pack/invalid_entry.dts} (100%)
rename tools/binman/test/{002_missing_node.dts => pack/missing_node.dts} (100%)
rename tools/binman/test/{008_pack.dts => pack/pack.dts} (100%)
rename tools/binman/test/{027_pack_4gb_no_size.dts => pack/pack_4gb_no_size.dts} (100%)
rename tools/binman/test/{028_pack_4gb_outside.dts => pack/pack_4gb_outside.dts} (100%)
rename tools/binman/test/{010_pack_align_power2.dts => pack/pack_align_power2.dts} (100%)
rename tools/binman/test/{131_pack_align_section.dts => pack/pack_align_section.dts} (100%)
rename tools/binman/test/{011_pack_align_size_power2.dts => pack/pack_align_size_power2.dts} (100%)
rename tools/binman/test/{009_pack_extra.dts => pack/pack_extra.dts} (100%)
rename tools/binman/test/{018_pack_image_align.dts => pack/pack_image_align.dts} (100%)
rename tools/binman/test/{016_pack_image_overflow.dts => pack/pack_image_overflow.dts} (100%)
rename tools/binman/test/{017_pack_image_size.dts => pack/pack_image_size.dts} (100%)
rename tools/binman/test/{012_pack_inv_align.dts => pack/pack_inv_align.dts} (100%)
rename tools/binman/test/{019_pack_inv_image_align.dts => pack/pack_inv_image_align.dts} (100%)
rename tools/binman/test/{020_pack_inv_image_align_power2.dts => pack/pack_inv_image_align_power2.dts} (100%)
rename tools/binman/test/{013_pack_inv_size_align.dts => pack/pack_inv_size_align.dts} (100%)
rename tools/binman/test/{015_pack_overflow.dts => pack/pack_overflow.dts} (100%)
rename tools/binman/test/{014_pack_overlap.dts => pack/pack_overlap.dts} (100%)
rename tools/binman/test/{160_pack_overlap_zero.dts => pack/pack_overlap_zero.dts} (100%)
rename tools/binman/test/{025_pack_zero_size.dts => pack/pack_zero_size.dts} (100%)
rename tools/binman/test/{166_pad_in_sections.dts => pack/pad_in_sections.dts} (100%)
rename tools/binman/test/{181_section_align.dts => pack/section_align.dts} (100%)
rename tools/binman/test/{267_section_inner.dts => pack/section_inner.dts} (100%)
rename tools/binman/test/{180_section_pad.dts => pack/section_pad.dts} (100%)
rename tools/binman/test/{101_sections_offset.dts => pack/sections_offset.dts} (100%)
rename tools/binman/test/{005_simple.dts => pack/simple.dts} (100%)
rename tools/binman/test/{177_skip_at_start.dts => pack/skip_at_start.dts} (100%)
rename tools/binman/test/{178_skip_at_start_pad.dts => pack/skip_at_start_pad.dts} (100%)
rename tools/binman/test/{179_skip_at_start_section_pad.dts => pack/skip_at_start_section_pad.dts} (100%)
rename tools/binman/test/{024_sorted.dts => pack/sorted.dts} (100%)
rename tools/binman/test/{054_unit_address.dts => pack/unit_address.dts} (100%)
rename tools/binman/test/{079_uses_pos.dts => pack/uses_pos.dts} (100%)doc/develop/binman_tests.rst +1 -1
@@ -331,7 +331,7 @@ Here is a simple test: def testSimple(self): """Test a simple binman with a single file""" - data = self._DoReadFile('005_simple.dts') + data = self._DoReadFile('pack/simple.dts') self.assertEqual(U_BOOT_DATA, data) This test tells Binman to build an image using the description. Then it checks
tools/binman/entry_test.py +1 -1
@@ -26,7 +26,7 @@ class TestEntry(unittest.TestCase): def GetNode(self): binman_dir = os.path.dirname(os.path.realpath(sys.argv[0])) fname = fdt_util.EnsureCompiled( - os.path.join(binman_dir,('test/005_simple.dts'))) + os.path.join(binman_dir,('test/pack/simple.dts'))) dtb = fdt.FdtScan(fname) return dtb.GetNode('/binman/u-boot')
tools/binman/ftest.py +60 -60
471 lines not on this page · raw message
tools/binman/test/pack/4gb_and_skip_at_start_together.dts renamed from tools/binman/test/098_4gb_and_skip_at_start_together.dts +0 -0
tools/binman/test/pack/align_default.dts renamed from tools/binman/test/200_align_default.dts +0 -0
tools/binman/test/pack/assume_size.dts renamed from tools/binman/test/326_assume_size.dts +0 -0
tools/binman/test/pack/assume_size_ok.dts renamed from tools/binman/test/327_assume_size_ok.dts +0 -0
tools/binman/test/pack/bad_align.dts renamed from tools/binman/test/007_bad_align.dts +0 -0
tools/binman/test/pack/change_size.dts renamed from tools/binman/test/059_change_size.dts +0 -0
tools/binman/test/pack/dual_image.dts renamed from tools/binman/test/006_dual_image.dts +0 -0
tools/binman/test/pack/empty.dts renamed from tools/binman/test/003_empty.dts +0 -0
tools/binman/test/pack/entry_extend.dts renamed from tools/binman/test/121_entry_extend.dts +0 -0
tools/binman/test/pack/entry_extend_section.dts renamed from tools/binman/test/123_entry_extend_section.dts +0 -0
tools/binman/test/pack/entry_extend_twice.dts renamed from tools/binman/test/122_entry_extend_twice.dts +0 -0
tools/binman/test/pack/entry_shrink.dts renamed from tools/binman/test/140_entry_shrink.dts +0 -0
tools/binman/test/pack/expand_size_bad.dts renamed from tools/binman/test/225_expand_size_bad.dts +0 -0
tools/binman/test/pack/extend_size.dts renamed from tools/binman/test/088_extend_size.dts +0 -0
tools/binman/test/pack/extend_size_bad.dts renamed from tools/binman/test/089_extend_size_bad.dts +0 -0
tools/binman/test/pack/image_name.dts renamed from tools/binman/test/022_image_name.dts +0 -0
tools/binman/test/pack/image_pad.dts renamed from tools/binman/test/021_image_pad.dts +0 -0
tools/binman/test/pack/invalid.dts renamed from tools/binman/test/001_invalid.dts +0 -0
tools/binman/test/pack/invalid_entry.dts renamed from tools/binman/test/004_invalid_entry.dts +0 -0
tools/binman/test/pack/missing_node.dts renamed from tools/binman/test/002_missing_node.dts +0 -0
tools/binman/test/pack/pack.dts renamed from tools/binman/test/008_pack.dts +0 -0
tools/binman/test/pack/pack_4gb_no_size.dts renamed from tools/binman/test/027_pack_4gb_no_size.dts +0 -0
tools/binman/test/pack/pack_4gb_outside.dts renamed from tools/binman/test/028_pack_4gb_outside.dts +0 -0
tools/binman/test/pack/pack_align_power2.dts renamed from tools/binman/test/010_pack_align_power2.dts +0 -0
tools/binman/test/pack/pack_align_section.dts renamed from tools/binman/test/131_pack_align_section.dts +0 -0
tools/binman/test/pack/pack_align_size_power2.dts renamed from tools/binman/test/011_pack_align_size_power2.dts +0 -0
tools/binman/test/pack/pack_extra.dts renamed from tools/binman/test/009_pack_extra.dts +0 -0
tools/binman/test/pack/pack_image_align.dts renamed from tools/binman/test/018_pack_image_align.dts +0 -0
tools/binman/test/pack/pack_image_overflow.dts renamed from tools/binman/test/016_pack_image_overflow.dts +0 -0
tools/binman/test/pack/pack_image_size.dts renamed from tools/binman/test/017_pack_image_size.dts +0 -0
tools/binman/test/pack/pack_inv_align.dts renamed from tools/binman/test/012_pack_inv_align.dts +0 -0
tools/binman/test/pack/pack_inv_image_align.dts renamed from tools/binman/test/019_pack_inv_image_align.dts +0 -0
tools/binman/test/pack/pack_inv_image_align_power2.dts renamed from tools/binman/test/020_pack_inv_image_align_power2.dts +0 -0
tools/binman/test/pack/pack_inv_size_align.dts renamed from tools/binman/test/013_pack_inv_size_align.dts +0 -0
tools/binman/test/pack/pack_overflow.dts renamed from tools/binman/test/015_pack_overflow.dts +0 -0
tools/binman/test/pack/pack_overlap.dts renamed from tools/binman/test/014_pack_overlap.dts +0 -0
tools/binman/test/pack/pack_overlap_zero.dts renamed from tools/binman/test/160_pack_overlap_zero.dts +0 -0
tools/binman/test/pack/pack_zero_size.dts renamed from tools/binman/test/025_pack_zero_size.dts +0 -0
tools/binman/test/pack/pad_in_sections.dts renamed from tools/binman/test/166_pad_in_sections.dts +0 -0
tools/binman/test/pack/section_align.dts renamed from tools/binman/test/181_section_align.dts +0 -0
tools/binman/test/pack/section_inner.dts renamed from tools/binman/test/267_section_inner.dts +0 -0
tools/binman/test/pack/section_pad.dts renamed from tools/binman/test/180_section_pad.dts +0 -0
tools/binman/test/pack/sections_offset.dts renamed from tools/binman/test/101_sections_offset.dts +0 -0
tools/binman/test/pack/simple.dts renamed from tools/binman/test/005_simple.dts +0 -0
tools/binman/test/pack/skip_at_start.dts renamed from tools/binman/test/177_skip_at_start.dts +0 -0
tools/binman/test/pack/skip_at_start_pad.dts renamed from tools/binman/test/178_skip_at_start_pad.dts +0 -0
tools/binman/test/pack/skip_at_start_section_pad.dts renamed from tools/binman/test/179_skip_at_start_section_pad.dts +0 -0
tools/binman/test/pack/sorted.dts renamed from tools/binman/test/024_sorted.dts +0 -0
tools/binman/test/pack/unit_address.dts renamed from tools/binman/test/054_unit_address.dts +0 -0
tools/binman/test/pack/uses_pos.dts renamed from tools/binman/test/079_uses_pos.dts +0 -0
Signature · 1 line
2.43.0
Re: [RFC PATCH 01/16] binman: test: Move pack/layout test files to test/pack/
Hi Simon,
Quoted 7 lines · Simon Glass
From: Simon Glass <[email protected]>
Move about 50 test files related to basic layout, packing, alignment, sections, and image structure into a pack/ subdirectory. Drop the numeric prefixes from the filenames and update all references in
ftest.py,entry_test.py, andbinman_tests.rst
Thanks!
Quentin
RFC PATCH 2/16 binman: test: Move U-Boot variant test files to test/xpl/
In reply to Simon GlassFrom: Simon Glass <[email protected]>
Move about a dozen test files for U-Boot image variants (SPL, TPL, VPL, DTB, nodtb, bss-pad) into an xpl/ subdirectory. Drop the numeric prefixes and the redundant u_boot_ filename prefix, and update all references.
---
tools/binman/ftest.py | 28 +++++++++----------
.../test/{036_u_boot_img.dts => xpl/img.dts} | 0
.../pack_dtb.dts} | 0
.../spl_bss_pad.dts} | 0
.../spl_dtb.dts} | 0
.../spl_expand.dts} | 0
.../spl_nodtb.dts} | 0
.../test/{078_u_boot_tpl.dts => xpl/tpl.dts} | 0
.../tpl_bss_pad.dts} | 0
.../tpl_nodtb.dts} | 0
.../test/{255_u_boot_vpl.dts => xpl/vpl.dts} | 0
.../vpl_bss_pad.dts} | 0
.../vpl_nodtb.dts} | 0
13 files changed, 14 insertions(+), 14 deletions(-)
rename tools/binman/test/{036_u_boot_img.dts => xpl/img.dts} (100%)
rename tools/binman/test/{026_pack_u_boot_dtb.dts => xpl/pack_dtb.dts} (100%)
rename tools/binman/test/{047_spl_bss_pad.dts => xpl/spl_bss_pad.dts} (100%)
rename tools/binman/test/{051_u_boot_spl_dtb.dts => xpl/spl_dtb.dts} (100%)
rename tools/binman/test/{285_spl_expand.dts => xpl/spl_expand.dts} (100%)
rename tools/binman/test/{052_u_boot_spl_nodtb.dts => xpl/spl_nodtb.dts} (100%)
rename tools/binman/test/{078_u_boot_tpl.dts => xpl/tpl.dts} (100%)
rename tools/binman/test/{193_tpl_bss_pad.dts => xpl/tpl_bss_pad.dts} (100%)
rename tools/binman/test/{192_u_boot_tpl_nodtb.dts => xpl/tpl_nodtb.dts} (100%)
rename tools/binman/test/{255_u_boot_vpl.dts => xpl/vpl.dts} (100%)
rename tools/binman/test/{258_vpl_bss_pad.dts => xpl/vpl_bss_pad.dts} (100%)
rename tools/binman/test/{256_u_boot_vpl_nodtb.dts => xpl/vpl_nodtb.dts} (100%)tools/binman/ftest.py +14 -14
@@ -1178,7 +1178,7 @@ class TestFunctional(unittest.TestCase): def testPackUbootDtb(self): """Test that a device tree can be added to U-Boot""" - data = self._DoReadFile('026_pack_u_boot_dtb.dts') + data = self._DoReadFile('xpl/pack_dtb.dts') self.assertEqual(U_BOOT_NODTB_DATA + U_BOOT_DTB_DATA, data) def testPackX86RomNoSize(self):
@@ -1362,7 +1362,7 @@ class TestFunctional(unittest.TestCase): def testUBootImg(self): """Test that u-boot.img can be put in a file""" - data = self._DoReadFile('036_u_boot_img.dts') + data = self._DoReadFile('xpl/img.dts') self.assertEqual(U_BOOT_IMG_DATA, data) def testNoMicrocode(self):
@@ -1454,7 +1454,7 @@ class TestFunctional(unittest.TestCase): """Test that we can pad SPL's BSS with zeros""" # ELF file with a '__bss_size' symbol self._SetupSplElf() - data = self._DoReadFile('047_spl_bss_pad.dts') + data = self._DoReadFile('xpl/spl_bss_pad.dts') self.assertEqual(U_BOOT_SPL_DATA + tools.get_bytes(0, 10) + U_BOOT_DATA, data)
@@ -1462,7 +1462,7 @@ class TestFunctional(unittest.TestCase): """Test that a missing symbol is detected""" self._SetupSplElf('u_boot_ucode_ptr') with self.assertRaises(ValueError) as e: - self._DoReadFile('047_spl_bss_pad.dts') + self._DoReadFile('xpl/spl_bss_pad.dts') self.assertIn('Expected __bss_size symbol in spl/u-boot-spl', str(e.exception))
@@ -1514,13 +1514,13 @@ class TestFunctional(unittest.TestCase): def testSplDtb(self): """Test that an image with spl/u-boot-spl.dtb can be created""" self._SetupSplElf() - data = self._DoReadFile('051_u_boot_spl_dtb.dts') + data = self._DoReadFile('xpl/spl_dtb.dts') self.assertEqual(U_BOOT_SPL_DTB_DATA, data[:len(U_BOOT_SPL_DTB_DATA)]) def testSplNoDtb(self): """Test that an image with spl/u-boot-spl-nodtb.bin can be created""" self._SetupSplElf() - data = self._DoReadFile('052_u_boot_spl_nodtb.dts') + data = self._DoReadFile('xpl/spl_nodtb.dts') self.assertEqual(U_BOOT_SPL_NODTB_DATA, data[:len(U_BOOT_SPL_NODTB_DATA)]) def checkSymbols(self, dts, base_data, u_boot_offset, entry_args=None,
@@ -2031,7 +2031,7 @@ class TestFunctional(unittest.TestCase): """Test that an image with TPL and its device tree can be created""" # ELF file with a '__bss_size' symbol self._SetupTplElf() - data = self._DoReadFile('078_u_boot_tpl.dts') + data = self._DoReadFile('xpl/tpl.dts') self.assertEqual(U_BOOT_TPL_DATA + U_BOOT_TPL_DTB_DATA, data) def testUsesPos(self):
@@ -4807,7 +4807,7 @@ class TestFunctional(unittest.TestCase): def testTplNoDtb(self): """Test that an image with tpl/u-boot-tpl-nodtb.bin can be created""" self._SetupTplElf() - data = self._DoReadFile('192_u_boot_tpl_nodtb.dts') + data = self._DoReadFile('xpl/tpl_nodtb.dts') self.assertEqual(U_BOOT_TPL_NODTB_DATA, data[:len(U_BOOT_TPL_NODTB_DATA)])
@@ -4815,7 +4815,7 @@ class TestFunctional(unittest.TestCase): """Test that we can pad TPL's BSS with zeros""" # ELF file with a '__bss_size' symbol self._SetupTplElf() - data = self._DoReadFile('193_tpl_bss_pad.dts') + data = self._DoReadFile('xpl/tpl_bss_pad.dts') self.assertEqual(U_BOOT_TPL_DATA + tools.get_bytes(0, 10) + U_BOOT_DATA, data)
@@ -4823,7 +4823,7 @@ class TestFunctional(unittest.TestCase): """Test that a missing symbol is detected""" self._SetupTplElf('u_boot_ucode_ptr') with self.assertRaises(ValueError) as e: - self._DoReadFile('193_tpl_bss_pad.dts') + self._DoReadFile('xpl/tpl_bss_pad.dts') self.assertIn('Expected __bss_size symbol in tpl/u-boot-tpl', str(e.exception))
@@ -6336,13 +6336,13 @@ fdt fdtmap Extract the devicetree blob from the fdtmap """Test that an image with VPL and its device tree can be created""" # ELF file with a '__bss_size' symbol self._SetupVplElf() - data = self._DoReadFile('255_u_boot_vpl.dts') + data = self._DoReadFile('xpl/vpl.dts') self.assertEqual(U_BOOT_VPL_DATA + U_BOOT_VPL_DTB_DATA, data) def testVplNoDtb(self): """Test that an image with vpl/u-boot-vpl-nodtb.bin can be created""" self._SetupVplElf() - data = self._DoReadFile('256_u_boot_vpl_nodtb.dts') + data = self._DoReadFile('xpl/vpl_nodtb.dts') self.assertEqual(U_BOOT_VPL_NODTB_DATA, data[:len(U_BOOT_VPL_NODTB_DATA)])
@@ -6374,7 +6374,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap """Test that a missing symbol is detected""" self._SetupVplElf('u_boot_ucode_ptr') with self.assertRaises(ValueError) as e: - self._DoReadFile('258_vpl_bss_pad.dts') + self._DoReadFile('xpl/vpl_bss_pad.dts') self.assertIn('Expected __bss_size symbol in vpl/u-boot-vpl', str(e.exception))
@@ -7028,7 +7028,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap 'spl-bss-pad': 'y', 'spl-dtb': 'y', } - data = self._DoReadFileDtb('285_spl_expand.dts', + data = self._DoReadFileDtb('xpl/spl_expand.dts', use_expanded=True, entry_args=entry_args)[0] def testTemplate(self):
tools/binman/test/xpl/img.dts renamed from tools/binman/test/036_u_boot_img.dts +0 -0
tools/binman/test/xpl/pack_dtb.dts renamed from tools/binman/test/026_pack_u_boot_dtb.dts +0 -0
tools/binman/test/xpl/spl_bss_pad.dts renamed from tools/binman/test/047_spl_bss_pad.dts +0 -0
tools/binman/test/xpl/spl_dtb.dts renamed from tools/binman/test/051_u_boot_spl_dtb.dts +0 -0
tools/binman/test/xpl/spl_expand.dts renamed from tools/binman/test/285_spl_expand.dts +0 -0
tools/binman/test/xpl/spl_nodtb.dts renamed from tools/binman/test/052_u_boot_spl_nodtb.dts +0 -0
tools/binman/test/xpl/tpl.dts renamed from tools/binman/test/078_u_boot_tpl.dts +0 -0
tools/binman/test/xpl/tpl_bss_pad.dts renamed from tools/binman/test/193_tpl_bss_pad.dts +0 -0
tools/binman/test/xpl/tpl_nodtb.dts renamed from tools/binman/test/192_u_boot_tpl_nodtb.dts +0 -0
tools/binman/test/xpl/vpl.dts renamed from tools/binman/test/255_u_boot_vpl.dts +0 -0
tools/binman/test/xpl/vpl_bss_pad.dts renamed from tools/binman/test/258_vpl_bss_pad.dts +0 -0
tools/binman/test/xpl/vpl_nodtb.dts renamed from tools/binman/test/256_u_boot_vpl_nodtb.dts +0 -0
Signature · 1 line
2.43.0
Re: [RFC PATCH 02/16] binman: test: Move U-Boot variant test files to test/xpl/
Hi Simon,
Quoted 7 lines · Simon Glass
From: Simon Glass <[email protected]>
Move about a dozen test files for U-Boot image variants (SPL, TPL, VPL, DTB, nodtb, bss-pad) into an xpl/ subdirectory. Drop the numeric prefixes and the redundant
u_boot_filename prefix, and update all references.
Nitpick: for DTS where there's only one property, we could use the name of the property in the file for example. E.g. 256_u_boot_vpl_nodtb.dts to xpl/u-boot-vpl-nodtb.dts. Up to you.
Thanks!
Quentin
RFC PATCH 3/16 binman: test: Move x86 and Intel test files to test/x86/
In reply to Simon GlassFrom: Simon Glass <[email protected]>
Move about 40 test files for x86 and Intel platform support (ROM, microcode, ME, IFWI, FSP, descriptor, reset16, start16, FIT) into an x86/ subdirectory. Drop the numeric prefixes and the redundant x86_ filename prefix, and update all references.
---
tools/binman/fdt_test.py | 2 +-
tools/binman/ftest.py | 84 +++++++++----------
.../descriptor_offset.dts} | 0
.../test/{094_fmap_x86.dts => x86/fmap.dts} | 0
.../fmap_section.dts} | 0
.../{043_intel_cmc.dts => x86/intel_cmc.dts} | 0
.../{147_intel_fit.dts => x86/intel_fit.dts} | 0
.../intel_fit_missing.dts} | 0
.../{042_intel_fsp.dts => x86/intel_fsp.dts} | 0
.../intel_fsp_m.dts} | 0
.../intel_fsp_s.dts} | 0
.../intel_fsp_t.dts} | 0
.../{050_intel_mrc.dts => x86/intel_mrc.dts} | 0
.../intel_refcode.dts} | 0
.../{046_intel_vbt.dts => x86/intel_vbt.dts} | 0
.../{032_intel_vga.dts => x86/intel_vga.dts} | 0
.../no_ucode.dts} | 0
.../optional_ucode.dts} | 0
.../{144_x86_reset16.dts => x86/reset16.dts} | 0
.../reset16_spl.dts} | 0
.../reset16_tpl.dts} | 0
.../test/{029_x86_rom.dts => x86/rom.dts} | 0
.../rom_ifwi.dts} | 0
.../rom_ifwi_nodata.dts} | 0
.../rom_ifwi_nodesc.dts} | 0
.../rom_ifwi_section.dts} | 0
.../{031_x86_rom_me.dts => x86/rom_me.dts} | 0
.../rom_me_empty.dts} | 0
.../rom_me_missing.dts} | 0
.../rom_me_no_desc.dts} | 0
.../single_ucode.dts} | 0
.../{033_x86_start16.dts => x86/start16.dts} | 0
.../start16_spl.dts} | 0
.../start16_tpl.dts} | 0
.../symbols_tpl.dts} | 0
.../tpl_ucode.dts} | 0
.../test/{034_x86_ucode.dts => x86/ucode.dts} | 0
.../ucode_missing_node.dts} | 0
.../ucode_missing_node2.dts} | 0
.../ucode_not_in_image.dts} | 0
.../ucode_spl.dts} | 0
.../ucode_spl_needs_retry.dts} | 0
42 files changed, 43 insertions(+), 43 deletions(-)
rename tools/binman/test/{141_descriptor_offset.dts => x86/descriptor_offset.dts} (100%)
rename tools/binman/test/{094_fmap_x86.dts => x86/fmap.dts} (100%)
rename tools/binman/test/{095_fmap_x86_section.dts => x86/fmap_section.dts} (100%)
rename tools/binman/test/{043_intel_cmc.dts => x86/intel_cmc.dts} (100%)
rename tools/binman/test/{147_intel_fit.dts => x86/intel_fit.dts} (100%)
rename tools/binman/test/{148_intel_fit_missing.dts => x86/intel_fit_missing.dts} (100%)
rename tools/binman/test/{042_intel_fsp.dts => x86/intel_fsp.dts} (100%)
rename tools/binman/test/{152_intel_fsp_m.dts => x86/intel_fsp_m.dts} (100%)
rename tools/binman/test/{153_intel_fsp_s.dts => x86/intel_fsp_s.dts} (100%)
rename tools/binman/test/{154_intel_fsp_t.dts => x86/intel_fsp_t.dts} (100%)
rename tools/binman/test/{050_intel_mrc.dts => x86/intel_mrc.dts} (100%)
rename tools/binman/test/{100_intel_refcode.dts => x86/intel_refcode.dts} (100%)
rename tools/binman/test/{046_intel_vbt.dts => x86/intel_vbt.dts} (100%)
rename tools/binman/test/{032_intel_vga.dts => x86/intel_vga.dts} (100%)
rename tools/binman/test/{037_x86_no_ucode.dts => x86/no_ucode.dts} (100%)
rename tools/binman/test/{044_x86_optional_ucode.dts => x86/optional_ucode.dts} (100%)
rename tools/binman/test/{144_x86_reset16.dts => x86/reset16.dts} (100%)
rename tools/binman/test/{145_x86_reset16_spl.dts => x86/reset16_spl.dts} (100%)
rename tools/binman/test/{146_x86_reset16_tpl.dts => x86/reset16_tpl.dts} (100%)
rename tools/binman/test/{029_x86_rom.dts => x86/rom.dts} (100%)
rename tools/binman/test/{111_x86_rom_ifwi.dts => x86/rom_ifwi.dts} (100%)
rename tools/binman/test/{113_x86_rom_ifwi_nodata.dts => x86/rom_ifwi_nodata.dts} (100%)
rename tools/binman/test/{112_x86_rom_ifwi_nodesc.dts => x86/rom_ifwi_nodesc.dts} (100%)
rename tools/binman/test/{151_x86_rom_ifwi_section.dts => x86/rom_ifwi_section.dts} (100%)
rename tools/binman/test/{031_x86_rom_me.dts => x86/rom_me.dts} (100%)
rename tools/binman/test/{163_x86_rom_me_empty.dts => x86/rom_me_empty.dts} (100%)
rename tools/binman/test/{164_x86_rom_me_missing.dts => x86/rom_me_missing.dts} (100%)
rename tools/binman/test/{030_x86_rom_me_no_desc.dts => x86/rom_me_no_desc.dts} (100%)
rename tools/binman/test/{035_x86_single_ucode.dts => x86/single_ucode.dts} (100%)
rename tools/binman/test/{033_x86_start16.dts => x86/start16.dts} (100%)
rename tools/binman/test/{048_x86_start16_spl.dts => x86/start16_spl.dts} (100%)
rename tools/binman/test/{081_x86_start16_tpl.dts => x86/start16_tpl.dts} (100%)
rename tools/binman/test/{155_symbols_tpl_x86.dts => x86/symbols_tpl.dts} (100%)
rename tools/binman/test/{093_x86_tpl_ucode.dts => x86/tpl_ucode.dts} (100%)
rename tools/binman/test/{034_x86_ucode.dts => x86/ucode.dts} (100%)
rename tools/binman/test/{038_x86_ucode_missing_node.dts => x86/ucode_missing_node.dts} (100%)
rename tools/binman/test/{039_x86_ucode_missing_node2.dts => x86/ucode_missing_node2.dts} (100%)
rename tools/binman/test/{040_x86_ucode_not_in_image.dts => x86/ucode_not_in_image.dts} (100%)
rename tools/binman/test/{049_x86_ucode_spl.dts => x86/ucode_spl.dts} (100%)
rename tools/binman/test/{058_x86_ucode_spl_needs_retry.dts => x86/ucode_spl_needs_retry.dts} (100%)tools/binman/fdt_test.py +1 -1
@@ -36,7 +36,7 @@ class TestFdt(unittest.TestCase): node.DeleteProp('data') def testFdtNormal(self): - fname = self.GetCompiled('034_x86_ucode.dts') + fname = self.GetCompiled('x86/ucode.dts') dt = FdtScan(fname) self._DeleteProp(dt)
tools/binman/ftest.py +42 -42
315 lines not on this page · raw message
tools/binman/test/x86/descriptor_offset.dts renamed from tools/binman/test/141_descriptor_offset.dts +0 -0
tools/binman/test/x86/fmap.dts renamed from tools/binman/test/094_fmap_x86.dts +0 -0
tools/binman/test/x86/fmap_section.dts renamed from tools/binman/test/095_fmap_x86_section.dts +0 -0
tools/binman/test/x86/intel_cmc.dts renamed from tools/binman/test/043_intel_cmc.dts +0 -0
tools/binman/test/x86/intel_fit.dts renamed from tools/binman/test/147_intel_fit.dts +0 -0
tools/binman/test/x86/intel_fit_missing.dts renamed from tools/binman/test/148_intel_fit_missing.dts +0 -0
tools/binman/test/x86/intel_fsp.dts renamed from tools/binman/test/042_intel_fsp.dts +0 -0
tools/binman/test/x86/intel_fsp_m.dts renamed from tools/binman/test/152_intel_fsp_m.dts +0 -0
tools/binman/test/x86/intel_fsp_s.dts renamed from tools/binman/test/153_intel_fsp_s.dts +0 -0
tools/binman/test/x86/intel_fsp_t.dts renamed from tools/binman/test/154_intel_fsp_t.dts +0 -0
tools/binman/test/x86/intel_mrc.dts renamed from tools/binman/test/050_intel_mrc.dts +0 -0
tools/binman/test/x86/intel_refcode.dts renamed from tools/binman/test/100_intel_refcode.dts +0 -0
tools/binman/test/x86/intel_vbt.dts renamed from tools/binman/test/046_intel_vbt.dts +0 -0
tools/binman/test/x86/intel_vga.dts renamed from tools/binman/test/032_intel_vga.dts +0 -0
tools/binman/test/x86/no_ucode.dts renamed from tools/binman/test/037_x86_no_ucode.dts +0 -0
tools/binman/test/x86/optional_ucode.dts renamed from tools/binman/test/044_x86_optional_ucode.dts +0 -0
tools/binman/test/x86/reset16.dts renamed from tools/binman/test/144_x86_reset16.dts +0 -0
tools/binman/test/x86/reset16_spl.dts renamed from tools/binman/test/145_x86_reset16_spl.dts +0 -0
tools/binman/test/x86/reset16_tpl.dts renamed from tools/binman/test/146_x86_reset16_tpl.dts +0 -0
tools/binman/test/x86/rom.dts renamed from tools/binman/test/029_x86_rom.dts +0 -0
tools/binman/test/x86/rom_ifwi.dts renamed from tools/binman/test/111_x86_rom_ifwi.dts +0 -0
tools/binman/test/x86/rom_ifwi_nodata.dts renamed from tools/binman/test/113_x86_rom_ifwi_nodata.dts +0 -0
tools/binman/test/x86/rom_ifwi_nodesc.dts renamed from tools/binman/test/112_x86_rom_ifwi_nodesc.dts +0 -0
tools/binman/test/x86/rom_ifwi_section.dts renamed from tools/binman/test/151_x86_rom_ifwi_section.dts +0 -0
tools/binman/test/x86/rom_me.dts renamed from tools/binman/test/031_x86_rom_me.dts +0 -0
tools/binman/test/x86/rom_me_empty.dts renamed from tools/binman/test/163_x86_rom_me_empty.dts +0 -0
tools/binman/test/x86/rom_me_missing.dts renamed from tools/binman/test/164_x86_rom_me_missing.dts +0 -0
tools/binman/test/x86/rom_me_no_desc.dts renamed from tools/binman/test/030_x86_rom_me_no_desc.dts +0 -0
tools/binman/test/x86/single_ucode.dts renamed from tools/binman/test/035_x86_single_ucode.dts +0 -0
tools/binman/test/x86/start16.dts renamed from tools/binman/test/033_x86_start16.dts +0 -0
tools/binman/test/x86/start16_spl.dts renamed from tools/binman/test/048_x86_start16_spl.dts +0 -0
tools/binman/test/x86/start16_tpl.dts renamed from tools/binman/test/081_x86_start16_tpl.dts +0 -0
tools/binman/test/x86/symbols_tpl.dts renamed from tools/binman/test/155_symbols_tpl_x86.dts +0 -0
tools/binman/test/x86/tpl_ucode.dts renamed from tools/binman/test/093_x86_tpl_ucode.dts +0 -0
tools/binman/test/x86/ucode.dts renamed from tools/binman/test/034_x86_ucode.dts +0 -0
tools/binman/test/x86/ucode_missing_node.dts renamed from tools/binman/test/038_x86_ucode_missing_node.dts +0 -0
tools/binman/test/x86/ucode_missing_node2.dts renamed from tools/binman/test/039_x86_ucode_missing_node2.dts +0 -0
tools/binman/test/x86/ucode_not_in_image.dts renamed from tools/binman/test/040_x86_ucode_not_in_image.dts +0 -0
tools/binman/test/x86/ucode_spl.dts renamed from tools/binman/test/049_x86_ucode_spl.dts +0 -0
tools/binman/test/x86/ucode_spl_needs_retry.dts renamed from tools/binman/test/058_x86_ucode_spl_needs_retry.dts +0 -0
Signature · 1 line
2.43.0
Re: [RFC PATCH 03/16] binman: test: Move x86 and Intel test files to test/x86/
Hi Simon,
Quoted 7 lines · Simon Glass
From: Simon Glass <[email protected]>
Move about 40 test files for x86 and Intel platform support (ROM, microcode, ME, IFWI, FSP, descriptor, reset16, start16, FIT) into an x86/ subdirectory. Drop the numeric prefixes and the redundant
x86_filename prefix, and update all references.
What about moving descriptor.bin to x86/ as well? Ditto for tools/binman/test/fitimage.bin.gz and tools/binman/test/ifwi.bin.gz. Can be in a separate patch.
Same remark as for patch 2 about naming files the same as the single DT node in the test file.
Thanks!
Quentin
RFC PATCH 4/16 binman: test: Move FIT image test files to test/fit/
In reply to Simon GlassFrom: Simon Glass <[email protected]>
Move about 40 test files for FIT images (signing, external data, split-elf, encryption, alignment, firmware loadables, templates) into a fit/ subdirectory. Drop the numeric prefixes and the redundant fit_ filename prefix, and update all references.
Rename the three signature.dts variants to have unique names:signature.dts, signature_multi_key.dts and signature_no_nodes.dts.
---
tools/binman/ftest.py | 118 +++++++++---------
.../test/{275_fit_align.dts => fit/align.dts} | 0
.../{227_fit_bad_dir.dts => fit/bad_dir.dts} | 2 +-
.../bad_dir_config.dts} | 2 +-
.../bad_oper.dts} | 0
.../encrypt_data.dts} | 0
.../encrypt_data_no_key.dts} | 0
.../external.dts} | 0
.../extract_replace.dts} | 0
.../test/{170_fit_fdt.dts => fit/fdt.dts} | 0
.../fdt_compat.dts} | 0
.../{333_fit_fdt_dir.dts => fit/fdt_dir.dts} | 0
.../fdt_list.dts} | 0
.../fdt_missing_prop.dts} | 0
.../fdt_name.dts} | 0
.../fdt_oper.dts} | 0
.../fdt_phase.dts} | 0
.../firmware_loadables.dts} | 0
.../binman/test/{161_fit.dts => fit/fit.dts} | 0
.../{219_fit_gennode.dts => fit/gennode.dts} | 0
.../image_subentry_alignment.dts} | 0
.../key_name_hint_dir_signature.dts} | 0
.../missing_blob.dts} | 0
.../replace_sibling.dts} | 0
.../test/{280_fit_sign.dts => fit/sign.dts} | 0
.../signature.dts} | 0
.../signature_engine.dts} | 0
.../signature_engine_encrypt.dts} | 0
.../signature_engine_pkcs11.dts} | 0
.../signature_engine_pkcs11_object.dts} | 0
.../signature_multi_key.dts} | 0
.../signature_no_nodes.dts} | 0
.../split_elf.dts} | 0
.../subentry_bintool.dts} | 0
.../subentry_hash.dts} | 0
.../tee_os_opt.dts} | 0
.../tee_os_opt_bad.dts} | 0
.../template.dts} | 0
38 files changed, 61 insertions(+), 61 deletions(-)
rename tools/binman/test/{275_fit_align.dts => fit/align.dts} (100%)
rename tools/binman/test/{227_fit_bad_dir.dts => fit/bad_dir.dts} (71%)
rename tools/binman/test/{228_fit_bad_dir_config.dts => fit/bad_dir_config.dts} (71%)
rename tools/binman/test/{224_fit_bad_oper.dts => fit/bad_oper.dts} (100%)
rename tools/binman/test/{343_fit_encrypt_data.dts => fit/encrypt_data.dts} (100%)
rename tools/binman/test/{344_fit_encrypt_data_no_key.dts => fit/encrypt_data_no_key.dts} (100%)
rename tools/binman/test/{162_fit_external.dts => fit/external.dts} (100%)
rename tools/binman/test/{240_fit_extract_replace.dts => fit/extract_replace.dts} (100%)
rename tools/binman/test/{170_fit_fdt.dts => fit/fdt.dts} (100%)
rename tools/binman/test/{334_fit_fdt_compat.dts => fit/fdt_compat.dts} (100%)
rename tools/binman/test/{333_fit_fdt_dir.dts => fit/fdt_dir.dts} (100%)
rename tools/binman/test/{284_fit_fdt_list.dts => fit/fdt_list.dts} (100%)
rename tools/binman/test/{171_fit_fdt_missing_prop.dts => fit/fdt_missing_prop.dts} (100%)
rename tools/binman/test/{345_fit_fdt_name.dts => fit/fdt_name.dts} (100%)
rename tools/binman/test/{223_fit_fdt_oper.dts => fit/fdt_oper.dts} (100%)
rename tools/binman/test/{335_fit_fdt_phase.dts => fit/fdt_phase.dts} (100%)
rename tools/binman/test/{276_fit_firmware_loadables.dts => fit/firmware_loadables.dts} (100%)
rename tools/binman/test/{161_fit.dts => fit/fit.dts} (100%)
rename tools/binman/test/{219_fit_gennode.dts => fit/gennode.dts} (100%)
rename tools/binman/test/{167_fit_image_subentry_alignment.dts => fit/image_subentry_alignment.dts} (100%)
rename tools/binman/test/{355_key_name_hint_dir_fit_signature.dts => fit/key_name_hint_dir_signature.dts} (100%)
rename tools/binman/test/{168_fit_missing_blob.dts => fit/missing_blob.dts} (100%)
rename tools/binman/test/{277_replace_fit_sibling.dts => fit/replace_sibling.dts} (100%)
rename tools/binman/test/{280_fit_sign.dts => fit/sign.dts} (100%)
rename tools/binman/test/{340_fit_signature.dts => fit/signature.dts} (100%)
rename tools/binman/test/{360_fit_signature_engine.dts => fit/signature_engine.dts} (100%)
rename tools/binman/test/{361_fit_signature_engine_encrypt.dts => fit/signature_engine_encrypt.dts} (100%)
rename tools/binman/test/{362_fit_signature_engine_pkcs11.dts => fit/signature_engine_pkcs11.dts} (100%)
rename tools/binman/test/{363_fit_signature_engine_pkcs11_object.dts => fit/signature_engine_pkcs11_object.dts} (100%)
rename tools/binman/test/{341_fit_signature.dts => fit/signature_multi_key.dts} (100%)
rename tools/binman/test/{342_fit_signature.dts => fit/signature_no_nodes.dts} (100%)
rename tools/binman/test/{226_fit_split_elf.dts => fit/split_elf.dts} (100%)
rename tools/binman/test/{220_fit_subentry_bintool.dts => fit/subentry_bintool.dts} (100%)
rename tools/binman/test/{221_fit_subentry_hash.dts => fit/subentry_hash.dts} (100%)
rename tools/binman/test/{264_tee_os_opt_fit.dts => fit/tee_os_opt.dts} (100%)
rename tools/binman/test/{265_tee_os_opt_fit_bad.dts => fit/tee_os_opt_bad.dts} (100%)
rename tools/binman/test/{288_template_fit.dts => fit/template.dts} (100%)tools/binman/ftest.py +59 -59
@@ -3991,7 +3991,7 @@ class TestFunctional(unittest.TestCase): def testSimpleFit(self): """Test an image with a FIT inside""" self._SetupSplElf() - data = self._DoReadFile('161_fit.dts') + data = self._DoReadFile('fit/fit.dts') self.assertEqual(U_BOOT_DATA, data[:len(U_BOOT_DATA)]) self.assertEqual(U_BOOT_NODTB_DATA, data[-len(U_BOOT_NODTB_DATA):]) fit_data = data[len(U_BOOT_DATA):-len(U_BOOT_NODTB_DATA)]
@@ -4000,7 +4000,7 @@ class TestFunctional(unittest.TestCase): def testSimpleFitExpandsSubentries(self): """Test that FIT images expand their subentries""" - data = self._DoReadFileDtb('161_fit.dts', use_expanded=True)[0] + data = self._DoReadFileDtb('fit/fit.dts', use_expanded=True)[0] self.assertEqual(U_BOOT_EXP_DATA, data[:len(U_BOOT_EXP_DATA)]) self.assertEqual(U_BOOT_NODTB_DATA, data[-len(U_BOOT_NODTB_DATA):]) fit_data = data[len(U_BOOT_EXP_DATA):-len(U_BOOT_NODTB_DATA)]
@@ -4009,7 +4009,7 @@ class TestFunctional(unittest.TestCase): def testSimpleFitImagePos(self): """Test that we have correct image-pos for FIT subentries""" - data, _, _, out_dtb_fname = self._DoReadFileDtb('161_fit.dts', + data, _, _, out_dtb_fname = self._DoReadFileDtb('fit/fit.dts', update_dtb=True) dtb = fdt.Fdt(out_dtb_fname) dtb.Scan()
@@ -4066,7 +4066,7 @@ class TestFunctional(unittest.TestCase): def testFitExternal(self): """Test an image with an FIT with external images""" - data = self._DoReadFile('162_fit_external.dts') + data = self._DoReadFile('fit/external.dts') fit_data = data[len(U_BOOT_DATA):-2] # _testing is 2 bytes # Size of the external-data region as set up by mkimage
@@ -4094,7 +4094,7 @@ class TestFunctional(unittest.TestCase): def testFitExternalImagePos(self): """Test that we have correct image-pos for external FIT subentries""" - data, _, _, out_dtb_fname = self._DoReadFileDtb('162_fit_external.dts', + data, _, _, out_dtb_fname = self._DoReadFileDtb('fit/external.dts', update_dtb=True) dtb = fdt.Fdt(out_dtb_fname) dtb.Scan()
@@ -4151,7 +4151,7 @@ class TestFunctional(unittest.TestCase): def testFitMissing(self): """Test that binman complains if mkimage is missing""" with self.assertRaises(ValueError) as e: - self._DoTestFile('162_fit_external.dts', + self._DoTestFile('fit/external.dts', force_missing_bintools='mkimage') self.assertIn("Node '/binman/fit': Missing tool: 'mkimage'", str(e.exception))
@@ -4159,7 +4159,7 @@ class TestFunctional(unittest.TestCase): def testFitMissingOK(self): """Test that binman still produces a FIT image if mkimage is missing""" with terminal.capture() as (_, stderr): - self._DoTestFile('162_fit_external.dts', allow_missing=True, + self._DoTestFile('fit/external.dts', allow_missing=True, force_missing_bintools='mkimage') err = stderr.getvalue() self.assertRegex(err, "Image 'image'.*missing bintools.*: mkimage")
@@ -4211,7 +4211,7 @@ class TestFunctional(unittest.TestCase): entry_args = { 'test-id': TEXT_DATA, } - data, _, _, _ = self._DoReadFileDtb('167_fit_image_subentry_alignment.dts', + data, _, _, _ = self._DoReadFileDtb('fit/image_subentry_alignment.dts', entry_args=entry_args) dtb = fdt.Fdt.FromData(data) dtb.Scan()
@@ -4233,7 +4233,7 @@ class TestFunctional(unittest.TestCase): def testFitExtblobMissingOk(self): """Test a FIT with a missing external blob that is allowed""" with terminal.capture() as (stdout, stderr): - self._DoTestFile('168_fit_missing_blob.dts', + self._DoTestFile('fit/missing_blob.dts', allow_missing=True) err = stderr.getvalue() self.assertRegex(err, "Image 'image'.*missing.*: atf-bl31")
@@ -4255,7 +4255,7 @@ class TestFunctional(unittest.TestCase): data = self._DoReadFile('172_scp.dts') self.assertEqual(SCP_DATA, data[:len(SCP_DATA)]) - def CheckFitFdt(self, dts='170_fit_fdt.dts', use_fdt_list=True, + def CheckFitFdt(self, dts='fit/fdt.dts', use_fdt_list=True, default_dt=None, use_seq_num=True): """Check an image with an FIT with multiple FDT images""" def _CheckFdt(val, expected_data):
@@ -4351,7 +4351,7 @@ class TestFunctional(unittest.TestCase): def testFitFdtMissingList(self): """Test handling of a missing 'of-list' entry arg""" with self.assertRaises(ValueError) as e: - self._DoReadFile('170_fit_fdt.dts') + self._DoReadFile('fit/fdt.dts') self.assertIn("Generator node requires 'of-list' entry argument", str(e.exception))
@@ -4360,12 +4360,12 @@ class TestFunctional(unittest.TestCase): entry_args = { 'of-list': '', } - data = self._DoReadFileDtb('170_fit_fdt.dts', entry_args=entry_args)[0] + data = self._DoReadFileDtb('fit/fdt.dts', entry_args=entry_args)[0] def testFitFdtMissingProp(self): """Test handling of a missing 'fit,fdt-list' property""" with self.assertRaises(ValueError) as e: - self._DoReadFile('171_fit_fdt_missing_prop.dts') + self._DoReadFile('fit/fdt_missing_prop.dts') self.assertIn("Generator node requires 'fit,fdt-list' property", str(e.exception))
@@ -4376,7 +4376,7 @@ class TestFunctional(unittest.TestCase): } with self.assertRaises(ValueError) as e: self._DoReadFileDtb( - '170_fit_fdt.dts', + 'fit/fdt.dts', entry_args=entry_args, extra_indirs=[os.path.join(self._indir, TEST_FDT_SUBDIR)])[0] self.assertIn("Generated 'default' node requires default-dt entry argument",
@@ -4390,7 +4390,7 @@ class TestFunctional(unittest.TestCase): } with self.assertRaises(ValueError) as e: self._DoReadFileDtb( - '170_fit_fdt.dts', + 'fit/fdt.dts', entry_args=entry_args, extra_indirs=[os.path.join(self._indir, TEST_FDT_SUBDIR)])[0] self.assertIn("default-dt entry argument 'test-fdt3' not found in fdt list: test-fdt1, test-fdt2",
@@ -4402,7 +4402,7 @@ class TestFunctional(unittest.TestCase): control.missing_blob_help['wibble'] = 'Wibble test' control.missing_blob_help['another'] = 'Another test' with terminal.capture() as (stdout, stderr): - self._DoTestFile('168_fit_missing_blob.dts', + self._DoTestFile('fit/missing_blob.dts', allow_missing=True) err = stderr.getvalue()
@@ -5507,7 +5507,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap 'of-list': 'test-fdt1 test-fdt2', } data = self._DoReadFileDtb( - '219_fit_gennode.dts', + 'fit/gennode.dts', entry_args=entry_args, use_real_dtb=True, extra_indirs=[os.path.join(self._indir, TEST_FDT_SUBDIR)])
@@ -5528,7 +5528,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap 'keydir': 'devkeys', 'bmpblk': 'bmpblk.bin', } - data, _, _, _ = self._DoReadFileDtb('220_fit_subentry_bintool.dts', + data, _, _, _ = self._DoReadFileDtb('fit/subentry_bintool.dts', entry_args=entry_args) expected = (GBB_DATA + GBB_DATA + tools.get_bytes(0, 8) +
@@ -5541,7 +5541,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap 'keydir': 'devkeys', } with terminal.capture() as (_, stderr): - self._DoTestFile('220_fit_subentry_bintool.dts', + self._DoTestFile('fit/subentry_bintool.dts', force_missing_bintools='futility', entry_args=entry_args) err = stderr.getvalue() self.assertRegex(err, "Image 'image'.*missing bintools.*: futility")
@@ -5550,7 +5550,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap """Test an image with a FIT inside""" self._SetupSplElf() data, _, _, out_dtb_name = self._DoReadFileDtb( - '221_fit_subentry_hash.dts', use_real_dtb=True, update_dtb=True) + 'fit/subentry_hash.dts', use_real_dtb=True, update_dtb=True) mkimage_dtb = fdt.Fdt.FromData(data) mkimage_dtb.Scan()
@@ -5604,14 +5604,14 @@ fdt fdtmap Extract the devicetree blob from the fdtmap 'default-dt': 'test-fdt2', } self._DoReadFileDtb( - '223_fit_fdt_oper.dts', + 'fit/fdt_oper.dts', entry_args=entry_args, extra_indirs=[os.path.join(self._indir, TEST_FDT_SUBDIR)])[0] def testFitFdtBadOper(self): """Check handling of an FDT map when the section cannot be found""" with self.assertRaises(ValueError) as exc: - self._DoReadFileDtb('224_fit_bad_oper.dts') + self._DoReadFileDtb('fit/bad_oper.dts') self.assertIn("Node '/binman/fit': subnode 'images/@fdt-SEQ': Unknown operation 'unknown'", str(exc.exception))
@@ -5635,7 +5635,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap } test_subdir = os.path.join(self._indir, TEST_FDT_SUBDIR) data = self._DoReadFileDtb( - '226_fit_split_elf.dts', + 'fit/split_elf.dts', entry_args=entry_args, extra_indirs=[test_subdir])[0]
@@ -5728,7 +5728,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap test_subdir = os.path.join(self._indir, TEST_FDT_SUBDIR) with self.assertRaises(ValueError) as exc: self._DoReadFileDtb( - '226_fit_split_elf.dts', + 'fit/split_elf.dts', entry_args=entry_args, extra_indirs=[test_subdir])[0] self.assertIn(
@@ -5755,7 +5755,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap test_subdir = os.path.join(self._indir, TEST_FDT_SUBDIR) with terminal.capture() as (stdout, stderr): self._DoTestFile( - '226_fit_split_elf.dts', entry_args=entry_args, + 'fit/split_elf.dts', entry_args=entry_args, extra_indirs=[test_subdir], verbosity=3, **kwargs) out = stdout.getvalue() err = stderr.getvalue()
@@ -5765,7 +5765,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap """Test a FIT split-elf invalid fit,xxx directive in an image node""" if not elf.ELF_TOOLS: self.skipTest('Python elftools not available') - err = self._check_bad_fit('227_fit_bad_dir.dts') + err = self._check_bad_fit('fit/bad_dir.dts') self.assertIn( "Node '/binman/fit': subnode 'images/@atf-SEQ': Unknown directive 'fit,something'", err)
@@ -5774,7 +5774,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap """Test a FIT split-elf with invalid fit,xxx directive in config""" if not elf.ELF_TOOLS: self.skipTest('Python elftools not available') - err = self._check_bad_fit('228_fit_bad_dir_config.dts') + err = self._check_bad_fit('fit/bad_dir_config.dts') self.assertEqual( "Node '/binman/fit': subnode 'configurations/@config-SEQ': Unknown directive 'fit,config'", err)
@@ -5986,7 +5986,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testExtractFit(self): """Test extracting a FIT section""" - self._DoReadFileRealDtb('240_fit_extract_replace.dts') + self._DoReadFileRealDtb('fit/extract_replace.dts') image_fname = tools.get_output_filename('image.bin') fit_data = control.ReadEntry(image_fname, 'fit')
@@ -6005,7 +6005,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testExtractFitSubentries(self): """Test extracting FIT section subentries""" - self._DoReadFileRealDtb('240_fit_extract_replace.dts') + self._DoReadFileRealDtb('fit/extract_replace.dts') image_fname = tools.get_output_filename('image.bin') for entry_path, expected in [
@@ -6024,7 +6024,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap new_data = b'x' * len(U_BOOT_DATA) data, expected_fdtmap, _ = self._RunReplaceCmd( 'fit/kernel/u-boot', new_data, - dts='240_fit_extract_replace.dts') + dts='fit/extract_replace.dts') self.assertEqual(new_data, data) path, fdtmap = state.GetFdtContents('fdtmap')
@@ -6036,7 +6036,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap new_data = b'ub' * len(U_BOOT_NODTB_DATA) data, expected_fdtmap, _ = self._RunReplaceCmd( 'fit/fdt-1/u-boot-nodtb', new_data, - dts='240_fit_extract_replace.dts') + dts='fit/extract_replace.dts') self.assertEqual(new_data, data) # Will be repacked, so fdtmap must change
@@ -6050,7 +6050,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap expected = new_data.ljust(len(U_BOOT_NODTB_DATA), b'\0') data, expected_fdtmap, _ = self._RunReplaceCmd( 'fit/fdt-1/u-boot-nodtb', new_data, - dts='240_fit_extract_replace.dts') + dts='fit/extract_replace.dts') self.assertEqual(expected, data) path, fdtmap = state.GetFdtContents('fdtmap')
@@ -6510,7 +6510,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testFitTeeOsOptionalFit(self): """Test an image with a FIT with an optional OP-TEE binary""" - data = self.checkFitTee('264_tee_os_opt_fit.dts', 'tee.bin') + data = self.checkFitTee('fit/tee_os_opt.dts', 'tee.bin') # There should be only one node, holding the data set up in SetUpClass() # for tee.bin
@@ -6524,7 +6524,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap self.assertEqual(U_BOOT_DATA, node.props['data'].bytes) with terminal.capture() as (stdout, stderr): - self.checkFitTee('264_tee_os_opt_fit.dts', '') + self.checkFitTee('fit/tee_os_opt.dts', '') err = stderr.getvalue() self.assertRegex( err,
@@ -6536,7 +6536,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testFitTeeOsOptionalFitBad(self): """Test an image with a FIT with an optional OP-TEE binary""" with self.assertRaises(ValueError) as exc: - self.checkFitTee('265_tee_os_opt_fit_bad.dts', 'tee.bin') + self.checkFitTee('fit/tee_os_opt_bad.dts', 'tee.bin') self.assertIn( "Node '/binman/fit': subnode 'images/@tee-SEQ': Failed to read ELF file: Magic number does not match", str(exc.exception))
@@ -6545,14 +6545,14 @@ fdt fdtmap Extract the devicetree blob from the fdtmap """Test an OP-TEE binary with wrong formats""" self.make_tee_bin('tee.bad1', 123) with self.assertRaises(ValueError) as exc: - self.checkFitTee('264_tee_os_opt_fit.dts', 'tee.bad1') + self.checkFitTee('fit/tee_os_opt.dts', 'tee.bad1') self.assertIn( "Node '/binman/fit/images/@tee-SEQ/tee-os': OP-TEE paged mode not supported", str(exc.exception)) self.make_tee_bin('tee.bad2', 0, b'extra data') with self.assertRaises(ValueError) as exc: - self.checkFitTee('264_tee_os_opt_fit.dts', 'tee.bad2') + self.checkFitTee('fit/tee_os_opt.dts', 'tee.bad2') self.assertIn( "Node '/binman/fit/images/@tee-SEQ/tee-os': Invalid OP-TEE file: size mismatch (expected 0x4, have 0xe)", str(exc.exception))
@@ -6701,7 +6701,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testFitAlign(self): """Test an image with an FIT with aligned external data""" - data = self._DoReadFile('275_fit_align.dts') + data = self._DoReadFile('fit/align.dts') self.assertEqual(4096, len(data)) dtb = fdt.Fdt.FromData(data)
@@ -6728,7 +6728,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap test_subdir = os.path.join(self._indir, TEST_FDT_SUBDIR) with terminal.capture() as (stdout, stderr): data = self._DoReadFileDtb( - '276_fit_firmware_loadables.dts', + 'fit/firmware_loadables.dts', entry_args=entry_args, extra_indirs=[test_subdir])[0]
@@ -6838,7 +6838,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap """Test an image with a FIT inside where we replace its sibling""" self._SetupSplElf() fname = TestFunctional._MakeInputFile('once', b'available once') - self._DoReadFileRealDtb('277_replace_fit_sibling.dts') + self._DoReadFileRealDtb('fit/replace_sibling.dts') os.remove(fname) try:
@@ -6899,7 +6899,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap self._DoTestFile('292_mkimage_missing_multiple.dts', allow_missing=False) self.assertIn("not found in input path", str(e.exception)) - def _PrepareSignEnv(self, dts='280_fit_sign.dts'): + def _PrepareSignEnv(self, dts='fit/sign.dts'): """Prepare sign environment Create private and public keys, add pubkey into dtb.
@@ -7013,7 +7013,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap 'default-dt': 'test-fdt2', } data = self._DoReadFileDtb( - '284_fit_fdt_list.dts', + 'fit/fdt_list.dts', entry_args=entry_args, extra_indirs=[os.path.join(self._indir, TEST_FDT_SUBDIR)])[0] self.assertEqual(U_BOOT_NODTB_DATA, data[-len(U_BOOT_NODTB_DATA):])
@@ -7069,7 +7069,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testTemplateFit(self): """Test using a template in a FIT""" - fit_data = self._DoReadFile('288_template_fit.dts') + fit_data = self._DoReadFile('fit/template.dts') fname = os.path.join(self._indir, 'fit_data.fit') tools.write_file(fname, fit_data) out = tools.run('dumpimage', '-l', fname)
@@ -7776,7 +7776,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap old_dir = os.getcwd() try: os.chdir(self._indir) - self.CheckFitFdt('333_fit_fdt_dir.dts', False) + self.CheckFitFdt('fit/fdt_dir.dts', False) finally: os.chdir(old_dir)
@@ -7785,7 +7785,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap old_dir = os.getcwd() try: os.chdir(self._indir) - self.CheckFitFdt('333_fit_fdt_dir.dts', False, + self.CheckFitFdt('fit/fdt_dir.dts', False, default_dt='rockchip/test-fdt2') finally: os.chdir(old_dir)
@@ -7798,7 +7798,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap } testdir, dtb_list = self.SetupAlternateDts() data = self._DoReadFileDtb( - '334_fit_fdt_compat.dts', use_real_dtb=True, update_dtb=True, + 'fit/fdt_compat.dts', use_real_dtb=True, update_dtb=True, entry_args=entry_args, extra_indirs=[testdir])[0] fit_data = data[len(U_BOOT_DATA):-len(U_BOOT_NODTB_DATA)]
@@ -7831,7 +7831,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap } testdir, dtb_list = self.SetupAlternateDts() data = self._DoReadFileDtb( - '335_fit_fdt_phase.dts', use_real_dtb=True, update_dtb=True, + 'fit/fdt_phase.dts', use_real_dtb=True, update_dtb=True, entry_args=entry_args, extra_indirs=[testdir])[0] fit_data = data[len(U_BOOT_DATA):-len(U_BOOT_NODTB_DATA)] fit = fdt.Fdt.FromData(fit_data)
@@ -8039,7 +8039,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap test_subdir = os.path.join(self._indir, TEST_FDT_SUBDIR) keys_subdir = os.path.join(self._indir, "keys") data = self._DoReadFileDtb( - '340_fit_signature.dts', + 'fit/signature.dts', entry_args=entry_args, extra_indirs=[test_subdir, keys_subdir])[0]
@@ -8080,7 +8080,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap with unittest.mock.patch.dict('os.environ', {'OPENSSL_ENGINES': ossl_engines_path}): data = self._DoReadFileDtb( - '360_fit_signature_engine.dts', + 'fit/signature_engine.dts', entry_args=entry_args, extra_indirs=[test_subdir])[0]
@@ -8121,7 +8121,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap with self.assertRaises(ValueError) as e: self._DoReadFileDtb( - '361_fit_signature_engine_encrypt.dts', + 'fit/signature_engine_encrypt.dts', entry_args=entry_args, extra_indirs=[test_subdir])
@@ -8181,7 +8181,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap {'OPENSSL_CONF': ossl_conf, 'SOFTHSM2_CONF': softhsm2_conf}): data = self._DoReadFileDtb( - '362_fit_signature_engine_pkcs11.dts', + 'fit/signature_engine_pkcs11.dts', entry_args=entry_args, extra_indirs=[test_subdir])[0]
@@ -8259,7 +8259,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap 'SOFTHSM2_CONF': softhsm2_conf, 'MKIMAGE_SIGN_PIN': '1234'}): data = self._DoReadFileDtb( - '363_fit_signature_engine_pkcs11_object.dts', + 'fit/signature_engine_pkcs11_object.dts', entry_args=entry_args, extra_indirs=[test_subdir])[0]
@@ -8294,7 +8294,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap test_subdir = os.path.join(self._indir, TEST_FDT_SUBDIR) with self.assertRaises(ValueError) as e: self._DoReadFileDtb( - '340_fit_signature.dts', + 'fit/signature.dts', entry_args=entry_args, extra_indirs=[test_subdir])[0] self.assertIn(
@@ -8320,7 +8320,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap keys_subdir2 = os.path.join(self._indir, "keys2") with self.assertRaises(ValueError) as e: self._DoReadFileDtb( - '341_fit_signature.dts', + 'fit/signature_multi_key.dts', entry_args=entry_args, extra_indirs=[test_subdir, keys_subdir1, keys_subdir2])[0] self.assertIn(
@@ -8338,7 +8338,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap } test_subdir = os.path.join(self._indir, TEST_FDT_SUBDIR) self._DoReadFileDtb( - '342_fit_signature.dts', + 'fit/signature_no_nodes.dts', entry_args=entry_args, extra_indirs=[test_subdir])[0]
@@ -8354,7 +8354,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap test_subdir = os.path.join(self._indir, TEST_FDT_SUBDIR) with self.assertRaises(ValueError) as e: self._DoReadFileDtb( - '355_key_name_hint_dir_fit_signature.dts', + 'fit/key_name_hint_dir_signature.dts', entry_args=entry_args, extra_indirs=[test_subdir]) self.assertIn(
@@ -8368,7 +8368,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap keys_subdir = os.path.join(self._indir, "keys") data = self._DoReadFileDtb( - '343_fit_encrypt_data.dts', + 'fit/encrypt_data.dts', extra_indirs=[keys_subdir])[0] fit = fdt.Fdt.FromData(data)
@@ -8402,13 +8402,13 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testSimpleFitEncryptedDataMissingKey(self): """Test an image with a FIT containing data to be encrypted but with a missing key""" with self.assertRaises(ValueError) as e: - self._DoReadFile('344_fit_encrypt_data_no_key.dts') + self._DoReadFile('fit/encrypt_data_no_key.dts') self.assertIn("Filename 'aes256.bin' not found in input path", str(e.exception)) def testFitFdtName(self): """Test an image with an FIT with multiple FDT images using NAME""" - self.CheckFitFdt('345_fit_fdt_name.dts', use_seq_num=False) + self.CheckFitFdt('fit/fdt_name.dts', use_seq_num=False) def testRemoveTemplate(self): """Test whether template is removed"""
tools/binman/test/fit/align.dts renamed from tools/binman/test/275_fit_align.dts +0 -0
tools/binman/test/fit/bad_dir.dts renamed from tools/binman/test/227_fit_bad_dir.dts +1 -1
@@ -2,7 +2,7 @@ /dts-v1/; -#include "226_fit_split_elf.dts" +#include "split_elf.dts" &atf { fit,something = "bad";
tools/binman/test/fit/bad_dir_config.dts renamed from tools/binman/test/228_fit_bad_dir_config.dts +1 -1
@@ -2,7 +2,7 @@ /dts-v1/; -#include "226_fit_split_elf.dts" +#include "split_elf.dts" &config { fit,config = "bad";
tools/binman/test/fit/bad_oper.dts renamed from tools/binman/test/224_fit_bad_oper.dts +0 -0
tools/binman/test/fit/encrypt_data.dts renamed from tools/binman/test/343_fit_encrypt_data.dts +0 -0
tools/binman/test/fit/encrypt_data_no_key.dts renamed from tools/binman/test/344_fit_encrypt_data_no_key.dts +0 -0
tools/binman/test/fit/external.dts renamed from tools/binman/test/162_fit_external.dts +0 -0
tools/binman/test/fit/extract_replace.dts renamed from tools/binman/test/240_fit_extract_replace.dts +0 -0
tools/binman/test/fit/fdt.dts renamed from tools/binman/test/170_fit_fdt.dts +0 -0
tools/binman/test/fit/fdt_compat.dts renamed from tools/binman/test/334_fit_fdt_compat.dts +0 -0
tools/binman/test/fit/fdt_dir.dts renamed from tools/binman/test/333_fit_fdt_dir.dts +0 -0
tools/binman/test/fit/fdt_list.dts renamed from tools/binman/test/284_fit_fdt_list.dts +0 -0
tools/binman/test/fit/fdt_missing_prop.dts renamed from tools/binman/test/171_fit_fdt_missing_prop.dts +0 -0
tools/binman/test/fit/fdt_name.dts renamed from tools/binman/test/345_fit_fdt_name.dts +0 -0
tools/binman/test/fit/fdt_oper.dts renamed from tools/binman/test/223_fit_fdt_oper.dts +0 -0
tools/binman/test/fit/fdt_phase.dts renamed from tools/binman/test/335_fit_fdt_phase.dts +0 -0
tools/binman/test/fit/firmware_loadables.dts renamed from tools/binman/test/276_fit_firmware_loadables.dts +0 -0
tools/binman/test/fit/fit.dts renamed from tools/binman/test/161_fit.dts +0 -0
tools/binman/test/fit/gennode.dts renamed from tools/binman/test/219_fit_gennode.dts +0 -0
tools/binman/test/fit/image_subentry_alignment.dts renamed from tools/binman/test/167_fit_image_subentry_alignment.dts +0 -0
tools/binman/test/fit/key_name_hint_dir_signature.dts renamed from tools/binman/test/355_key_name_hint_dir_fit_signature.dts +0 -0
tools/binman/test/fit/missing_blob.dts renamed from tools/binman/test/168_fit_missing_blob.dts +0 -0
tools/binman/test/fit/replace_sibling.dts renamed from tools/binman/test/277_replace_fit_sibling.dts +0 -0
tools/binman/test/fit/sign.dts renamed from tools/binman/test/280_fit_sign.dts +0 -0
tools/binman/test/fit/signature.dts renamed from tools/binman/test/340_fit_signature.dts +0 -0
tools/binman/test/fit/signature_engine.dts renamed from tools/binman/test/360_fit_signature_engine.dts +0 -0
tools/binman/test/fit/signature_engine_encrypt.dts renamed from tools/binman/test/361_fit_signature_engine_encrypt.dts +0 -0
tools/binman/test/fit/signature_engine_pkcs11.dts renamed from tools/binman/test/362_fit_signature_engine_pkcs11.dts +0 -0
tools/binman/test/fit/signature_engine_pkcs11_object.dts renamed from tools/binman/test/363_fit_signature_engine_pkcs11_object.dts +0 -0
tools/binman/test/fit/signature_multi_key.dts renamed from tools/binman/test/341_fit_signature.dts +0 -0
tools/binman/test/fit/signature_no_nodes.dts renamed from tools/binman/test/342_fit_signature.dts +0 -0
tools/binman/test/fit/split_elf.dts renamed from tools/binman/test/226_fit_split_elf.dts +0 -0
tools/binman/test/fit/subentry_bintool.dts renamed from tools/binman/test/220_fit_subentry_bintool.dts +0 -0
tools/binman/test/fit/subentry_hash.dts renamed from tools/binman/test/221_fit_subentry_hash.dts +0 -0
tools/binman/test/fit/tee_os_opt.dts renamed from tools/binman/test/264_tee_os_opt_fit.dts +0 -0
tools/binman/test/fit/tee_os_opt_bad.dts renamed from tools/binman/test/265_tee_os_opt_fit_bad.dts +0 -0
tools/binman/test/fit/template.dts renamed from tools/binman/test/288_template_fit.dts +0 -0
Signature · 1 line
2.43.0
Re: [RFC PATCH 04/16] binman: test: Move FIT image test files to test/fit/
Hi Simon,
Quoted 10 lines · Simon Glass
From: Simon Glass <[email protected]>
Move about 40 test files for FIT images (signing, external data, split-elf, encryption, alignment, firmware loadables, templates) into a fit/ subdirectory. Drop the numeric prefixes and the redundant
fit_filename prefix, and update all references.Rename the three
signature.dtsvariants to have unique names:signature.dts,signature_multi_key.dtsandsignature_no_nodes.dts.
What about aes256.bin, 340_rsa2048.key, dummy-rsa-engine.c, 340_dummy-rsa4096.crt, 340_openssl.conf, 340_softhsm2.conf, and dev.key?
Can be done in a separate patch.
Quoted 55 lines
Signed-off-by Simon Glass <[email protected]>---
tools/binman/ftest.py | 118 +++++++++--------- .../test/{275_fit_align.dts => fit/align.dts} | 0 .../{227_fit_bad_dir.dts => fit/bad_dir.dts} | 2 +- .../bad_dir_config.dts} | 2 +- .../bad_oper.dts} | 0 .../encrypt_data.dts} | 0 .../encrypt_data_no_key.dts} | 0 .../external.dts} | 0 .../extract_replace.dts} | 0 .../test/{170_fit_fdt.dts => fit/fdt.dts} | 0 .../fdt_compat.dts} | 0 .../{333_fit_fdt_dir.dts => fit/fdt_dir.dts} | 0 .../fdt_list.dts} | 0 .../fdt_missing_prop.dts} | 0 .../fdt_name.dts} | 0 .../fdt_oper.dts} | 0 .../fdt_phase.dts} | 0 .../firmware_loadables.dts} | 0 .../binman/test/{161_fit.dts => fit/fit.dts} | 0 .../{219_fit_gennode.dts => fit/gennode.dts} | 0 .../image_subentry_alignment.dts} | 0 .../key_name_hint_dir_signature.dts} | 0 .../missing_blob.dts} | 0 .../replace_sibling.dts} | 0 .../test/{280_fit_sign.dts => fit/sign.dts} | 0 .../signature.dts} | 0 .../signature_engine.dts} | 0 .../signature_engine_encrypt.dts} | 0 .../signature_engine_pkcs11.dts} | 0 .../signature_engine_pkcs11_object.dts} | 0 .../signature_multi_key.dts} | 0 .../signature_no_nodes.dts} | 0 .../split_elf.dts} | 0 .../subentry_bintool.dts} | 0 .../subentry_hash.dts} | 0 .../tee_os_opt.dts} | 0 .../tee_os_opt_bad.dts} | 0 .../template.dts} | 0 38 files changed, 61 insertions(+), 61 deletions(-)rename
tools/binman/test/{275_fit_align.dts=>fit/align.dts} (100%)
renametools/binman/test/{227_fit_bad_dir.dts=>fit/bad_dir.dts} (71%)
renametools/binman/test/{228_fit_bad_dir_config.dts=>fit/bad_dir_config.dts} (71%) renametools/binman/test/{224_fit_bad_oper.dts=>fit/bad_oper.dts} (100%) renametools/binman/test/{343_fit_encrypt_data.dts=>fit/encrypt_data.dts} (100%) renametools/binman/test/{344_fit_encrypt_data_no_key.dts=>fit/encrypt_data_no_key.dts} (100%) renametools/binman/test/{162_fit_external.dts=>fit/external.dts} (100%) renametools/binman/test/{240_fit_extract_replace.dts=>fit/extract_replace.dts} (100%) renametools/binman/test/{170_fit_fdt.dts=>fit/fdt.dts} (100%)
renametools/binman/test/{334_fit_fdt_compat.dts=>fit/fdt_compat.dts} (100%) renametools/binman/test/{333_fit_fdt_dir.dts=>fit/fdt_dir.dts} (100%)
renametools/binman/test/{284_fit_fdt_list.dts=>fit/fdt_list.dts} (100%) renametools/binman/test/{171_fit_fdt_missing_prop.dts=>fit/fdt_missing_prop.dts} (100%)
Quoted 8 lines
rename
tools/binman/test/{345_fit_fdt_name.dts=>fit/fdt_name.dts} (100%)
renametools/binman/test/{223_fit_fdt_oper.dts=>fit/fdt_oper.dts} (100%)
renametools/binman/test/{335_fit_fdt_phase.dts=>fit/fdt_phase.dts} (100%)
renametools/binman/test/{276_fit_firmware_loadables.dts=>fit/firmware_loadables.dts} (100%) renametools/binman/test/{161_fit.dts=>fit/fit.dts} (100%)
renametools/binman/test/{219_fit_gennode.dts=>fit/gennode.dts} (100%)
renametools/binman/test/{167_fit_image_subentry_alignment.dts=>fit/image_subentry_alignment.dts} (100%) renametools/binman/test/{355_key_name_hint_dir_fit_signature.dts=>fit/key_name_hint_dir_signature.dts} (100%)
This file doesn't exist. What is this series based on? I'm assuming https://lore.kernel.org/u-boot/[email protected]/ but can you please specify series dependencies in the cover-letter so we don't have to guess. I'm also thinking the parent dependency have two patches we wouldn't need with this series here (rename and drop the number, patch 1 and 2 of the series).
Cheers,
Quentin
Re: [RFC PATCH 04/16] binman: test: Move FIT image test files to test/fit/
Hi Quentin,
Quoted 84 lines · Quentin Schulz
Hi Simon,
Quoted 10 lines · Simon Glass
From: Simon Glass <[email protected]>
Move about 40 test files for FIT images (signing, external data, split-elf, encryption, alignment, firmware loadables, templates) into a fit/ subdirectory. Drop the numeric prefixes and the redundant
fit_filename prefix, and update all references.Rename the three
signature.dtsvariants to have unique names:signature.dts,signature_multi_key.dtsandsignature_no_nodes.dts.What about aes256.bin, 340_rsa2048.key,
dummy-rsa-engine.c, 340_dummy-rsa4096.crt, 340_openssl.conf, 340_softhsm2.conf, and dev.key?Can be done in a separate patch.
Quoted 55 lines
Signed-off-by Simon Glass <[email protected]>---
tools/binman/ftest.py | 118 +++++++++--------- .../test/{275_fit_align.dts => fit/align.dts} | 0 .../{227_fit_bad_dir.dts => fit/bad_dir.dts} | 2 +- .../bad_dir_config.dts} | 2 +- .../bad_oper.dts} | 0 .../encrypt_data.dts} | 0 .../encrypt_data_no_key.dts} | 0 .../external.dts} | 0 .../extract_replace.dts} | 0 .../test/{170_fit_fdt.dts => fit/fdt.dts} | 0 .../fdt_compat.dts} | 0 .../{333_fit_fdt_dir.dts => fit/fdt_dir.dts} | 0 .../fdt_list.dts} | 0 .../fdt_missing_prop.dts} | 0 .../fdt_name.dts} | 0 .../fdt_oper.dts} | 0 .../fdt_phase.dts} | 0 .../firmware_loadables.dts} | 0 .../binman/test/{161_fit.dts => fit/fit.dts} | 0 .../{219_fit_gennode.dts => fit/gennode.dts} | 0 .../image_subentry_alignment.dts} | 0 .../key_name_hint_dir_signature.dts} | 0 .../missing_blob.dts} | 0 .../replace_sibling.dts} | 0 .../test/{280_fit_sign.dts => fit/sign.dts} | 0 .../signature.dts} | 0 .../signature_engine.dts} | 0 .../signature_engine_encrypt.dts} | 0 .../signature_engine_pkcs11.dts} | 0 .../signature_engine_pkcs11_object.dts} | 0 .../signature_multi_key.dts} | 0 .../signature_no_nodes.dts} | 0 .../split_elf.dts} | 0 .../subentry_bintool.dts} | 0 .../subentry_hash.dts} | 0 .../tee_os_opt.dts} | 0 .../tee_os_opt_bad.dts} | 0 .../template.dts} | 0 38 files changed, 61 insertions(+), 61 deletions(-)rename
tools/binman/test/{275_fit_align.dts=>fit/align.dts} (100%)
renametools/binman/test/{227_fit_bad_dir.dts=>fit/bad_dir.dts} (71%)
renametools/binman/test/{228_fit_bad_dir_config.dts=>fit/bad_dir_config.dts} (71%) renametools/binman/test/{224_fit_bad_oper.dts=>fit/bad_oper.dts} (100%) renametools/binman/test/{343_fit_encrypt_data.dts=>fit/encrypt_data.dts} (100%) renametools/binman/test/{344_fit_encrypt_data_no_key.dts=>fit/encrypt_data_no_key.dts} (100%) renametools/binman/test/{162_fit_external.dts=>fit/external.dts} (100%) renametools/binman/test/{240_fit_extract_replace.dts=>fit/extract_replace.dts} (100%) renametools/binman/test/{170_fit_fdt.dts=>fit/fdt.dts} (100%)
renametools/binman/test/{334_fit_fdt_compat.dts=>fit/fdt_compat.dts} (100%) renametools/binman/test/{333_fit_fdt_dir.dts=>fit/fdt_dir.dts} (100%)
renametools/binman/test/{284_fit_fdt_list.dts=>fit/fdt_list.dts} (100%) renametools/binman/test/{171_fit_fdt_missing_prop.dts=>fit/fdt_missing_prop.dts} (100%)Quoted 8 lines
rename
tools/binman/test/{345_fit_fdt_name.dts=>fit/fdt_name.dts} (100%)
renametools/binman/test/{223_fit_fdt_oper.dts=>fit/fdt_oper.dts} (100%)
renametools/binman/test/{335_fit_fdt_phase.dts=>fit/fdt_phase.dts} (100%)
renametools/binman/test/{276_fit_firmware_loadables.dts=>fit/firmware_loadables.dts} (100%) renametools/binman/test/{161_fit.dts=>fit/fit.dts} (100%)
renametools/binman/test/{219_fit_gennode.dts=>fit/gennode.dts} (100%)
renametools/binman/test/{167_fit_image_subentry_alignment.dts=>fit/image_subentry_alignment.dts} (100%) renametools/binman/test/{355_key_name_hint_dir_fit_signature.dts=>fit/key_name_hint_dir_signature.dts} (100%)
Quoted 6 lines
This file doesn't exist. What is this series based on? I'm assuming
https://lore.kernel.org/u-boot/[email protected]/
but can you please specify series dependencies in the cover-letter so we don't have to guess. I'm also thinking the parent dependency have two patches we wouldn't need with this series here (rename and drop the number, patch 1 and 2 of the series).
Yes that's right. The commit hash is in the cover letter but the branch name doesn't help very much! I need to update patman to include the patch link as well. I could rework that series to drop the renames, but the point of that series is really to fix the test coverage.
Perhaps I should just combine the two series into one?
Regards,
Simon
RFC PATCH 5/16 binman: test: Move FDT/fdtmap test files to test/fdt/
In reply to Simon GlassFrom: Simon Glass <[email protected]>
Move about 30 test files for FDT update, fdtmap, DTB compression, alternates, and bootph into an fdt/ subdirectory. Drop the numeric prefixes and the redundant fdt_ filename prefix, and update all references.
---
tools/binman/ftest.py | 104 +++++++++---------
.../alternates_fdt.dts} | 0
.../alternates_fdtgrep.dts} | 0
.../alternates_inval.dts} | 0
.../alternates_spl.dts} | 0
.../alternates_vpl.dts} | 0
.../bootph_prop.dts} | 0
.../compress_dtb.dts} | 0
.../compress_dtb_invalid.dts} | 0
.../compress_dtb_prepend_invalid.dts} | 0
.../compress_dtb_prepend_length.dts} | 0
.../compress_dtb_zstd.dts} | 0
.../decode_image.dts} | 0
.../decode_image_nohdr.dts} | 0
.../test/{115_fdtmap.dts => fdt/fdtmap.dts} | 0
.../fdtmap_alt_format.dts} | 0
.../fdtmap_hdr.dts} | 0
.../fdtmap_hdr_endbad.dts} | 0
.../fdtmap_hdr_middle.dts} | 0
.../fdtmap_hdr_missing.dts} | 0
.../fdtmap_hdr_nosize.dts} | 0
.../fdtmap_hdr_pos.dts} | 0
.../fdtmap_hdr_start.dts} | 0
.../fdtmap_hdr_startbad.dts} | 0
.../hdr_no_location.dts} | 0
.../test/{194_fdt_incl.dts => fdt/incl.dts} | 0
.../incl_tpl.dts} | 0
.../incl_vpl.dts} | 0
.../list_fdtmap.dts} | 0
.../no_alt_format.dts} | 0
.../{060_fdt_update.dts => fdt/update.dts} | 0
.../update_all.dts} | 0
.../update_all_repack.dts} | 0
.../update_bad.dts} | 0
34 files changed, 52 insertions(+), 52 deletions(-)
rename tools/binman/test/{328_alternates_fdt.dts => fdt/alternates_fdt.dts} (100%)
rename tools/binman/test/{329_alternates_fdtgrep.dts => fdt/alternates_fdtgrep.dts} (100%)
rename tools/binman/test/{332_alternates_inval.dts => fdt/alternates_inval.dts} (100%)
rename tools/binman/test/{331_alternates_spl.dts => fdt/alternates_spl.dts} (100%)
rename tools/binman/test/{330_alternates_vpl.dts => fdt/alternates_vpl.dts} (100%)
rename tools/binman/test/{347_bootph_prop.dts => fdt/bootph_prop.dts} (100%)
rename tools/binman/test/{124_compress_dtb.dts => fdt/compress_dtb.dts} (100%)
rename tools/binman/test/{250_compress_dtb_invalid.dts => fdt/compress_dtb_invalid.dts} (100%)
rename tools/binman/test/{248_compress_dtb_prepend_invalid.dts => fdt/compress_dtb_prepend_invalid.dts} (100%)
rename tools/binman/test/{249_compress_dtb_prepend_length.dts => fdt/compress_dtb_prepend_length.dts} (100%)
rename tools/binman/test/{251_compress_dtb_zstd.dts => fdt/compress_dtb_zstd.dts} (100%)
rename tools/binman/test/{128_decode_image.dts => fdt/decode_image.dts} (100%)
rename tools/binman/test/{129_decode_image_nohdr.dts => fdt/decode_image_nohdr.dts} (100%)
rename tools/binman/test/{115_fdtmap.dts => fdt/fdtmap.dts} (100%)
rename tools/binman/test/{213_fdtmap_alt_format.dts => fdt/fdtmap_alt_format.dts} (100%)
rename tools/binman/test/{116_fdtmap_hdr.dts => fdt/fdtmap_hdr.dts} (100%)
rename tools/binman/test/{137_fdtmap_hdr_endbad.dts => fdt/fdtmap_hdr_endbad.dts} (100%)
rename tools/binman/test/{135_fdtmap_hdr_middle.dts => fdt/fdtmap_hdr_middle.dts} (100%)
rename tools/binman/test/{119_fdtmap_hdr_missing.dts => fdt/fdtmap_hdr_missing.dts} (100%)
rename tools/binman/test/{138_fdtmap_hdr_nosize.dts => fdt/fdtmap_hdr_nosize.dts} (100%)
rename tools/binman/test/{118_fdtmap_hdr_pos.dts => fdt/fdtmap_hdr_pos.dts} (100%)
rename tools/binman/test/{117_fdtmap_hdr_start.dts => fdt/fdtmap_hdr_start.dts} (100%)
rename tools/binman/test/{136_fdtmap_hdr_startbad.dts => fdt/fdtmap_hdr_startbad.dts} (100%)
rename tools/binman/test/{120_hdr_no_location.dts => fdt/hdr_no_location.dts} (100%)
rename tools/binman/test/{194_fdt_incl.dts => fdt/incl.dts} (100%)
rename tools/binman/test/{195_fdt_incl_tpl.dts => fdt/incl_tpl.dts} (100%)
rename tools/binman/test/{257_fdt_incl_vpl.dts => fdt/incl_vpl.dts} (100%)
rename tools/binman/test/{130_list_fdtmap.dts => fdt/list_fdtmap.dts} (100%)
rename tools/binman/test/{214_no_alt_format.dts => fdt/no_alt_format.dts} (100%)
rename tools/binman/test/{060_fdt_update.dts => fdt/update.dts} (100%)
rename tools/binman/test/{082_fdt_update_all.dts => fdt/update_all.dts} (100%)
rename tools/binman/test/{134_fdt_update_all_repack.dts => fdt/update_all_repack.dts} (100%)
rename tools/binman/test/{061_fdt_update_bad.dts => fdt/update_bad.dts} (100%)tools/binman/ftest.py +52 -52
@@ -1677,7 +1677,7 @@ class TestFunctional(unittest.TestCase): def testUpdateFdt(self): """Test that we can update the device tree with offset/size info""" - _, _, _, out_dtb_fname = self._DoReadFileDtb('060_fdt_update.dts', + _, _, _, out_dtb_fname = self._DoReadFileDtb('fdt/update.dts', update_dtb=True) dtb = fdt.Fdt(out_dtb_fname) dtb.Scan()
@@ -1707,7 +1707,7 @@ class TestFunctional(unittest.TestCase): def testUpdateFdtBad(self): """Test that we detect when ProcessFdt never completes""" with self.assertRaises(ValueError) as e: - self._DoReadFileDtb('061_fdt_update_bad.dts', update_dtb=True) + self._DoReadFileDtb('fdt/update_bad.dts', update_dtb=True) self.assertIn('Could not complete processing of Fdt: remaining ' '[<binman.etype._testing.Entry__testing', str(e.exception))
@@ -2082,7 +2082,7 @@ class TestFunctional(unittest.TestCase): """Test that all device trees are updated with offset/size info""" self._SetupSplElf() self._SetupTplElf() - data = self._DoReadFileRealDtb('082_fdt_update_all.dts') + data = self._DoReadFileRealDtb('fdt/update_all.dts') base_expected = { 'offset': 0,
@@ -2125,7 +2125,7 @@ class TestFunctional(unittest.TestCase): def testUpdateFdtOutput(self): """Test that output DTB files are updated""" try: - data, dtb_data, _, _ = self._DoReadFileDtb('082_fdt_update_all.dts', + data, dtb_data, _, _ = self._DoReadFileDtb('fdt/update_all.dts', use_real_dtb=True, update_dtb=True, reset_dtbs=False) # Unfortunately, compiling a source file always results in a file
@@ -2607,7 +2607,7 @@ class TestFunctional(unittest.TestCase): def testFdtmap(self): """Test an FDT map can be inserted in the image""" - data = self.data = self._DoReadFileRealDtb('115_fdtmap.dts') + data = self.data = self._DoReadFileRealDtb('fdt/fdtmap.dts') fdtmap_data = data[len(U_BOOT_DATA):] magic = fdtmap_data[:8] self.assertEqual(b'_FDTMAP_', magic)
@@ -2631,7 +2631,7 @@ class TestFunctional(unittest.TestCase): def testFdtmapNoMatch(self): """Check handling of an FDT map when the section cannot be found""" - self.data = self._DoReadFileRealDtb('115_fdtmap.dts') + self.data = self._DoReadFileRealDtb('fdt/fdtmap.dts') # Mangle the section name, which should cause a mismatch between the # correct FDT path and the one expected by the section
@@ -2646,7 +2646,7 @@ class TestFunctional(unittest.TestCase): def testFdtmapHeader(self): """Test an FDT map and image header can be inserted in the image""" - data = self.data = self._DoReadFileRealDtb('116_fdtmap_hdr.dts') + data = self.data = self._DoReadFileRealDtb('fdt/fdtmap_hdr.dts') fdtmap_pos = len(U_BOOT_DATA) fdtmap_data = data[fdtmap_pos:] fdt_data = fdtmap_data[16:]
@@ -2659,7 +2659,7 @@ class TestFunctional(unittest.TestCase): def testFdtmapHeaderStart(self): """Test an image header can be inserted at the image start""" - data = self.data = self._DoReadFileRealDtb('117_fdtmap_hdr_start.dts') + data = self.data = self._DoReadFileRealDtb('fdt/fdtmap_hdr_start.dts') fdtmap_pos = 0x100 + len(U_BOOT_DATA) hdr_data = data[:8] self.assertEqual(b'BinM', hdr_data[:4])
@@ -2668,7 +2668,7 @@ class TestFunctional(unittest.TestCase): def testFdtmapHeaderPos(self): """Test an image header can be inserted at a chosen position""" - data = self.data = self._DoReadFileRealDtb('118_fdtmap_hdr_pos.dts') + data = self.data = self._DoReadFileRealDtb('fdt/fdtmap_hdr_pos.dts') fdtmap_pos = 0x100 + len(U_BOOT_DATA) hdr_data = data[0x80:0x88] self.assertEqual(b'BinM', hdr_data[:4])
@@ -2678,14 +2678,14 @@ class TestFunctional(unittest.TestCase): def testHeaderMissingFdtmap(self): """Test an image header requires an fdtmap""" with self.assertRaises(ValueError) as e: - self.data = self._DoReadFileRealDtb('119_fdtmap_hdr_missing.dts') + self.data = self._DoReadFileRealDtb('fdt/fdtmap_hdr_missing.dts') self.assertIn("'image_header' section must have an 'fdtmap' sibling", str(e.exception)) def testHeaderNoLocation(self): """Test an image header with a no specified location is detected""" with self.assertRaises(ValueError) as e: - self.data = self._DoReadFileRealDtb('120_hdr_no_location.dts') + self.data = self._DoReadFileRealDtb('fdt/hdr_no_location.dts') self.assertIn("Invalid location 'None', expected 'start' or 'end'", str(e.exception))
@@ -2713,7 +2713,7 @@ class TestFunctional(unittest.TestCase): def testCompressDtb(self): """Test that compress of device-tree files is supported""" self._CheckLz4() - data = self.data = self._DoReadFileRealDtb('124_compress_dtb.dts') + data = self.data = self._DoReadFileRealDtb('fdt/compress_dtb.dts') self.assertEqual(U_BOOT_DATA, data[:len(U_BOOT_DATA)]) comp_data = data[len(U_BOOT_DATA):] orig = self._decompress(comp_data)
@@ -2837,7 +2837,7 @@ class TestFunctional(unittest.TestCase): def testFindFdtmap(self): """Test locating an FDT map in an image""" self._CheckLz4() - data = self.data = self._DoReadFileRealDtb('128_decode_image.dts') + data = self.data = self._DoReadFileRealDtb('fdt/decode_image.dts') image = control.images['image'] entries = image.GetEntries() entry = entries['fdtmap']
@@ -2851,7 +2851,7 @@ class TestFunctional(unittest.TestCase): def testFindImageHeader(self): """Test locating a image header""" self._CheckLz4() - data = self.data = self._DoReadFileRealDtb('128_decode_image.dts') + data = self.data = self._DoReadFileRealDtb('fdt/decode_image.dts') image = control.images['image'] entries = image.GetEntries() entry = entries['fdtmap']
@@ -2860,7 +2860,7 @@ class TestFunctional(unittest.TestCase): def testFindImageHeaderStart(self): """Test locating a image header located at the start of an image""" - data = self.data = self._DoReadFileRealDtb('117_fdtmap_hdr_start.dts') + data = self.data = self._DoReadFileRealDtb('fdt/fdtmap_hdr_start.dts') image = control.images['image'] entries = image.GetEntries() entry = entries['fdtmap']
@@ -2875,7 +2875,7 @@ class TestFunctional(unittest.TestCase): def testReadImage(self): """Test reading an image and accessing its FDT map""" self._CheckLz4() - data = self.data = self._DoReadFileRealDtb('128_decode_image.dts') + data = self.data = self._DoReadFileRealDtb('fdt/decode_image.dts') image_fname = tools.get_output_filename('image.bin') orig_image = control.images['image'] image = Image.FromFile(image_fname)
@@ -2891,7 +2891,7 @@ class TestFunctional(unittest.TestCase): def testReadImageNoHeader(self): """Test accessing an image's FDT map without an image header""" self._CheckLz4() - data = self._DoReadFileRealDtb('129_decode_image_nohdr.dts') + data = self._DoReadFileRealDtb('fdt/decode_image_nohdr.dts') image_fname = tools.get_output_filename('image.bin') image = Image.FromFile(image_fname) self.assertTrue(isinstance(image, Image))
@@ -2908,7 +2908,7 @@ class TestFunctional(unittest.TestCase): def testListCmd(self): """Test listing the files in an image using an Fdtmap""" self._CheckLz4() - data = self._DoReadFileRealDtb('130_list_fdtmap.dts') + data = self._DoReadFileRealDtb('fdt/list_fdtmap.dts') # lz4 compression size differs depending on the version image = control.images['image']
@@ -2963,7 +2963,7 @@ class TestFunctional(unittest.TestCase): expected: Expected list of filenames to be returned, in order """ self._CheckLz4() - self._DoReadFileRealDtb('130_list_fdtmap.dts') + self._DoReadFileRealDtb('fdt/list_fdtmap.dts') image_fname = tools.get_output_filename('image.bin') image = Image.FromFile(image_fname) lines = image.GetListEntries(paths)[1]
@@ -3009,7 +3009,7 @@ class TestFunctional(unittest.TestCase): data from entry """ self._CheckLz4() - self._DoReadFileRealDtb('130_list_fdtmap.dts') + self._DoReadFileRealDtb('fdt/list_fdtmap.dts') image_fname = tools.get_output_filename('image.bin') return control.ReadEntry(image_fname, entry_name, decomp)
@@ -3079,7 +3079,7 @@ class TestFunctional(unittest.TestCase): def testExtractCmd(self): """Test extracting a file fron an image on the command line""" self._CheckLz4() - self._DoReadFileRealDtb('130_list_fdtmap.dts') + self._DoReadFileRealDtb('fdt/list_fdtmap.dts') fname = os.path.join(self._indir, 'output.extact') tmpdir = None try:
@@ -3096,7 +3096,7 @@ class TestFunctional(unittest.TestCase): def testExtractOneEntry(self): """Test extracting a single entry fron an image """ self._CheckLz4() - self._DoReadFileRealDtb('130_list_fdtmap.dts') + self._DoReadFileRealDtb('fdt/list_fdtmap.dts') image_fname = tools.get_output_filename('image.bin') fname = os.path.join(self._indir, 'output.extact') control.ExtractEntries(image_fname, fname, None, ['u-boot'])
@@ -3141,7 +3141,7 @@ class TestFunctional(unittest.TestCase): path = os.path.join(outdir, name) os.rmdir(path) - self._DoReadFileRealDtb('130_list_fdtmap.dts') + self._DoReadFileRealDtb('fdt/list_fdtmap.dts') image_fname = tools.get_output_filename('image.bin') outdir = os.path.join(self._indir, 'extract') einfos = control.ExtractEntries(image_fname, None, outdir, [], decomp)
@@ -3202,7 +3202,7 @@ class TestFunctional(unittest.TestCase): def testExtractSelectedEntries(self): """Test extracting some entries""" self._CheckLz4() - self._DoReadFileRealDtb('130_list_fdtmap.dts') + self._DoReadFileRealDtb('fdt/list_fdtmap.dts') image_fname = tools.get_output_filename('image.bin') outdir = os.path.join(self._indir, 'extract') einfos = control.ExtractEntries(image_fname, None, outdir,
@@ -3217,7 +3217,7 @@ class TestFunctional(unittest.TestCase): def testExtractNoEntryPaths(self): """Test extracting some entries""" self._CheckLz4() - self._DoReadFileRealDtb('130_list_fdtmap.dts') + self._DoReadFileRealDtb('fdt/list_fdtmap.dts') image_fname = tools.get_output_filename('image.bin') with self.assertRaises(ValueError) as e: control.ExtractEntries(image_fname, 'fname', None, [])
@@ -3227,7 +3227,7 @@ class TestFunctional(unittest.TestCase): def testExtractTooManyEntryPaths(self): """Test extracting some entries""" self._CheckLz4() - self._DoReadFileRealDtb('130_list_fdtmap.dts') + self._DoReadFileRealDtb('fdt/list_fdtmap.dts') image_fname = tools.get_output_filename('image.bin') with self.assertRaises(ValueError) as e: control.ExtractEntries(image_fname, 'fname', None, ['a', 'b'])
@@ -3414,7 +3414,7 @@ class TestFunctional(unittest.TestCase): """Test that all device trees are updated with offset/size info""" self._SetupSplElf() self._SetupTplElf() - data = self._DoReadFileRealDtb('134_fdt_update_all_repack.dts') + data = self._DoReadFileRealDtb('fdt/update_all_repack.dts') SECTION_SIZE = 0x300 DTB_SIZE = 602 FDTMAP_SIZE = 608
@@ -3476,27 +3476,27 @@ class TestFunctional(unittest.TestCase): def testFdtmapHeaderMiddle(self): """Test an FDT map in the middle of an image when it should be at end""" with self.assertRaises(ValueError) as e: - self._DoReadFileRealDtb('135_fdtmap_hdr_middle.dts') + self._DoReadFileRealDtb('fdt/fdtmap_hdr_middle.dts') self.assertIn("Invalid sibling order 'middle' for image-header: Must be at 'end' to match location", str(e.exception)) def testFdtmapHeaderStartBad(self): """Test an FDT map in middle of an image when it should be at start""" with self.assertRaises(ValueError) as e: - self._DoReadFileRealDtb('136_fdtmap_hdr_startbad.dts') + self._DoReadFileRealDtb('fdt/fdtmap_hdr_startbad.dts') self.assertIn("Invalid sibling order 'end' for image-header: Must be at 'start' to match location", str(e.exception)) def testFdtmapHeaderEndBad(self): """Test an FDT map at the start of an image when it should be at end""" with self.assertRaises(ValueError) as e: - self._DoReadFileRealDtb('137_fdtmap_hdr_endbad.dts') + self._DoReadFileRealDtb('fdt/fdtmap_hdr_endbad.dts') self.assertIn("Invalid sibling order 'start' for image-header: Must be at 'end' to match location", str(e.exception)) def testFdtmapHeaderNoSize(self): """Test an image header at the end of an image with undefined size""" - self._DoReadFileRealDtb('138_fdtmap_hdr_nosize.dts') + self._DoReadFileRealDtb('fdt/fdtmap_hdr_nosize.dts') def testReplaceResize(self): """Test replacing a single file in an entry with a larger file"""
@@ -4867,7 +4867,7 @@ class TestFunctional(unittest.TestCase): 'spl-bss-pad': 'y', 'tpl-dtb': '', } - self._DoReadFileDtb('194_fdt_incl.dts', use_expanded=True, + self._DoReadFileDtb('fdt/incl.dts', use_expanded=True, entry_args=entry_args) image = control.images['image'] entries = image.GetEntries()
@@ -4907,7 +4907,7 @@ class TestFunctional(unittest.TestCase): 'tpl-bss-pad': 'y', 'tpl-dtb': 'y', } - self._DoReadFileDtb('195_fdt_incl_tpl.dts', use_expanded=True, + self._DoReadFileDtb('fdt/incl_tpl.dts', use_expanded=True, entry_args=entry_args) image = control.images['image'] entries = image.GetEntries()
@@ -4934,7 +4934,7 @@ class TestFunctional(unittest.TestCase): 'spl-bss-pad': 'n', 'tpl-dtb': '', } - self._DoReadFileDtb('194_fdt_incl.dts', use_expanded=True, + self._DoReadFileDtb('fdt/incl.dts', use_expanded=True, entry_args=entry_args) image = control.images['image'] entries = image.GetEntries()
@@ -4956,7 +4956,7 @@ class TestFunctional(unittest.TestCase): 'tpl-bss-pad': '', 'tpl-dtb': 'y', } - self._DoReadFileDtb('195_fdt_incl_tpl.dts', use_expanded=True, + self._DoReadFileDtb('fdt/incl_tpl.dts', use_expanded=True, entry_args=entry_args) image = control.images['image'] entries = image.GetEntries()
@@ -4986,7 +4986,7 @@ class TestFunctional(unittest.TestCase): # Build the image. It includes two separate devicetree binaries, each # with their own contents, but all contain the binman definition. data = self._DoReadFileDtb( - '194_fdt_incl.dts', use_real_dtb=True, use_expanded=True, + 'fdt/incl.dts', use_real_dtb=True, use_expanded=True, update_dtb=True, entry_args=entry_args)[0] pad_len = 10
@@ -5081,7 +5081,7 @@ class TestFunctional(unittest.TestCase): begin_sym = 'dtb_embed_begin' end_sym = 'dtb_embed_end' retcode = self._DoTestFile( - '060_fdt_update.dts', update_dtb=True, + 'fdt/update.dts', update_dtb=True, update_fdt_in_elf=','.join([infile,outfile,begin_sym,end_sym])) self.assertEqual(0, retcode)
@@ -5121,7 +5121,7 @@ class TestFunctional(unittest.TestCase): def testUpdateFdtInElfInvalid(self): """Test that invalid args are detected with --update-fdt-in-elf""" with self.assertRaises(ValueError) as e: - self._DoTestFile('060_fdt_update.dts', update_fdt_in_elf='fred') + self._DoTestFile('fdt/update.dts', update_fdt_in_elf='fred') self.assertIn("Invalid args ['fred'] to --update-fdt-in-elf", str(e.exception))
@@ -5135,7 +5135,7 @@ class TestFunctional(unittest.TestCase): end_sym = 'wrong_end' with self.assertRaises(ValueError) as e: self._DoTestFile( - '060_fdt_update.dts', + 'fdt/update.dts', update_fdt_in_elf=','.join([infile,outfile,begin_sym,end_sym])) self.assertIn("Expected two symbols 'wrong_begin' and 'wrong_end': got 0:", str(e.exception))
@@ -5150,7 +5150,7 @@ class TestFunctional(unittest.TestCase): end_sym = 'dtb_embed_end' with self.assertRaises(ValueError) as e: self._DoTestFile( - '060_fdt_update.dts', update_dtb=True, + 'fdt/update.dts', update_dtb=True, update_fdt_in_elf=','.join([infile,outfile,begin_sym,end_sym])) self.assertRegex( str(e.exception),
@@ -5178,7 +5178,7 @@ class TestFunctional(unittest.TestCase): def testAltFormat(self): """Test that alternative formats can be used to extract""" - self._DoReadFileRealDtb('213_fdtmap_alt_format.dts') + self._DoReadFileRealDtb('fdt/fdtmap_alt_format.dts') try: tmpdir, updated_fname = self._SetupImageInTmpdir()
@@ -6188,13 +6188,13 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testCompressDtbPrependInvalid(self): """Test that invalid header is detected""" with self.assertRaises(ValueError) as e: - self._DoReadFileDtb('248_compress_dtb_prepend_invalid.dts') + self._DoReadFileDtb('fdt/compress_dtb_prepend_invalid.dts') self.assertIn("Node '/binman/u-boot-dtb': Invalid prepend in " "'u-boot-dtb': 'invalid'", str(e.exception)) def testCompressDtbPrependLength(self): """Test that compress with length header works as expected""" - data = self._DoReadFileRealDtb('249_compress_dtb_prepend_length.dts') + data = self._DoReadFileRealDtb('fdt/compress_dtb_prepend_length.dts') image = control.images['image'] entries = image.GetEntries() self.assertIn('u-boot-dtb', entries)
@@ -6227,7 +6227,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testInvalidCompress(self): """Test that invalid compress algorithm is detected""" with self.assertRaises(ValueError) as e: - self._DoTestFile('250_compress_dtb_invalid.dts') + self._DoTestFile('fdt/compress_dtb_invalid.dts') self.assertIn("Unknown algorithm 'invalid'", str(e.exception)) def testCompUtilCompressions(self):
@@ -6261,7 +6261,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testCompressDtbZstd(self): """Test that zstd compress of device-tree files failed""" with self.assertRaises(ValueError) as e: - self._DoTestFile('251_compress_dtb_zstd.dts') + self._DoTestFile('fdt/compress_dtb_zstd.dts') self.assertIn("Node '/binman/u-boot-dtb': The zstd compression " "requires a length header", str(e.exception))
@@ -6354,7 +6354,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap 'vpl-bss-pad': 'y', 'vpl-dtb': 'y', } - self._DoReadFileDtb('257_fdt_incl_vpl.dts', use_expanded=True, + self._DoReadFileDtb('fdt/incl_vpl.dts', use_expanded=True, entry_args=entry_args) image = control.images['image'] entries = image.GetEntries()
@@ -7724,7 +7724,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testAlternatesFdt(self): """Test handling of alternates-fdt etype""" self._SetupTplElf() - dtbs = self.CheckAlternates('328_alternates_fdt.dts', 'tpl', + dtbs = self.CheckAlternates('fdt/alternates_fdt.dts', 'tpl', U_BOOT_TPL_NODTB_DATA) for dtb in dtbs.values(): # Check for the node with the tag
@@ -7738,7 +7738,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testAlternatesFdtgrep(self): """Test handling of alternates-fdt etype using fdtgrep""" self._SetupTplElf() - dtbs = self.CheckAlternates('329_alternates_fdtgrep.dts', 'tpl', + dtbs = self.CheckAlternates('fdt/alternates_fdtgrep.dts', 'tpl', U_BOOT_TPL_NODTB_DATA) for dtb in dtbs.values(): # Check for the node with the tag
@@ -7753,20 +7753,20 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testAlternatesFdtgrepVpl(self): """Test handling of alternates-fdt etype using fdtgrep with vpl""" self._SetupVplElf() - dtbs = self.CheckAlternates('330_alternates_vpl.dts', 'vpl', + dtbs = self.CheckAlternates('fdt/alternates_vpl.dts', 'vpl', U_BOOT_VPL_NODTB_DATA) def testAlternatesFdtgrepSpl(self): """Test handling of alternates-fdt etype using fdtgrep with spl""" self._SetupSplElf() - dtbs = self.CheckAlternates('331_alternates_spl.dts', 'spl', + dtbs = self.CheckAlternates('fdt/alternates_spl.dts', 'spl', U_BOOT_SPL_NODTB_DATA) def testAlternatesFdtgrepInval(self): """Test alternates-fdt etype using fdtgrep with invalid phase""" self._SetupSplElf() with self.assertRaises(ValueError) as e: - dtbs = self.CheckAlternates('332_alternates_inval.dts', 'spl', + dtbs = self.CheckAlternates('fdt/alternates_inval.dts', 'spl', U_BOOT_SPL_NODTB_DATA) self.assertIn("Invalid U-Boot phase 'bad-phase': Use tpl/vpl/spl", str(e.exception))
@@ -8423,7 +8423,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testBootphPropagation(self): """Test that bootph-* properties are propagated correctly to supernodes""" _, _, _, out_dtb_fname = self._DoReadFileDtb( - '347_bootph_prop.dts', use_real_dtb=True, update_dtb=True) + 'fdt/bootph_prop.dts', use_real_dtb=True, update_dtb=True) dtb = fdt.Fdt(out_dtb_fname) dtb.Scan() root = dtb.GetRoot()
tools/binman/test/fdt/alternates_fdt.dts renamed from tools/binman/test/328_alternates_fdt.dts +0 -0
tools/binman/test/fdt/alternates_fdtgrep.dts renamed from tools/binman/test/329_alternates_fdtgrep.dts +0 -0
tools/binman/test/fdt/alternates_inval.dts renamed from tools/binman/test/332_alternates_inval.dts +0 -0
tools/binman/test/fdt/alternates_spl.dts renamed from tools/binman/test/331_alternates_spl.dts +0 -0
tools/binman/test/fdt/alternates_vpl.dts renamed from tools/binman/test/330_alternates_vpl.dts +0 -0
tools/binman/test/fdt/bootph_prop.dts renamed from tools/binman/test/347_bootph_prop.dts +0 -0
tools/binman/test/fdt/compress_dtb.dts renamed from tools/binman/test/124_compress_dtb.dts +0 -0
tools/binman/test/fdt/compress_dtb_invalid.dts renamed from tools/binman/test/250_compress_dtb_invalid.dts +0 -0
tools/binman/test/fdt/compress_dtb_prepend_invalid.dts renamed from tools/binman/test/248_compress_dtb_prepend_invalid.dts +0 -0
tools/binman/test/fdt/compress_dtb_prepend_length.dts renamed from tools/binman/test/249_compress_dtb_prepend_length.dts +0 -0
tools/binman/test/fdt/compress_dtb_zstd.dts renamed from tools/binman/test/251_compress_dtb_zstd.dts +0 -0
tools/binman/test/fdt/decode_image.dts renamed from tools/binman/test/128_decode_image.dts +0 -0
tools/binman/test/fdt/decode_image_nohdr.dts renamed from tools/binman/test/129_decode_image_nohdr.dts +0 -0
tools/binman/test/fdt/fdtmap.dts renamed from tools/binman/test/115_fdtmap.dts +0 -0
tools/binman/test/fdt/fdtmap_alt_format.dts renamed from tools/binman/test/213_fdtmap_alt_format.dts +0 -0
tools/binman/test/fdt/fdtmap_hdr.dts renamed from tools/binman/test/116_fdtmap_hdr.dts +0 -0
tools/binman/test/fdt/fdtmap_hdr_endbad.dts renamed from tools/binman/test/137_fdtmap_hdr_endbad.dts +0 -0
tools/binman/test/fdt/fdtmap_hdr_middle.dts renamed from tools/binman/test/135_fdtmap_hdr_middle.dts +0 -0
tools/binman/test/fdt/fdtmap_hdr_missing.dts renamed from tools/binman/test/119_fdtmap_hdr_missing.dts +0 -0
tools/binman/test/fdt/fdtmap_hdr_nosize.dts renamed from tools/binman/test/138_fdtmap_hdr_nosize.dts +0 -0
tools/binman/test/fdt/fdtmap_hdr_pos.dts renamed from tools/binman/test/118_fdtmap_hdr_pos.dts +0 -0
tools/binman/test/fdt/fdtmap_hdr_start.dts renamed from tools/binman/test/117_fdtmap_hdr_start.dts +0 -0
tools/binman/test/fdt/fdtmap_hdr_startbad.dts renamed from tools/binman/test/136_fdtmap_hdr_startbad.dts +0 -0
tools/binman/test/fdt/hdr_no_location.dts renamed from tools/binman/test/120_hdr_no_location.dts +0 -0
tools/binman/test/fdt/incl.dts renamed from tools/binman/test/194_fdt_incl.dts +0 -0
tools/binman/test/fdt/incl_tpl.dts renamed from tools/binman/test/195_fdt_incl_tpl.dts +0 -0
tools/binman/test/fdt/incl_vpl.dts renamed from tools/binman/test/257_fdt_incl_vpl.dts +0 -0
tools/binman/test/fdt/list_fdtmap.dts renamed from tools/binman/test/130_list_fdtmap.dts +0 -0
tools/binman/test/fdt/no_alt_format.dts renamed from tools/binman/test/214_no_alt_format.dts +0 -0
tools/binman/test/fdt/update.dts renamed from tools/binman/test/060_fdt_update.dts +0 -0
tools/binman/test/fdt/update_all.dts renamed from tools/binman/test/082_fdt_update_all.dts +0 -0
tools/binman/test/fdt/update_all_repack.dts renamed from tools/binman/test/134_fdt_update_all_repack.dts +0 -0
tools/binman/test/fdt/update_bad.dts renamed from tools/binman/test/061_fdt_update_bad.dts +0 -0
Signature · 1 line
2.43.0
Re: [RFC PATCH 05/16] binman: test: Move FDT/fdtmap test files to test/fdt/
Hi Simon,
On 2/27/26 12:47 AM, Simon Glass wrote:
[...]
Quoted 1 line
rename
tools/binman/test/{214_no_alt_format.dts=>fdt/no_alt_format.dts} (100%)
I don't see this file being used in any test. 943bf78a48ac ("binman: Allow extracting a file in an alternative format") introduces the file but I don't see in the diff where it is used?
If it's not used, please remove it (in a separate commit please).
Thanks!
Quentin
RFC PATCH 6/16 binman: test: Move blob test files to test/blob/
In reply to Simon GlassFrom: Simon Glass <[email protected]>
Move about a dozen test files for blob, blob-ext, blob-ext-list, fake-blob, and blob-symbol entries into a blob/ subdirectory. Drop the numeric prefixes and the redundant blob_ filename prefix, and update all references.
---
tools/binman/ftest.py | 34 +++++++++----------
.../test/{023_blob.dts => blob/blob.dts} | 0
.../test/{157_blob_ext.dts => blob/ext.dts} | 0
.../ext_list.dts} | 0
.../ext_list_fake.dts} | 0
.../ext_list_missing.dts} | 0
.../ext_missing.dts} | 0
.../ext_missing_sect.dts} | 0
.../ext_opt.dts} | 0
.../test/{217_fake_blob.dts => blob/fake.dts} | 0
.../missing.dts} | 0
.../named_by_arg.dts} | 0
.../{273_blob_symbol.dts => blob/symbol.dts} | 0
13 files changed, 17 insertions(+), 17 deletions(-)
rename tools/binman/test/{023_blob.dts => blob/blob.dts} (100%)
rename tools/binman/test/{157_blob_ext.dts => blob/ext.dts} (100%)
rename tools/binman/test/{215_blob_ext_list.dts => blob/ext_list.dts} (100%)
rename tools/binman/test/{218_blob_ext_list_fake.dts => blob/ext_list_fake.dts} (100%)
rename tools/binman/test/{216_blob_ext_list_missing.dts => blob/ext_list_missing.dts} (100%)
rename tools/binman/test/{158_blob_ext_missing.dts => blob/ext_missing.dts} (100%)
rename tools/binman/test/{159_blob_ext_missing_sect.dts => blob/ext_missing_sect.dts} (100%)
rename tools/binman/test/{266_blob_ext_opt.dts => blob/ext_opt.dts} (100%)
rename tools/binman/test/{217_fake_blob.dts => blob/fake.dts} (100%)
rename tools/binman/test/{173_missing_blob.dts => blob/missing.dts} (100%)
rename tools/binman/test/{068_blob_named_by_arg.dts => blob/named_by_arg.dts} (100%)
rename tools/binman/test/{273_blob_symbol.dts => blob/symbol.dts} (100%)tools/binman/ftest.py +17 -17
@@ -1157,7 +1157,7 @@ class TestFunctional(unittest.TestCase): def testBlobFilename(self): """Test that generic blobs can be provided by filename""" - data = self._DoReadFile('023_blob.dts') + data = self._DoReadFile('blob/blob.dts') self.assertEqual(BLOB_DATA, data) def testPackSorted(self):
@@ -1866,7 +1866,7 @@ class TestFunctional(unittest.TestCase): entry_args = { 'cros-ec-rw-path': 'ecrw.bin', } - self._DoReadFileDtb('068_blob_named_by_arg.dts', entry_args=entry_args) + self._DoReadFileDtb('blob/named_by_arg.dts', entry_args=entry_args) def testFill(self): """Test for an fill entry type"""
@@ -3884,20 +3884,20 @@ class TestFunctional(unittest.TestCase): def testExtblob(self): """Test an image with an external blob""" - data = self._DoReadFile('157_blob_ext.dts') + data = self._DoReadFile('blob/ext.dts') self.assertEqual(REFCODE_DATA, data) def testExtblobMissing(self): """Test an image with a missing external blob""" with self.assertRaises(ValueError) as e: - self._DoReadFile('158_blob_ext_missing.dts') + self._DoReadFile('blob/ext_missing.dts') self.assertIn("Filename 'missing-file' not found in input path", str(e.exception)) def testExtblobMissingOk(self): """Test an image with an missing external blob that is allowed""" with terminal.capture() as (stdout, stderr): - ret = self._DoTestFile('158_blob_ext_missing.dts', + ret = self._DoTestFile('blob/ext_missing.dts', allow_missing=True) self.assertEqual(103, ret) err = stderr.getvalue()
@@ -3908,7 +3908,7 @@ class TestFunctional(unittest.TestCase): def testExtblobMissingOkFlag(self): """Test an image with an missing external blob allowed with -W""" with terminal.capture() as (stdout, stderr): - ret = self._DoTestFile('158_blob_ext_missing.dts', + ret = self._DoTestFile('blob/ext_missing.dts', allow_missing=True, ignore_missing=True) self.assertEqual(0, ret) err = stderr.getvalue()
@@ -3919,7 +3919,7 @@ class TestFunctional(unittest.TestCase): def testExtblobMissingOkSect(self): """Test an image with an missing external blob that is allowed""" with terminal.capture() as (stdout, stderr): - self._DoTestFile('159_blob_ext_missing_sect.dts', + self._DoTestFile('blob/ext_missing_sect.dts', allow_missing=True) err = stderr.getvalue() self.assertRegex(err, "Image 'image'.*missing.*: blob-ext blob-ext2")
@@ -4241,7 +4241,7 @@ class TestFunctional(unittest.TestCase): def testBlobNamedByArgMissing(self): """Test handling of a missing entry arg""" with self.assertRaises(ValueError) as e: - self._DoReadFile('068_blob_named_by_arg.dts') + self._DoReadFile('blob/named_by_arg.dts') self.assertIn("Missing required properties/entry args: cros-ec-rw-path", str(e.exception))
@@ -4415,7 +4415,7 @@ class TestFunctional(unittest.TestCase): def testMissingBlob(self): """Test handling of a blob containing a missing file""" with self.assertRaises(ValueError) as e: - self._DoTestFile('173_missing_blob.dts', allow_missing=True) + self._DoTestFile('blob/missing.dts', allow_missing=True) self.assertIn("Filename 'missing' not found in input path", str(e.exception))
@@ -5212,14 +5212,14 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testExtblobList(self): """Test an image with an external blob list""" - data = self._DoReadFileDtb('215_blob_ext_list.dts', + data = self._DoReadFileDtb('blob/ext_list.dts', allow_fake_blobs=False) self.assertEqual(REFCODE_DATA + FSP_M_DATA, data[0]) def testExtblobListMissing(self): """Test an image with a missing external blob""" with self.assertRaises(ValueError) as e: - self._DoReadFileDtb('216_blob_ext_list_missing.dts', + self._DoReadFileDtb('blob/ext_list_missing.dts', allow_fake_blobs=False) self.assertIn("Filename 'missing-file' not found in input path", str(e.exception))
@@ -5227,7 +5227,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testExtblobListMissingOk(self): """Test an image with an missing external blob that is allowed""" with terminal.capture() as (stdout, stderr): - self._DoTestFile('216_blob_ext_list_missing.dts', + self._DoTestFile('blob/ext_list_missing.dts', allow_missing=True, allow_fake_blobs=False) err = stderr.getvalue() self.assertRegex(err, "Image 'image'.*missing.*: blob-ext")
@@ -5441,7 +5441,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testFakeBlob(self): """Test handling of faking an external blob""" with terminal.capture() as (stdout, stderr): - self._DoTestFile('217_fake_blob.dts', allow_missing=True, + self._DoTestFile('blob/fake.dts', allow_missing=True, allow_fake_blobs=True) err = stderr.getvalue() self.assertRegex(
@@ -5451,7 +5451,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testExtblobListFaked(self): """Test an extblob with missing external blob that are faked""" with terminal.capture() as (stdout, stderr): - self._DoTestFile('216_blob_ext_list_missing.dts', + self._DoTestFile('blob/ext_list_missing.dts', allow_fake_blobs=True) err = stderr.getvalue() self.assertRegex(err, "Image 'image'.*faked.*: blob-ext-list")
@@ -6560,7 +6560,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testExtblobMissingOptional(self): """Test an image with an external blob that is optional""" with terminal.capture() as (stdout, stderr): - data = self._DoReadFileDtb('266_blob_ext_opt.dts', + data = self._DoReadFileDtb('blob/ext_opt.dts', allow_fake_blobs=False)[0] self.assertEqual(REFCODE_DATA, data) self.assertNotIn(MISSING_DATA, data)
@@ -6568,7 +6568,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testExtblobFakedOptional(self): """Test an image with an external blob that is optional""" with terminal.capture() as (stdout, stderr): - data = self._DoReadFile('266_blob_ext_opt.dts') + data = self._DoReadFile('blob/ext_opt.dts') self.assertEqual(REFCODE_DATA, data) err = stderr.getvalue() self.assertRegex(
@@ -6659,7 +6659,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap TestFunctional._MakeInputFile('blob_syms.bin', tools.read_file(self.ElfTestFile('blob_syms.bin'))) - data = self._DoReadFile('273_blob_symbol.dts') + data = self._DoReadFile('blob/symbol.dts') syms = elf.GetSymbols(elf_fname, ['binman', 'image']) addr = elf.GetSymbolAddress(elf_fname, '__my_start_sym')
tools/binman/test/blob/blob.dts renamed from tools/binman/test/023_blob.dts +0 -0
tools/binman/test/blob/ext.dts renamed from tools/binman/test/157_blob_ext.dts +0 -0
tools/binman/test/blob/ext_list.dts renamed from tools/binman/test/215_blob_ext_list.dts +0 -0
tools/binman/test/blob/ext_list_fake.dts renamed from tools/binman/test/218_blob_ext_list_fake.dts +0 -0
tools/binman/test/blob/ext_list_missing.dts renamed from tools/binman/test/216_blob_ext_list_missing.dts +0 -0
tools/binman/test/blob/ext_missing.dts renamed from tools/binman/test/158_blob_ext_missing.dts +0 -0
tools/binman/test/blob/ext_missing_sect.dts renamed from tools/binman/test/159_blob_ext_missing_sect.dts +0 -0
tools/binman/test/blob/ext_opt.dts renamed from tools/binman/test/266_blob_ext_opt.dts +0 -0
tools/binman/test/blob/fake.dts renamed from tools/binman/test/217_fake_blob.dts +0 -0
tools/binman/test/blob/missing.dts renamed from tools/binman/test/173_missing_blob.dts +0 -0
tools/binman/test/blob/named_by_arg.dts renamed from tools/binman/test/068_blob_named_by_arg.dts +0 -0
tools/binman/test/blob/symbol.dts renamed from tools/binman/test/273_blob_symbol.dts +0 -0
Signature · 1 line
2.43.0
Re: [RFC PATCH 06/16] binman: test: Move blob test files to test/blob/
Hi Simon,
Quoted 7 lines · Simon Glass
From: Simon Glass <[email protected]>
Move about a dozen test files for blob, blob-ext, blob-ext-list, fake-blob, and blob-symbol entries into a blob/ subdirectory. Drop the numeric prefixes and the redundant
blob_filename prefix, and update all references.
Thanks!
Quentin
RFC PATCH 7/16 binman: test: Move security test files to test/security/
In reply to Simon GlassFrom: Simon Glass <[email protected]>
Move about 20 test files for signing, encryption, hash, pre-load, x509, and Xilinx bootgen entries into a security/ subdirectory. Drop the numeric prefixes and update all references.
---
tools/binman/ftest.py | 52 +++++++++----------
.../encrypted_invalid_iv_file.dts} | 0
.../encrypted_key_file.dts} | 0
.../encrypted_key_source.dts} | 0
.../encrypted_missing_key.dts} | 0
.../encrypted_no_algo.dts} | 0
.../test/{090_hash.dts => security/hash.dts} | 0
.../hash_bad_algo.dts} | 0
.../hash_no_algo.dts} | 0
.../hash_section.dts} | 0
.../key_name_hint_dir_spl_pubkey_dtb.dts} | 0
.../pre_load.dts} | 0
.../pre_load_invalid_algo.dts} | 0
.../pre_load_invalid_key.dts} | 0
.../pre_load_invalid_padding.dts} | 0
.../pre_load_invalid_sha.dts} | 0
.../pre_load_pkcs.dts} | 0
.../pre_load_pss.dts} | 0
.../section_ignore_hash_signature.dts} | 0
.../sign_non_fit.dts} | 0
.../spl_pubkey_dtb.dts} | 0
.../x509_cert.dts} | 0
.../xilinx_bootgen_sign.dts} | 0
.../xilinx_bootgen_sign_enc.dts} | 0
24 files changed, 26 insertions(+), 26 deletions(-)
rename tools/binman/test/{302_encrypted_invalid_iv_file.dts => security/encrypted_invalid_iv_file.dts} (100%)
rename tools/binman/test/{305_encrypted_key_file.dts => security/encrypted_key_file.dts} (100%)
rename tools/binman/test/{304_encrypted_key_source.dts => security/encrypted_key_source.dts} (100%)
rename tools/binman/test/{303_encrypted_missing_key.dts => security/encrypted_missing_key.dts} (100%)
rename tools/binman/test/{301_encrypted_no_algo.dts => security/encrypted_no_algo.dts} (100%)
rename tools/binman/test/{090_hash.dts => security/hash.dts} (100%)
rename tools/binman/test/{092_hash_bad_algo.dts => security/hash_bad_algo.dts} (100%)
rename tools/binman/test/{091_hash_no_algo.dts => security/hash_no_algo.dts} (100%)
rename tools/binman/test/{099_hash_section.dts => security/hash_section.dts} (100%)
rename tools/binman/test/{356_key_name_hint_dir_spl_pubkey_dtb.dts => security/key_name_hint_dir_spl_pubkey_dtb.dts} (100%)
rename tools/binman/test/{230_pre_load.dts => security/pre_load.dts} (100%)
rename tools/binman/test/{235_pre_load_invalid_algo.dts => security/pre_load_invalid_algo.dts} (100%)
rename tools/binman/test/{236_pre_load_invalid_key.dts => security/pre_load_invalid_key.dts} (100%)
rename tools/binman/test/{233_pre_load_invalid_padding.dts => security/pre_load_invalid_padding.dts} (100%)
rename tools/binman/test/{234_pre_load_invalid_sha.dts => security/pre_load_invalid_sha.dts} (100%)
rename tools/binman/test/{231_pre_load_pkcs.dts => security/pre_load_pkcs.dts} (100%)
rename tools/binman/test/{232_pre_load_pss.dts => security/pre_load_pss.dts} (100%)
rename tools/binman/test/{165_section_ignore_hash_signature.dts => security/section_ignore_hash_signature.dts} (100%)
rename tools/binman/test/{281_sign_non_fit.dts => security/sign_non_fit.dts} (100%)
rename tools/binman/test/{306_spl_pubkey_dtb.dts => security/spl_pubkey_dtb.dts} (100%)
rename tools/binman/test/{279_x509_cert.dts => security/x509_cert.dts} (100%)
rename tools/binman/test/{307_xilinx_bootgen_sign.dts => security/xilinx_bootgen_sign.dts} (100%)
rename tools/binman/test/{308_xilinx_bootgen_sign_enc.dts => security/xilinx_bootgen_sign_enc.dts} (100%)tools/binman/ftest.py +26 -26
@@ -2261,7 +2261,7 @@ class TestFunctional(unittest.TestCase): def testHash(self): """Test hashing of the contents of an entry""" - _, _, _, out_dtb_fname = self._DoReadFileDtb('090_hash.dts', + _, _, _, out_dtb_fname = self._DoReadFileDtb('security/hash.dts', use_real_dtb=True, update_dtb=True) dtb = fdt.Fdt(out_dtb_fname) dtb.Scan()
@@ -2272,19 +2272,19 @@ class TestFunctional(unittest.TestCase): def testHashNoAlgo(self): with self.assertRaises(ValueError) as e: - self._DoReadFileDtb('091_hash_no_algo.dts', update_dtb=True) + self._DoReadFileDtb('security/hash_no_algo.dts', update_dtb=True) self.assertIn("Node \'/binman/u-boot\': Missing \'algo\' property for " 'hash node', str(e.exception)) def testHashBadAlgo(self): with self.assertRaises(ValueError) as e: - self._DoReadFileDtb('092_hash_bad_algo.dts', update_dtb=True) + self._DoReadFileDtb('security/hash_bad_algo.dts', update_dtb=True) self.assertIn("Node '/binman/u-boot': Unknown hash algorithm 'invalid'", str(e.exception)) def testHashSection(self): """Test hashing of the contents of an entry""" - _, _, _, out_dtb_fname = self._DoReadFileDtb('099_hash_section.dts', + _, _, _, out_dtb_fname = self._DoReadFileDtb('security/hash_section.dts', use_real_dtb=True, update_dtb=True) dtb = fdt.Fdt(out_dtb_fname) dtb.Scan()
@@ -4166,7 +4166,7 @@ class TestFunctional(unittest.TestCase): def testSectionIgnoreHashSignature(self): """Test that sections ignore hash, signature nodes for its data""" - data = self._DoReadFile('165_section_ignore_hash_signature.dts') + data = self._DoReadFile('security/section_ignore_hash_signature.dts') expected = (U_BOOT_DATA + U_BOOT_DATA) self.assertEqual(expected, data)
@@ -5822,7 +5822,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap 'pre-load-key-path': os.path.join(self._binman_dir, 'test'), } data = self._DoReadFileDtb( - '230_pre_load.dts', entry_args=entry_args, + 'security/pre_load.dts', entry_args=entry_args, extra_indirs=[os.path.join(self._binman_dir, 'test')])[0] image_fname = tools.get_output_filename('image.bin')
@@ -5836,7 +5836,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testPreLoadNoKey(self): """Test an image with a pre-load heade0r with missing key""" with self.assertRaises(FileNotFoundError) as exc: - self._DoReadFile('230_pre_load.dts') + self._DoReadFile('security/pre_load.dts') self.assertIn("No such file or directory: 'dev.key'", str(exc.exception))
@@ -5845,7 +5845,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap entry_args = { 'pre-load-key-path': os.path.join(self._binman_dir, 'test'), } - data = self._DoReadFileDtb('231_pre_load_pkcs.dts', + data = self._DoReadFileDtb('security/pre_load_pkcs.dts', entry_args=entry_args)[0] self.assertEqual(PRE_LOAD_MAGIC, data[:len(PRE_LOAD_MAGIC)]) self.assertEqual(PRE_LOAD_VERSION, data[4:4 + len(PRE_LOAD_VERSION)])
@@ -5856,7 +5856,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap entry_args = { 'pre-load-key-path': os.path.join(self._binman_dir, 'test'), } - data = self._DoReadFileDtb('232_pre_load_pss.dts', + data = self._DoReadFileDtb('security/pre_load_pss.dts', entry_args=entry_args)[0] self.assertEqual(PRE_LOAD_MAGIC, data[:len(PRE_LOAD_MAGIC)]) self.assertEqual(PRE_LOAD_VERSION, data[4:4 + len(PRE_LOAD_VERSION)])
@@ -5868,7 +5868,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap 'pre-load-key-path': os.path.join(self._binman_dir, 'test'), } with self.assertRaises(ValueError) as e: - self._DoReadFileDtb('233_pre_load_invalid_padding.dts', + self._DoReadFileDtb('security/pre_load_invalid_padding.dts', entry_args=entry_args) def testPreLoadInvalidSha(self):
@@ -5877,13 +5877,13 @@ fdt fdtmap Extract the devicetree blob from the fdtmap 'pre-load-key-path': os.path.join(self._binman_dir, 'test'), } with self.assertRaises(ValueError) as e: - self._DoReadFileDtb('234_pre_load_invalid_sha.dts', + self._DoReadFileDtb('security/pre_load_invalid_sha.dts', entry_args=entry_args) def testPreLoadInvalidAlgo(self): """Test an image with a pre-load header with an invalid algo""" with self.assertRaises(ValueError) as e: - data = self._DoReadFile('235_pre_load_invalid_algo.dts') + data = self._DoReadFile('security/pre_load_invalid_algo.dts') def testPreLoadInvalidKey(self): """Test an image with a pre-load header with an invalid key"""
@@ -5891,7 +5891,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap 'pre-load-key-path': os.path.join(self._binman_dir, 'test'), } with self.assertRaises(ValueError) as e: - data = self._DoReadFileDtb('236_pre_load_invalid_key.dts', + data = self._DoReadFileDtb('security/pre_load_invalid_key.dts', entry_args=entry_args) def _CheckSafeUniqueNames(self, *images):
@@ -6863,7 +6863,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap entry_args = { 'keyfile': keyfile, } - data = self._DoReadFileDtb('279_x509_cert.dts', + data = self._DoReadFileDtb('security/x509_cert.dts', entry_args=entry_args)[0] cert = data[:-4] self.assertEqual(U_BOOT_DATA, data[-4:])
@@ -6877,7 +6877,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap 'keyfile': 'keyfile', } with terminal.capture() as (_, stderr): - self._DoTestFile('279_x509_cert.dts', + self._DoTestFile('security/x509_cert.dts', force_missing_bintools='openssl', entry_args=entry_args) err = stderr.getvalue()
@@ -6963,7 +6963,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap """Test a non-FIT entry cannot be signed""" is_signed = False fit, fname, private_key, _ = self._PrepareSignEnv( - '281_sign_non_fit.dts') + 'security/sign_non_fit.dts') # do sign with private key with self.assertRaises(ValueError) as e:
@@ -7272,7 +7272,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testEncryptedNoAlgo(self): """Test encrypted node with missing required properties""" with self.assertRaises(ValueError) as e: - self._DoReadFileDtb('301_encrypted_no_algo.dts') + self._DoReadFileDtb('security/encrypted_no_algo.dts') self.assertIn( "Node '/binman/fit/images/u-boot/encrypted': 'encrypted' entry is missing properties: algo iv-filename", str(e.exception))
@@ -7280,21 +7280,21 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testEncryptedInvalidIvfile(self): """Test encrypted node with invalid iv file""" with self.assertRaises(ValueError) as e: - self._DoReadFileDtb('302_encrypted_invalid_iv_file.dts') + self._DoReadFileDtb('security/encrypted_invalid_iv_file.dts') self.assertIn("Filename 'invalid-iv-file' not found in input path", str(e.exception)) def testEncryptedMissingKey(self): """Test encrypted node with missing key properties""" with self.assertRaises(ValueError) as e: - self._DoReadFileDtb('303_encrypted_missing_key.dts') + self._DoReadFileDtb('security/encrypted_missing_key.dts') self.assertIn( "Node '/binman/fit/images/u-boot/encrypted': Provide either 'key-filename' or 'key-source'", str(e.exception)) def testEncryptedKeySource(self): """Test encrypted node with key-source property""" - data = self._DoReadFileDtb('304_encrypted_key_source.dts')[0] + data = self._DoReadFileDtb('security/encrypted_key_source.dts')[0] dtb = fdt.Fdt.FromData(data) dtb.Scan()
@@ -7308,7 +7308,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testEncryptedKeyFile(self): """Test encrypted node with key-filename property""" - data = self._DoReadFileDtb('305_encrypted_key_file.dts')[0] + data = self._DoReadFileDtb('security/encrypted_key_file.dts')[0] dtb = fdt.Fdt.FromData(data) dtb.Scan()
@@ -7324,7 +7324,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testKeyNameHintIsPathSplPubkeyDtb(self): """Test that binman errors out on key-name-hint being a path""" with self.assertRaises(ValueError) as e: - self._DoReadFile('356_key_name_hint_dir_spl_pubkey_dtb.dts') + self._DoReadFile('security/key_name_hint_dir_spl_pubkey_dtb.dts') self.assertIn( 'Node \'/binman/u-boot-spl-pubkey-dtb\': \'keys/key\' is a path not a filename', str(e.exception))
@@ -7333,7 +7333,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap """Test u_boot_spl_pubkey_dtb etype""" data = tools.read_file(self.TestFile("key.pem")) self._MakeInputFile("key.crt", data) - self._DoReadFileRealDtb('306_spl_pubkey_dtb.dts') + self._DoReadFileRealDtb('security/spl_pubkey_dtb.dts') image = control.images['image'] entries = image.GetEntries() dtb_entry = entries['u-boot-spl-pubkey-dtb']
@@ -7358,7 +7358,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap self._MakeInputFile("ssk.pem", data) self._SetupPmuFwlElf() self._SetupSplElf() - self._DoReadFileRealDtb('307_xilinx_bootgen_sign.dts') + self._DoReadFileRealDtb('security/xilinx_bootgen_sign.dts') image_fname = tools.get_output_filename('image.bin') # Read partition header table and check if authentication is enabled
@@ -7387,7 +7387,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap self._MakeInputFile("ssk.pem", data) self._SetupPmuFwlElf() self._SetupSplElf() - self._DoReadFileRealDtb('308_xilinx_bootgen_sign_enc.dts') + self._DoReadFileRealDtb('security/xilinx_bootgen_sign_enc.dts') image_fname = tools.get_output_filename('image.bin') # Read boot header in order to verify encryption source and
@@ -7420,7 +7420,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap self._SetupPmuFwlElf() self._SetupSplElf() with terminal.capture() as (_, stderr): - self._DoTestFile('307_xilinx_bootgen_sign.dts', + self._DoTestFile('security/xilinx_bootgen_sign.dts', force_missing_bintools='bootgen') err = stderr.getvalue() self.assertRegex(err,
tools/binman/test/security/encrypted_invalid_iv_file.dts renamed from tools/binman/test/302_encrypted_invalid_iv_file.dts +0 -0
tools/binman/test/security/encrypted_key_file.dts renamed from tools/binman/test/305_encrypted_key_file.dts +0 -0
tools/binman/test/security/encrypted_key_source.dts renamed from tools/binman/test/304_encrypted_key_source.dts +0 -0
tools/binman/test/security/encrypted_missing_key.dts renamed from tools/binman/test/303_encrypted_missing_key.dts +0 -0
tools/binman/test/security/encrypted_no_algo.dts renamed from tools/binman/test/301_encrypted_no_algo.dts +0 -0
tools/binman/test/security/hash.dts renamed from tools/binman/test/090_hash.dts +0 -0
tools/binman/test/security/hash_bad_algo.dts renamed from tools/binman/test/092_hash_bad_algo.dts +0 -0
tools/binman/test/security/hash_no_algo.dts renamed from tools/binman/test/091_hash_no_algo.dts +0 -0
tools/binman/test/security/hash_section.dts renamed from tools/binman/test/099_hash_section.dts +0 -0
tools/binman/test/security/key_name_hint_dir_spl_pubkey_dtb.dts renamed from tools/binman/test/356_key_name_hint_dir_spl_pubkey_dtb.dts +0 -0
tools/binman/test/security/pre_load.dts renamed from tools/binman/test/230_pre_load.dts +0 -0
tools/binman/test/security/pre_load_invalid_algo.dts renamed from tools/binman/test/235_pre_load_invalid_algo.dts +0 -0
tools/binman/test/security/pre_load_invalid_key.dts renamed from tools/binman/test/236_pre_load_invalid_key.dts +0 -0
tools/binman/test/security/pre_load_invalid_padding.dts renamed from tools/binman/test/233_pre_load_invalid_padding.dts +0 -0
tools/binman/test/security/pre_load_invalid_sha.dts renamed from tools/binman/test/234_pre_load_invalid_sha.dts +0 -0
tools/binman/test/security/pre_load_pkcs.dts renamed from tools/binman/test/231_pre_load_pkcs.dts +0 -0
tools/binman/test/security/pre_load_pss.dts renamed from tools/binman/test/232_pre_load_pss.dts +0 -0
tools/binman/test/security/section_ignore_hash_signature.dts renamed from tools/binman/test/165_section_ignore_hash_signature.dts +0 -0
tools/binman/test/security/sign_non_fit.dts renamed from tools/binman/test/281_sign_non_fit.dts +0 -0
tools/binman/test/security/spl_pubkey_dtb.dts renamed from tools/binman/test/306_spl_pubkey_dtb.dts +0 -0
tools/binman/test/security/x509_cert.dts renamed from tools/binman/test/279_x509_cert.dts +0 -0
tools/binman/test/security/xilinx_bootgen_sign.dts renamed from tools/binman/test/307_xilinx_bootgen_sign.dts +0 -0
tools/binman/test/security/xilinx_bootgen_sign_enc.dts renamed from tools/binman/test/308_xilinx_bootgen_sign_enc.dts +0 -0
Signature · 1 line
2.43.0
Re: [RFC PATCH 07/16] binman: test: Move security test files to test/security/
Hi Simon,
Quoted 6 lines · Simon Glass
From: Simon Glass <[email protected]>
Move about 20 test files for signing, encryption, hash, pre-load, x509, and Xilinx bootgen entries into a
security/subdirectory. Drop the numeric prefixes and update all references.
What about key.key, key.pem, dev.key (seems shared with tests in fit/ but duplication/symlink should be fine I guess?)?
In a separate commit though.
Quoted 28 lines
Signed-off-by Simon Glass <[email protected]>---
tools/binman/ftest.py | 52 +++++++++---------- .../encrypted_invalid_iv_file.dts} | 0 .../encrypted_key_file.dts} | 0 .../encrypted_key_source.dts} | 0 .../encrypted_missing_key.dts} | 0 .../encrypted_no_algo.dts} | 0 .../test/{090_hash.dts => security/hash.dts} | 0 .../hash_bad_algo.dts} | 0 .../hash_no_algo.dts} | 0 .../hash_section.dts} | 0 .../key_name_hint_dir_spl_pubkey_dtb.dts} | 0 .../pre_load.dts} | 0 .../pre_load_invalid_algo.dts} | 0 .../pre_load_invalid_key.dts} | 0 .../pre_load_invalid_padding.dts} | 0 .../pre_load_invalid_sha.dts} | 0 .../pre_load_pkcs.dts} | 0 .../pre_load_pss.dts} | 0 .../section_ignore_hash_signature.dts} | 0 .../sign_non_fit.dts} | 0 .../spl_pubkey_dtb.dts} | 0 .../x509_cert.dts} | 0 .../xilinx_bootgen_sign.dts} | 0 .../xilinx_bootgen_sign_enc.dts} | 0 24 files changed, 26 insertions(+), 26 deletions(-)
Quoted 10 lines
rename
tools/binman/test/{302_encrypted_invalid_iv_file.dts=>security/encrypted_invalid_iv_file.dts} (100%) renametools/binman/test/{305_encrypted_key_file.dts=>security/encrypted_key_file.dts} (100%)
renametools/binman/test/{304_encrypted_key_source.dts=>security/encrypted_key_source.dts} (100%) renametools/binman/test/{303_encrypted_missing_key.dts=>security/encrypted_missing_key.dts} (100%) renametools/binman/test/{301_encrypted_no_algo.dts=>security/encrypted_no_algo.dts} (100%)
renametools/binman/test/{090_hash.dts=>security/hash.dts} (100%)
renametools/binman/test/{092_hash_bad_algo.dts=>security/hash_bad_algo.dts} (100%)
renametools/binman/test/{091_hash_no_algo.dts=>security/hash_no_algo.dts} (100%)
renametools/binman/test/{099_hash_section.dts=>security/hash_section.dts} (100%)
renametools/binman/test/{356_key_name_hint_dir_spl_pubkey_dtb.dts=>security/key_name_hint_dir_spl_pubkey_dtb.dts} (100%)
This also depends on https://lore.kernel.org/u-boot/[email protected]/.
Cheers,
Quentin
RFC PATCH 8/16 binman: test: Move CBFS test files to test/cbfs/
In reply to Simon GlassFrom: Simon Glass <[email protected]>
Move about a dozen test files for Coreboot File System entries into a cbfs/ subdirectory. Drop the numeric prefixes and the redundant cbfs_ filename prefix, and update all references.
---
tools/binman/ftest.py | 28 +++++++++----------
.../bad_arch.dts} | 0
.../bad_compress.dts} | 0
.../bad_type.dts} | 0
.../test/{110_cbfs_name.dts => cbfs/name.dts} | 0
.../no_contents.dts} | 0
.../no_size.dts} | 0
.../{114_cbfs_offset.dts => cbfs/offset.dts} | 0
.../test/{102_cbfs_raw.dts => cbfs/raw.dts} | 0
.../raw_compress.dts} | 0
.../raw_ppc.dts} | 0
.../replace.dts} | 0
.../{104_cbfs_stage.dts => cbfs/stage.dts} | 0
.../{125_cbfs_update.dts => cbfs/update.dts} | 0
14 files changed, 14 insertions(+), 14 deletions(-)
rename tools/binman/test/{106_cbfs_bad_arch.dts => cbfs/bad_arch.dts} (100%)
rename tools/binman/test/{109_cbfs_bad_compress.dts => cbfs/bad_compress.dts} (100%)
rename tools/binman/test/{126_cbfs_bad_type.dts => cbfs/bad_type.dts} (100%)
rename tools/binman/test/{110_cbfs_name.dts => cbfs/name.dts} (100%)
rename tools/binman/test/{108_cbfs_no_contents.dts => cbfs/no_contents.dts} (100%)
rename tools/binman/test/{107_cbfs_no_size.dts => cbfs/no_size.dts} (100%)
rename tools/binman/test/{114_cbfs_offset.dts => cbfs/offset.dts} (100%)
rename tools/binman/test/{102_cbfs_raw.dts => cbfs/raw.dts} (100%)
rename tools/binman/test/{105_cbfs_raw_compress.dts => cbfs/raw_compress.dts} (100%)
rename tools/binman/test/{103_cbfs_raw_ppc.dts => cbfs/raw_ppc.dts} (100%)
rename tools/binman/test/{142_replace_cbfs.dts => cbfs/replace.dts} (100%)
rename tools/binman/test/{104_cbfs_stage.dts => cbfs/stage.dts} (100%)
rename tools/binman/test/{125_cbfs_update.dts => cbfs/update.dts} (100%)tools/binman/ftest.py +14 -14
@@ -2432,7 +2432,7 @@ class TestFunctional(unittest.TestCase): cbfs_util_test.py. The tests here merely check that the files added to the CBFS can be found in the final image. """ - data = self._DoReadFile('102_cbfs_raw.dts') + data = self._DoReadFile('cbfs/raw.dts') size = 0xb0 cbfs = cbfs_util.CbfsReader(data)
@@ -2444,7 +2444,7 @@ class TestFunctional(unittest.TestCase): def testCbfsArch(self): """Test on non-x86 architecture""" - data = self._DoReadFile('103_cbfs_raw_ppc.dts') + data = self._DoReadFile('cbfs/raw_ppc.dts') size = 0x100 cbfs = cbfs_util.CbfsReader(data)
@@ -2462,7 +2462,7 @@ class TestFunctional(unittest.TestCase): elf.MakeElf(elf_fname, U_BOOT_DATA, U_BOOT_DTB_DATA) size = 0xb0 - data = self._DoReadFile('104_cbfs_stage.dts') + data = self._DoReadFile('cbfs/stage.dts') cbfs = cbfs_util.CbfsReader(data) self.assertEqual(size, cbfs.rom_size)
@@ -2473,7 +2473,7 @@ class TestFunctional(unittest.TestCase): def testCbfsRawCompress(self): """Test handling of compressing raw files""" self._CheckLz4() - data = self._DoReadFile('105_cbfs_raw_compress.dts') + data = self._DoReadFile('cbfs/raw_compress.dts') size = 0x140 cbfs = cbfs_util.CbfsReader(data)
@@ -2484,32 +2484,32 @@ class TestFunctional(unittest.TestCase): def testCbfsBadArch(self): """Test handling of a bad architecture""" with self.assertRaises(ValueError) as e: - self._DoReadFile('106_cbfs_bad_arch.dts') + self._DoReadFile('cbfs/bad_arch.dts') self.assertIn("Invalid architecture 'bad-arch'", str(e.exception)) def testCbfsNoSize(self): """Test handling of a missing size property""" with self.assertRaises(ValueError) as e: - self._DoReadFile('107_cbfs_no_size.dts') + self._DoReadFile('cbfs/no_size.dts') self.assertIn('entry must have a size property', str(e.exception)) def testCbfsNoContents(self): """Test handling of a CBFS entry which does not provide contentsy""" with self.assertRaises(ValueError) as e: - self._DoReadFile('108_cbfs_no_contents.dts') + self._DoReadFile('cbfs/no_contents.dts') self.assertIn('Could not complete processing of contents', str(e.exception)) def testCbfsBadCompress(self): """Test handling of a bad architecture""" with self.assertRaises(ValueError) as e: - self._DoReadFile('109_cbfs_bad_compress.dts') + self._DoReadFile('cbfs/bad_compress.dts') self.assertIn("Invalid compression in 'u-boot': 'invalid-algo'", str(e.exception)) def testCbfsNamedEntries(self): """Test handling of named entries""" - data = self._DoReadFile('110_cbfs_name.dts') + data = self._DoReadFile('cbfs/name.dts') cbfs = cbfs_util.CbfsReader(data) self.assertIn('FRED', cbfs.files)
@@ -2589,7 +2589,7 @@ class TestFunctional(unittest.TestCase): Like all CFBS tests, this is just checking the logic that calls cbfs_util. See cbfs_util_test for fully tests (e.g. test_cbfs_offset()). """ - data = self._DoReadFile('114_cbfs_offset.dts') + data = self._DoReadFile('cbfs/offset.dts') size = 0x200 cbfs = cbfs_util.CbfsReader(data)
@@ -2731,7 +2731,7 @@ class TestFunctional(unittest.TestCase): def testCbfsUpdateFdt(self): """Test that we can update the device tree with CBFS offset/size info""" self._CheckLz4() - data, _, _, out_dtb_fname = self._DoReadFileDtb('125_cbfs_update.dts', + data, _, _, out_dtb_fname = self._DoReadFileDtb('cbfs/update.dts', update_dtb=True) dtb = fdt.Fdt(out_dtb_fname) dtb.Scan()
@@ -2755,7 +2755,7 @@ class TestFunctional(unittest.TestCase): def testCbfsBadType(self): """Test an image header with a no specified location is detected""" with self.assertRaises(ValueError) as e: - self._DoReadFile('126_cbfs_bad_type.dts') + self._DoReadFile('cbfs/bad_type.dts') self.assertIn("Unknown cbfs-type 'badtype'", str(e.exception)) def testList(self):
@@ -3565,7 +3565,7 @@ class TestFunctional(unittest.TestCase): """Test replacing a single file in CBFS without changing the size""" self._CheckLz4() expected = b'x' * len(U_BOOT_DATA) - data = self._DoReadFileRealDtb('142_replace_cbfs.dts') + data = self._DoReadFileRealDtb('cbfs/replace.dts') updated_fname = tools.get_output_filename('image-updated.bin') tools.write_file(updated_fname, data) entry_name = 'section/cbfs/u-boot'
@@ -3578,7 +3578,7 @@ class TestFunctional(unittest.TestCase): """Test replacing a single file in CBFS with one of a different size""" self._CheckLz4() expected = U_BOOT_DATA + b'x' - data = self._DoReadFileRealDtb('142_replace_cbfs.dts') + data = self._DoReadFileRealDtb('cbfs/replace.dts') updated_fname = tools.get_output_filename('image-updated.bin') tools.write_file(updated_fname, data) entry_name = 'section/cbfs/u-boot'
tools/binman/test/cbfs/bad_arch.dts renamed from tools/binman/test/106_cbfs_bad_arch.dts +0 -0
tools/binman/test/cbfs/bad_compress.dts renamed from tools/binman/test/109_cbfs_bad_compress.dts +0 -0
tools/binman/test/cbfs/bad_type.dts renamed from tools/binman/test/126_cbfs_bad_type.dts +0 -0
tools/binman/test/cbfs/name.dts renamed from tools/binman/test/110_cbfs_name.dts +0 -0
tools/binman/test/cbfs/no_contents.dts renamed from tools/binman/test/108_cbfs_no_contents.dts +0 -0
tools/binman/test/cbfs/no_size.dts renamed from tools/binman/test/107_cbfs_no_size.dts +0 -0
tools/binman/test/cbfs/offset.dts renamed from tools/binman/test/114_cbfs_offset.dts +0 -0
tools/binman/test/cbfs/raw.dts renamed from tools/binman/test/102_cbfs_raw.dts +0 -0
tools/binman/test/cbfs/raw_compress.dts renamed from tools/binman/test/105_cbfs_raw_compress.dts +0 -0
tools/binman/test/cbfs/raw_ppc.dts renamed from tools/binman/test/103_cbfs_raw_ppc.dts +0 -0
tools/binman/test/cbfs/replace.dts renamed from tools/binman/test/142_replace_cbfs.dts +0 -0
tools/binman/test/cbfs/stage.dts renamed from tools/binman/test/104_cbfs_stage.dts +0 -0
tools/binman/test/cbfs/update.dts renamed from tools/binman/test/125_cbfs_update.dts +0 -0
Signature · 1 line
2.43.0
Re: [RFC PATCH 08/16] binman: test: Move CBFS test files to test/cbfs/
Hi Simon,
Quoted 6 lines · Simon Glass
From: Simon Glass <[email protected]>
Move about a dozen test files for Coreboot File System entries into a cbfs/ subdirectory. Drop the numeric prefixes and the redundant
cbfs_filename prefix, and update all references.
Thanks!
Quentin
RFC PATCH 9/16 binman: test: Move ChromeOS test files to test/cros/
In reply to Simon GlassFrom: Simon Glass <[email protected]>
Move about 10 test files for ChromeOS entries (GBB, vblock, FMAP) into a cros/ subdirectory. Drop the numeric prefixes and update all references.
---
doc/develop/binman_tests.rst | 2 +-
tools/binman/ftest.py | 22 +++++++++----------
.../test/{067_fmap.dts => cros/fmap.dts} | 0
.../binman/test/{071_gbb.dts => cros/gbb.dts} | 0
.../gbb_no_size.dts} | 0
.../gbb_too_small.dts} | 0
.../test/{074_vblock.dts => cros/vblock.dts} | 0
.../vblock_bad_entry.dts} | 0
.../vblock_bad_phandle.dts} | 0
.../vblock_content.dts} | 0
.../vblock_no_content.dts} | 0
11 files changed, 12 insertions(+), 12 deletions(-)
rename tools/binman/test/{067_fmap.dts => cros/fmap.dts} (100%)
rename tools/binman/test/{071_gbb.dts => cros/gbb.dts} (100%)
rename tools/binman/test/{073_gbb_no_size.dts => cros/gbb_no_size.dts} (100%)
rename tools/binman/test/{072_gbb_too_small.dts => cros/gbb_too_small.dts} (100%)
rename tools/binman/test/{074_vblock.dts => cros/vblock.dts} (100%)
rename tools/binman/test/{077_vblock_bad_entry.dts => cros/vblock_bad_entry.dts} (100%)
rename tools/binman/test/{076_vblock_bad_phandle.dts => cros/vblock_bad_phandle.dts} (100%)
rename tools/binman/test/{189_vblock_content.dts => cros/vblock_content.dts} (100%)
rename tools/binman/test/{075_vblock_no_content.dts => cros/vblock_no_content.dts} (100%)doc/develop/binman_tests.rst +1 -1
@@ -436,7 +436,7 @@ correct. You can to this with ``terminal.capture()``, for example: .. code-block:: python with terminal.capture() as (_, stderr): - self._DoTestFile('071_gbb.dts', force_missing_bintools='futility', + self._DoTestFile('cros/gbb.dts', force_missing_bintools='futility', entry_args=entry_args) err = stderr.getvalue() self.assertRegex(err, "Image 'image'.*missing bintools.*: futility")
tools/binman/ftest.py +11 -11
@@ -1816,7 +1816,7 @@ class TestFunctional(unittest.TestCase): def testFmap(self): """Basic test of generation of a flashrom fmap""" - data = self._DoReadFile('067_fmap.dts') + data = self._DoReadFile('cros/fmap.dts') fhdr, fentries = fmap_util.DecodeFmap(data[32:]) expected = (U_BOOT_DATA + tools.get_bytes(ord('!'), 12) + U_BOOT_DATA + tools.get_bytes(ord('a'), 12))
@@ -1898,7 +1898,7 @@ class TestFunctional(unittest.TestCase): 'keydir': 'devkeys', 'bmpblk': 'bmpblk.bin', } - data, _, _, _ = self._DoReadFileDtb('071_gbb.dts', entry_args=entry_args) + data, _, _, _ = self._DoReadFileDtb('cros/gbb.dts', entry_args=entry_args) # Since futility expected = (GBB_DATA + GBB_DATA + tools.get_bytes(0, 8) +
@@ -1908,14 +1908,14 @@ class TestFunctional(unittest.TestCase): def testGbbTooSmall(self): """Test for the Chromium OS Google Binary Block being large enough""" with self.assertRaises(ValueError) as e: - self._DoReadFileDtb('072_gbb_too_small.dts') + self._DoReadFileDtb('cros/gbb_too_small.dts') self.assertIn("Node '/binman/gbb': GBB is too small", str(e.exception)) def testGbbNoSize(self): """Test for the Chromium OS Google Binary Block having a size""" with self.assertRaises(ValueError) as e: - self._DoReadFileDtb('073_gbb_no_size.dts') + self._DoReadFileDtb('cros/gbb_no_size.dts') self.assertIn("Node '/binman/gbb': GBB must have a fixed size", str(e.exception))
@@ -1925,7 +1925,7 @@ class TestFunctional(unittest.TestCase): 'keydir': 'devkeys', } with terminal.capture() as (_, stderr): - self._DoTestFile('071_gbb.dts', force_missing_bintools='futility', + self._DoTestFile('cros/gbb.dts', force_missing_bintools='futility', entry_args=entry_args) err = stderr.getvalue() self.assertRegex(err, "Image 'image'.*missing bintools.*: futility")
@@ -1966,7 +1966,7 @@ class TestFunctional(unittest.TestCase): entry_args = { 'keydir': 'devkeys', } - data, _, _, _ = self._DoReadFileDtb('074_vblock.dts', + data, _, _, _ = self._DoReadFileDtb('cros/vblock.dts', entry_args=entry_args) expected = U_BOOT_DATA + VBLOCK_DATA + U_BOOT_DTB_DATA self.assertEqual(expected, data)
@@ -1974,21 +1974,21 @@ class TestFunctional(unittest.TestCase): def testVblockNoContent(self): """Test we detect a vblock which has no content to sign""" with self.assertRaises(ValueError) as e: - self._DoReadFile('075_vblock_no_content.dts') + self._DoReadFile('cros/vblock_no_content.dts') self.assertIn("Node '/binman/vblock': Collection must have a 'content' " 'property', str(e.exception)) def testVblockBadPhandle(self): """Test that we detect a vblock with an invalid phandle in contents""" with self.assertRaises(ValueError) as e: - self._DoReadFile('076_vblock_bad_phandle.dts') + self._DoReadFile('cros/vblock_bad_phandle.dts') self.assertIn("Node '/binman/vblock': Cannot find node for phandle " '1000', str(e.exception)) def testVblockBadEntry(self): """Test that we detect an entry that points to a non-entry""" with self.assertRaises(ValueError) as e: - self._DoReadFile('077_vblock_bad_entry.dts') + self._DoReadFile('cros/vblock_bad_entry.dts') self.assertIn("Node '/binman/vblock': Cannot find entry for node " "'other'", str(e.exception))
@@ -2000,7 +2000,7 @@ class TestFunctional(unittest.TestCase): 'keydir': 'devkeys', } data = self._DoReadFileDtb( - '189_vblock_content.dts', use_real_dtb=True, update_dtb=True, + 'cros/vblock_content.dts', use_real_dtb=True, update_dtb=True, entry_args=entry_args)[0] hashlen = 32 # SHA256 hash is 32 bytes self.assertEqual(U_BOOT_DATA, data[:len(U_BOOT_DATA)])
@@ -2021,7 +2021,7 @@ class TestFunctional(unittest.TestCase): 'keydir': 'devkeys', } with terminal.capture() as (_, stderr): - self._DoTestFile('074_vblock.dts', + self._DoTestFile('cros/vblock.dts', force_missing_bintools='futility', entry_args=entry_args) err = stderr.getvalue()
tools/binman/test/cros/fmap.dts renamed from tools/binman/test/067_fmap.dts +0 -0
tools/binman/test/cros/gbb.dts renamed from tools/binman/test/071_gbb.dts +0 -0
tools/binman/test/cros/gbb_no_size.dts renamed from tools/binman/test/073_gbb_no_size.dts +0 -0
tools/binman/test/cros/gbb_too_small.dts renamed from tools/binman/test/072_gbb_too_small.dts +0 -0
tools/binman/test/cros/vblock.dts renamed from tools/binman/test/074_vblock.dts +0 -0
tools/binman/test/cros/vblock_bad_entry.dts renamed from tools/binman/test/077_vblock_bad_entry.dts +0 -0
tools/binman/test/cros/vblock_bad_phandle.dts renamed from tools/binman/test/076_vblock_bad_phandle.dts +0 -0
tools/binman/test/cros/vblock_content.dts renamed from tools/binman/test/189_vblock_content.dts +0 -0
tools/binman/test/cros/vblock_no_content.dts renamed from tools/binman/test/075_vblock_no_content.dts +0 -0
Signature · 1 line
2.43.0
Re: [RFC PATCH 09/16] binman: test: Move ChromeOS test files to test/cros/
Hi Simon,
Quoted 6 lines · Simon Glass
From: Simon Glass <[email protected]>
Move about 10 test files for ChromeOS entries (GBB, vblock, FMAP) into a cros/ subdirectory. Drop the numeric prefixes and update all references.
Thanks!
Quentin
RFC PATCH 10/16 binman: test: Move mkimage test files to test/mkimage/
In reply to Simon GlassFrom: Simon Glass <[email protected]>
Move about a dozen test files for mkimage entries into a mkimage/ subdirectory. Drop the numeric prefixes and the redundant mkimage_ filename prefix, and update all references.
---
tools/binman/ftest.py | 32 +++++++++----------
.../coll.dts} | 0
.../filename.dts} | 0
.../image.dts} | 0
.../image_bad.dts} | 0
.../image_no_content.dts} | 0
.../missing.dts} | 0
.../missing_multiple.dts} | 0
.../{156_mkimage.dts => mkimage/mkimage.dts} | 0
.../mult_data.dts} | 0
.../mult_no_content.dts} | 0
.../name.dts} | 0
.../special.dts} | 0
.../{290_mkimage_sym.dts => mkimage/sym.dts} | 0
14 files changed, 16 insertions(+), 16 deletions(-)
rename tools/binman/test/{247_mkimage_coll.dts => mkimage/coll.dts} (100%)
rename tools/binman/test/{254_mkimage_filename.dts => mkimage/filename.dts} (100%)
rename tools/binman/test/{243_mkimage_image.dts => mkimage/image.dts} (100%)
rename tools/binman/test/{245_mkimage_image_bad.dts => mkimage/image_bad.dts} (100%)
rename tools/binman/test/{244_mkimage_image_no_content.dts => mkimage/image_no_content.dts} (100%)
rename tools/binman/test/{229_mkimage_missing.dts => mkimage/missing.dts} (100%)
rename tools/binman/test/{292_mkimage_missing_multiple.dts => mkimage/missing_multiple.dts} (100%)
rename tools/binman/test/{156_mkimage.dts => mkimage/mkimage.dts} (100%)
rename tools/binman/test/{252_mkimage_mult_data.dts => mkimage/mult_data.dts} (100%)
rename tools/binman/test/{253_mkimage_mult_no_content.dts => mkimage/mult_no_content.dts} (100%)
rename tools/binman/test/{242_mkimage_name.dts => mkimage/name.dts} (100%)
rename tools/binman/test/{283_mkimage_special.dts => mkimage/special.dts} (100%)
rename tools/binman/test/{290_mkimage_sym.dts => mkimage/sym.dts} (100%)tools/binman/ftest.py +16 -16
@@ -3868,7 +3868,7 @@ class TestFunctional(unittest.TestCase): def testMkimage(self): """Test using mkimage to build an image""" self._SetupSplElf() - data = self._DoReadFile('156_mkimage.dts') + data = self._DoReadFile('mkimage/mkimage.dts') # Just check that the data appears in the file somewhere self.assertIn(U_BOOT_SPL_DATA, data)
@@ -3877,7 +3877,7 @@ class TestFunctional(unittest.TestCase): """Test that binman still produces an image if mkimage is missing""" self._SetupSplElf() with terminal.capture() as (_, stderr): - self._DoTestFile('156_mkimage.dts', + self._DoTestFile('mkimage/mkimage.dts', force_missing_bintools='mkimage') err = stderr.getvalue() self.assertRegex(err, "Image 'image'.*missing bintools.*: mkimage")
@@ -5809,7 +5809,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testMkimageMissingBlob(self): """Test using mkimage to build an image""" with terminal.capture() as (stdout, stderr): - self._DoTestFile('229_mkimage_missing.dts', allow_missing=True, + self._DoTestFile('mkimage/missing.dts', allow_missing=True, allow_fake_blobs=True) err = stderr.getvalue() self.assertRegex(
@@ -6118,7 +6118,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testMkimageImagename(self): """Test using mkimage with -n holding the data too""" self._SetupSplElf() - data = self._DoReadFile('242_mkimage_name.dts') + data = self._DoReadFile('mkimage/name.dts') # Check that the data appears in the file somewhere self.assertIn(U_BOOT_SPL_DATA, data)
@@ -6136,7 +6136,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testMkimageImage(self): """Test using mkimage with -n holding the data too""" self._SetupSplElf() - data = self._DoReadFile('243_mkimage_image.dts') + data = self._DoReadFile('mkimage/image.dts') # Check that the data appears in the file somewhere self.assertIn(U_BOOT_SPL_DATA, data)
@@ -6158,7 +6158,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap """Test using mkimage with -n and no data""" self._SetupSplElf() with self.assertRaises(ValueError) as exc: - self._DoReadFile('244_mkimage_image_no_content.dts') + self._DoReadFile('mkimage/image_no_content.dts') self.assertIn('Could not complete processing of contents', str(exc.exception))
@@ -6166,7 +6166,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap """Test using mkimage with imagename node and data-to-imagename""" self._SetupSplElf() with self.assertRaises(ValueError) as exc: - self._DoReadFile('245_mkimage_image_bad.dts') + self._DoReadFile('mkimage/image_bad.dts') self.assertIn('Cannot use both imagename node and data-to-imagename', str(exc.exception))
@@ -6181,7 +6181,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testMkimageCollection(self): """Test using a collection referring to an entry in a mkimage entry""" self._SetupSplElf() - data = self._DoReadFile('247_mkimage_coll.dts') + data = self._DoReadFile('mkimage/coll.dts') expect = U_BOOT_SPL_DATA + U_BOOT_DATA self.assertEqual(expect, data[:len(expect)])
@@ -6269,7 +6269,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap """Test passing multiple files to mkimage in a mkimage entry""" self._SetupSplElf() self._SetupTplElf() - data = self._DoReadFile('252_mkimage_mult_data.dts') + data = self._DoReadFile('mkimage/mult_data.dts') # Size of files are packed in their 4B big-endian format expect = struct.pack('>I', len(U_BOOT_TPL_DATA)) expect += struct.pack('>I', len(U_BOOT_SPL_DATA))
@@ -6291,7 +6291,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap 'spl-bss-pad': 'y', 'spl-dtb': 'y', } - data = self._DoReadFileDtb('252_mkimage_mult_data.dts', + data = self._DoReadFileDtb('mkimage/mult_data.dts', use_expanded=True, entry_args=entry_args)[0] pad_len = 10 tpl_expect = U_BOOT_TPL_DATA
@@ -6320,14 +6320,14 @@ fdt fdtmap Extract the devicetree blob from the fdtmap """Test passing multiple data files to mkimage with one data file having no content""" self._SetupSplElf() with self.assertRaises(ValueError) as exc: - self._DoReadFile('253_mkimage_mult_no_content.dts') + self._DoReadFile('mkimage/mult_no_content.dts') self.assertIn('Could not complete processing of contents', str(exc.exception)) def testMkimageFilename(self): """Test using mkimage to build a binary with a filename""" self._SetupSplElf() - retcode = self._DoTestFile('254_mkimage_filename.dts') + retcode = self._DoTestFile('mkimage/filename.dts') self.assertEqual(0, retcode) fname = tools.get_output_filename('mkimage-test.bin') self.assertTrue(os.path.exists(fname))
@@ -6891,12 +6891,12 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testMkimageMissingBlobMultiple(self): """Test missing blob with mkimage entry and multiple-data-files""" with terminal.capture() as (stdout, stderr): - self._DoTestFile('292_mkimage_missing_multiple.dts', allow_missing=True) + self._DoTestFile('mkimage/missing_multiple.dts', allow_missing=True) err = stderr.getvalue() self.assertIn("is missing external blobs and is non-functional", err) with self.assertRaises(ValueError) as e: - self._DoTestFile('292_mkimage_missing_multiple.dts', allow_missing=False) + self._DoTestFile('mkimage/missing_multiple.dts', allow_missing=False) self.assertIn("not found in input path", str(e.exception)) def _PrepareSignEnv(self, dts='fit/sign.dts'):
@@ -7002,7 +7002,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testMkimageSpecial(self): """Test mkimage ignores special hash-1 node""" - data = self._DoReadFile('283_mkimage_special.dts') + data = self._DoReadFile('mkimage/special.dts') # Just check that the data appears in the file somewhere self.assertIn(U_BOOT_DATA, data)
@@ -7085,7 +7085,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testMkimageSymbols(self): """Test using mkimage to build an image with symbols in it""" self._SetupSplElf('u_boot_binman_syms') - data = self._DoReadFile('290_mkimage_sym.dts') + data = self._DoReadFile('mkimage/sym.dts') image = control.images['image'] entries = image.GetEntries()
tools/binman/test/mkimage/coll.dts renamed from tools/binman/test/247_mkimage_coll.dts +0 -0
tools/binman/test/mkimage/filename.dts renamed from tools/binman/test/254_mkimage_filename.dts +0 -0
tools/binman/test/mkimage/image.dts renamed from tools/binman/test/243_mkimage_image.dts +0 -0
tools/binman/test/mkimage/image_bad.dts renamed from tools/binman/test/245_mkimage_image_bad.dts +0 -0
tools/binman/test/mkimage/image_no_content.dts renamed from tools/binman/test/244_mkimage_image_no_content.dts +0 -0
tools/binman/test/mkimage/missing.dts renamed from tools/binman/test/229_mkimage_missing.dts +0 -0
tools/binman/test/mkimage/missing_multiple.dts renamed from tools/binman/test/292_mkimage_missing_multiple.dts +0 -0
tools/binman/test/mkimage/mkimage.dts renamed from tools/binman/test/156_mkimage.dts +0 -0
tools/binman/test/mkimage/mult_data.dts renamed from tools/binman/test/252_mkimage_mult_data.dts +0 -0
tools/binman/test/mkimage/mult_no_content.dts renamed from tools/binman/test/253_mkimage_mult_no_content.dts +0 -0
tools/binman/test/mkimage/name.dts renamed from tools/binman/test/242_mkimage_name.dts +0 -0
tools/binman/test/mkimage/special.dts renamed from tools/binman/test/283_mkimage_special.dts +0 -0
tools/binman/test/mkimage/sym.dts renamed from tools/binman/test/290_mkimage_sym.dts +0 -0
Signature · 1 line
2.43.0
Re: [RFC PATCH 10/16] binman: test: Move mkimage test files to test/mkimage/
Hi Simon,
Quoted 6 lines · Simon Glass
From: Simon Glass <[email protected]>
Move about a dozen test files for mkimage entries into a mkimage/ subdirectory. Drop the numeric prefixes and the redundant
mkimage_filename prefix, and update all references.
Thanks!
Quentin
RFC PATCH 11/16 binman: test: Move FIP/TF-A test files to test/fip/
In reply to Simon GlassFrom: Simon Glass <[email protected]>
Move about 15 test files for ARM Trusted Firmware FIP, ATF BL31, SCP, OpenSBI, and BL1 entries into a fip/ subdirectory. Drop the numeric prefixes and the redundant fip_ filename prefix, and update all references.
---
tools/binman/ftest.py | 30 +++++++++----------
.../{169_atf_bl31.dts => fip/atf_bl31.dts} | 0
.../bad_align.dts} | 0
.../binman/test/{354_bl1.dts => fip/bl1.dts} | 0
.../collection.dts} | 0
.../binman/test/{203_fip.dts => fip/fip.dts} | 0
.../test/{207_fip_ls.dts => fip/ls.dts} | 0
.../{209_fip_missing.dts => fip/missing.dts} | 0
.../{205_fip_no_type.dts => fip/no_type.dts} | 0
.../test/{201_opensbi.dts => fip/opensbi.dts} | 0
.../test/{204_fip_other.dts => fip/other.dts} | 0
.../{208_fip_replace.dts => fip/replace.dts} | 0
.../binman/test/{172_scp.dts => fip/scp.dts} | 0
.../test/{210_fip_size.dts => fip/size.dts} | 0
.../test/{206_fip_uuid.dts => fip/uuid.dts} | 0
15 files changed, 15 insertions(+), 15 deletions(-)
rename tools/binman/test/{169_atf_bl31.dts => fip/atf_bl31.dts} (100%)
rename tools/binman/test/{211_fip_bad_align.dts => fip/bad_align.dts} (100%)
rename tools/binman/test/{354_bl1.dts => fip/bl1.dts} (100%)
rename tools/binman/test/{212_fip_collection.dts => fip/collection.dts} (100%)
rename tools/binman/test/{203_fip.dts => fip/fip.dts} (100%)
rename tools/binman/test/{207_fip_ls.dts => fip/ls.dts} (100%)
rename tools/binman/test/{209_fip_missing.dts => fip/missing.dts} (100%)
rename tools/binman/test/{205_fip_no_type.dts => fip/no_type.dts} (100%)
rename tools/binman/test/{201_opensbi.dts => fip/opensbi.dts} (100%)
rename tools/binman/test/{204_fip_other.dts => fip/other.dts} (100%)
rename tools/binman/test/{208_fip_replace.dts => fip/replace.dts} (100%)
rename tools/binman/test/{172_scp.dts => fip/scp.dts} (100%)
rename tools/binman/test/{210_fip_size.dts => fip/size.dts} (100%)
rename tools/binman/test/{206_fip_uuid.dts => fip/uuid.dts} (100%)tools/binman/ftest.py +15 -15
@@ -4247,12 +4247,12 @@ class TestFunctional(unittest.TestCase): def testPackBl31(self): """Test that an image with an ATF BL31 binary can be created""" - data = self._DoReadFile('169_atf_bl31.dts') + data = self._DoReadFile('fip/atf_bl31.dts') self.assertEqual(ATF_BL31_DATA, data[:len(ATF_BL31_DATA)]) def testPackScp(self): """Test that an image with an SCP binary can be created""" - data = self._DoReadFile('172_scp.dts') + data = self._DoReadFile('fip/scp.dts') self.assertEqual(SCP_DATA, data[:len(SCP_DATA)]) def CheckFitFdt(self, dts='fit/fdt.dts', use_fdt_list=True,
@@ -5046,7 +5046,7 @@ class TestFunctional(unittest.TestCase): def testPackOpenSBI(self): """Test that an image with an OpenSBI binary can be created""" - data = self._DoReadFile('201_opensbi.dts') + data = self._DoReadFile('fip/opensbi.dts') self.assertEqual(OPENSBI_DATA, data[:len(OPENSBI_DATA)]) def testSectionsSingleThread(self):
@@ -5234,7 +5234,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testFip(self): """Basic test of generation of an ARM Firmware Image Package (FIP)""" - data = self._DoReadFile('203_fip.dts') + data = self._DoReadFile('fip/fip.dts') hdr, fents = fip_util.decode_fip(data) self.assertEqual(fip_util.HEADER_MAGIC, hdr.name) self.assertEqual(fip_util.HEADER_SERIAL, hdr.serial)
@@ -5266,7 +5266,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testFipOther(self): """Basic FIP with something that isn't a external blob""" - data = self._DoReadFile('204_fip_other.dts') + data = self._DoReadFile('fip/other.dts') hdr, fents = fip_util.decode_fip(data) self.assertEqual(2, len(fents))
@@ -5277,13 +5277,13 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testFipNoType(self): """FIP with an entry of an unknown type""" with self.assertRaises(ValueError) as e: - self._DoReadFile('205_fip_no_type.dts') + self._DoReadFile('fip/no_type.dts') self.assertIn("Must provide a fip-type (node name 'u-boot' is not a known FIP type)", str(e.exception)) def testFipUuid(self): """Basic FIP with a manual uuid""" - data = self._DoReadFile('206_fip_uuid.dts') + data = self._DoReadFile('fip/uuid.dts') hdr, fents = fip_util.decode_fip(data) self.assertEqual(2, len(fents))
@@ -5297,7 +5297,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testFipLs(self): """Test listing a FIP""" - data = self._DoReadFileRealDtb('207_fip_ls.dts') + data = self._DoReadFileRealDtb('fip/ls.dts') hdr, fents = fip_util.decode_fip(data) tmpdir = None
@@ -5353,7 +5353,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testFipExtractOneEntry(self): """Test extracting a single entry fron an FIP""" - self._DoReadFileRealDtb('207_fip_ls.dts') + self._DoReadFileRealDtb('fip/ls.dts') image_fname = tools.get_output_filename('image.bin') fname = os.path.join(self._indir, 'output.extact') control.ExtractEntries(image_fname, fname, None, ['atf-fip/u-boot'])
@@ -5363,7 +5363,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testFipReplace(self): """Test replacing a single file in a FIP""" expected = U_BOOT_DATA + tools.get_bytes(0x78, 50) - data = self._DoReadFileRealDtb('208_fip_replace.dts') + data = self._DoReadFileRealDtb('fip/replace.dts') updated_fname = tools.get_output_filename('image-updated.bin') tools.write_file(updated_fname, data) entry_name = 'atf-fip/u-boot'
@@ -5387,13 +5387,13 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testFipMissing(self): with terminal.capture() as (stdout, stderr): - self._DoTestFile('209_fip_missing.dts', allow_missing=True) + self._DoTestFile('fip/missing.dts', allow_missing=True) err = stderr.getvalue() self.assertRegex(err, "Image 'image'.*missing.*: rmm-fw") def testFipSize(self): """Test a FIP with a size property""" - data = self._DoReadFile('210_fip_size.dts') + data = self._DoReadFile('fip/size.dts') self.assertEqual(0x100 + len(U_BOOT_DATA), len(data)) hdr, fents = fip_util.decode_fip(data) self.assertEqual(fip_util.HEADER_MAGIC, hdr.name)
@@ -5414,14 +5414,14 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testFipBadAlign(self): """Test that an invalid alignment value in a FIP is detected""" with self.assertRaises(ValueError) as e: - self._DoTestFile('211_fip_bad_align.dts') + self._DoTestFile('fip/bad_align.dts') self.assertIn( "Node \'/binman/atf-fip\': FIP alignment 31 must be a power of two", str(e.exception)) def testFipCollection(self): """Test using a FIP in a collection""" - data = self._DoReadFile('212_fip_collection.dts') + data = self._DoReadFile('fip/collection.dts') entry1 = control.images['image'].GetEntries()['collection'] data1 = data[:entry1.size] hdr1, fents2 = fip_util.decode_fip(data1)
@@ -5583,7 +5583,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testPackBl1(self): """test if an image with a bl1 binary can be created""" - data = self._DoReadFile('354_bl1.dts') + data = self._DoReadFile('fip/bl1.dts') self.assertEqual(ATF_BL1_DATA, data[:len(ATF_BL1_DATA)]) def testRenesasRCarGen4SA0Image(self):
tools/binman/test/fip/atf_bl31.dts renamed from tools/binman/test/169_atf_bl31.dts +0 -0
tools/binman/test/fip/bad_align.dts renamed from tools/binman/test/211_fip_bad_align.dts +0 -0
tools/binman/test/fip/bl1.dts renamed from tools/binman/test/354_bl1.dts +0 -0
tools/binman/test/fip/collection.dts renamed from tools/binman/test/212_fip_collection.dts +0 -0
tools/binman/test/fip/fip.dts renamed from tools/binman/test/203_fip.dts +0 -0
tools/binman/test/fip/ls.dts renamed from tools/binman/test/207_fip_ls.dts +0 -0
tools/binman/test/fip/missing.dts renamed from tools/binman/test/209_fip_missing.dts +0 -0
tools/binman/test/fip/no_type.dts renamed from tools/binman/test/205_fip_no_type.dts +0 -0
tools/binman/test/fip/opensbi.dts renamed from tools/binman/test/201_opensbi.dts +0 -0
tools/binman/test/fip/other.dts renamed from tools/binman/test/204_fip_other.dts +0 -0
tools/binman/test/fip/replace.dts renamed from tools/binman/test/208_fip_replace.dts +0 -0
tools/binman/test/fip/scp.dts renamed from tools/binman/test/172_scp.dts +0 -0
tools/binman/test/fip/size.dts renamed from tools/binman/test/210_fip_size.dts +0 -0
tools/binman/test/fip/uuid.dts renamed from tools/binman/test/206_fip_uuid.dts +0 -0
Signature · 1 line
2.43.0
Re: [RFC PATCH 11/16] binman: test: Move FIP/TF-A test files to test/fip/
Hi Simon,
Quoted 26 lines · Simon Glass
From: Simon Glass <[email protected]>
Move about 15 test files for ARM Trusted Firmware FIP, ATF BL31, SCP, OpenSBI, and BL1 entries into a fip/ subdirectory. Drop the numeric prefixes and the redundant
fip_filename prefix, and update all references.Signed-off-by Simon Glass <[email protected]>---
tools/binman/ftest.py | 30 +++++++++---------- .../{169_atf_bl31.dts => fip/atf_bl31.dts} | 0 .../bad_align.dts} | 0 .../binman/test/{354_bl1.dts => fip/bl1.dts} | 0 .../collection.dts} | 0 .../binman/test/{203_fip.dts => fip/fip.dts} | 0 .../test/{207_fip_ls.dts => fip/ls.dts} | 0 .../{209_fip_missing.dts => fip/missing.dts} | 0 .../{205_fip_no_type.dts => fip/no_type.dts} | 0 .../test/{201_opensbi.dts => fip/opensbi.dts} | 0 .../test/{204_fip_other.dts => fip/other.dts} | 0 .../{208_fip_replace.dts => fip/replace.dts} | 0 .../binman/test/{172_scp.dts => fip/scp.dts} | 0 .../test/{210_fip_size.dts => fip/size.dts} | 0 .../test/{206_fip_uuid.dts => fip/uuid.dts} | 0 15 files changed, 15 insertions(+), 15 deletions(-)
Quoted 3 lines
rename
tools/binman/test/{169_atf_bl31.dts=>fip/atf_bl31.dts} (100%) renametools/binman/test/{211_fip_bad_align.dts=>fip/bad_align.dts} (100%) renametools/binman/test/{354_bl1.dts=>fip/bl1.dts} (100%)
This patch also depends on https://lore.kernel.org/u-boot/[email protected]/.
Cheers,
Quentin
RFC PATCH 12/16 binman: test: Move UEFI capsule test files to test/capsule/
In reply to Simon GlassFrom: Simon Glass <[email protected]>
Move about a dozen test files for UEFI capsule creation (signed, versioned, accept, revert) into a capsule/ subdirectory. Drop the numeric prefixes and the redundant capsule_ filename prefix, and update all references.
---
tools/binman/ftest.py | 30 +++++++++----------
.../accept.dts} | 0
.../accept_missing_guid.dts} | 0
.../accept_revert_missing.dts} | 0
.../{311_capsule.dts => capsule/capsule.dts} | 0
.../empty_type_missing.dts} | 0
.../missing_guid.dts} | 0
.../missing_index.dts} | 0
.../missing_key.dts} | 0
.../oemflags.dts} | 0
.../revert.dts} | 0
.../signed.dts} | 0
.../signed_ver.dts} | 0
.../version.dts} | 0
14 files changed, 15 insertions(+), 15 deletions(-)
rename tools/binman/test/{319_capsule_accept.dts => capsule/accept.dts} (100%)
rename tools/binman/test/{321_capsule_accept_missing_guid.dts => capsule/accept_missing_guid.dts} (100%)
rename tools/binman/test/{323_capsule_accept_revert_missing.dts => capsule/accept_revert_missing.dts} (100%)
rename tools/binman/test/{311_capsule.dts => capsule/capsule.dts} (100%)
rename tools/binman/test/{322_empty_capsule_type_missing.dts => capsule/empty_type_missing.dts} (100%)
rename tools/binman/test/{318_capsule_missing_guid.dts => capsule/missing_guid.dts} (100%)
rename tools/binman/test/{317_capsule_missing_index.dts => capsule/missing_index.dts} (100%)
rename tools/binman/test/{316_capsule_missing_key.dts => capsule/missing_key.dts} (100%)
rename tools/binman/test/{315_capsule_oemflags.dts => capsule/oemflags.dts} (100%)
rename tools/binman/test/{320_capsule_revert.dts => capsule/revert.dts} (100%)
rename tools/binman/test/{312_capsule_signed.dts => capsule/signed.dts} (100%)
rename tools/binman/test/{314_capsule_signed_ver.dts => capsule/signed_ver.dts} (100%)
rename tools/binman/test/{313_capsule_version.dts => capsule/version.dts} (100%)tools/binman/ftest.py +15 -15
@@ -7517,7 +7517,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testCapsuleGen(self): """Test generation of EFI capsule""" - data = self._DoReadFile('311_capsule.dts') + data = self._DoReadFile('capsule/capsule.dts') self._CheckCapsule(data)
@@ -7528,13 +7528,13 @@ fdt fdtmap Extract the devicetree blob from the fdtmap data = tools.read_file(self.TestFile("key.pem")) self._MakeInputFile("key.crt", data) - data = self._DoReadFile('312_capsule_signed.dts') + data = self._DoReadFile('capsule/signed.dts') self._CheckCapsule(data, signed_capsule=True) def testCapsuleGenVersionSupport(self): """Test generation of EFI capsule with version support""" - data = self._DoReadFile('313_capsule_version.dts') + data = self._DoReadFile('capsule/version.dts') self._CheckCapsule(data, version_check=True)
@@ -7545,20 +7545,20 @@ fdt fdtmap Extract the devicetree blob from the fdtmap data = tools.read_file(self.TestFile("key.pem")) self._MakeInputFile("key.crt", data) - data = self._DoReadFile('314_capsule_signed_ver.dts') + data = self._DoReadFile('capsule/signed_ver.dts') self._CheckCapsule(data, signed_capsule=True, version_check=True) def testCapsuleGenCapOemFlags(self): """Test generation of EFI capsule with OEM Flags set""" - data = self._DoReadFile('315_capsule_oemflags.dts') + data = self._DoReadFile('capsule/oemflags.dts') self._CheckCapsule(data, capoemflags=True) def testCapsuleGenKeyMissing(self): """Test that binman errors out on missing key""" with self.assertRaises(ValueError) as e: - self._DoReadFile('316_capsule_missing_key.dts') + self._DoReadFile('capsule/missing_key.dts') self.assertIn("Both private key and public key certificate need to be provided", str(e.exception))
@@ -7566,7 +7566,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testCapsuleGenIndexMissing(self): """Test that binman errors out on missing image index""" with self.assertRaises(ValueError) as e: - self._DoReadFile('317_capsule_missing_index.dts') + self._DoReadFile('capsule/missing_index.dts') self.assertIn("entry is missing properties: image-index", str(e.exception))
@@ -7574,27 +7574,27 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testCapsuleGenGuidMissing(self): """Test that binman errors out on missing image GUID""" with self.assertRaises(ValueError) as e: - self._DoReadFile('318_capsule_missing_guid.dts') + self._DoReadFile('capsule/missing_guid.dts') self.assertIn("entry is missing properties: image-guid", str(e.exception)) def testCapsuleGenAcceptCapsule(self): """Test generationg of accept EFI capsule""" - data = self._DoReadFile('319_capsule_accept.dts') + data = self._DoReadFile('capsule/accept.dts') self._CheckEmptyCapsule(data, accept_capsule=True) def testCapsuleGenRevertCapsule(self): """Test generationg of revert EFI capsule""" - data = self._DoReadFile('320_capsule_revert.dts') + data = self._DoReadFile('capsule/revert.dts') self._CheckEmptyCapsule(data) def testCapsuleGenAcceptGuidMissing(self): """Test that binman errors out on missing image GUID for accept capsule""" with self.assertRaises(ValueError) as e: - self._DoReadFile('321_capsule_accept_missing_guid.dts') + self._DoReadFile('capsule/accept_missing_guid.dts') self.assertIn("Image GUID needed for generating accept capsule", str(e.exception))
@@ -7602,7 +7602,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testCapsuleGenEmptyCapsuleTypeMissing(self): """Test that capsule-type is specified""" with self.assertRaises(ValueError) as e: - self._DoReadFile('322_empty_capsule_type_missing.dts') + self._DoReadFile('capsule/empty_type_missing.dts') self.assertIn("entry is missing properties: capsule-type", str(e.exception))
@@ -7610,7 +7610,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testCapsuleGenAcceptOrRevertMissing(self): """Test that both accept and revert capsule are not specified""" with self.assertRaises(ValueError) as e: - self._DoReadFile('323_capsule_accept_revert_missing.dts') + self._DoReadFile('capsule/accept_revert_missing.dts') def test_assume_size(self): """Test handling of the assume-size property for external blob"""
@@ -7857,7 +7857,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testMkeficapsuleMissing(self): """Test that binman complains if mkeficapsule is missing""" with self.assertRaises(ValueError) as e: - self._DoTestFile('311_capsule.dts', + self._DoTestFile('capsule/capsule.dts', force_missing_bintools='mkeficapsule') self.assertIn("Node '/binman/efi-capsule': Missing tool: 'mkeficapsule'", str(e.exception))
@@ -7865,7 +7865,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testMkeficapsuleMissingOk(self): """Test that binman deals with mkeficapsule being missing""" with terminal.capture() as (stdout, stderr): - ret = self._DoTestFile('311_capsule.dts', + ret = self._DoTestFile('capsule/capsule.dts', force_missing_bintools='mkeficapsule', allow_missing=True) self.assertEqual(103, ret)
tools/binman/test/capsule/accept.dts renamed from tools/binman/test/319_capsule_accept.dts +0 -0
tools/binman/test/capsule/accept_missing_guid.dts renamed from tools/binman/test/321_capsule_accept_missing_guid.dts +0 -0
tools/binman/test/capsule/accept_revert_missing.dts renamed from tools/binman/test/323_capsule_accept_revert_missing.dts +0 -0
tools/binman/test/capsule/capsule.dts renamed from tools/binman/test/311_capsule.dts +0 -0
tools/binman/test/capsule/empty_type_missing.dts renamed from tools/binman/test/322_empty_capsule_type_missing.dts +0 -0
tools/binman/test/capsule/missing_guid.dts renamed from tools/binman/test/318_capsule_missing_guid.dts +0 -0
tools/binman/test/capsule/missing_index.dts renamed from tools/binman/test/317_capsule_missing_index.dts +0 -0
tools/binman/test/capsule/missing_key.dts renamed from tools/binman/test/316_capsule_missing_key.dts +0 -0
tools/binman/test/capsule/oemflags.dts renamed from tools/binman/test/315_capsule_oemflags.dts +0 -0
tools/binman/test/capsule/revert.dts renamed from tools/binman/test/320_capsule_revert.dts +0 -0
tools/binman/test/capsule/signed.dts renamed from tools/binman/test/312_capsule_signed.dts +0 -0
tools/binman/test/capsule/signed_ver.dts renamed from tools/binman/test/314_capsule_signed_ver.dts +0 -0
tools/binman/test/capsule/version.dts renamed from tools/binman/test/313_capsule_version.dts +0 -0
Signature · 1 line
2.43.0
Re: [RFC PATCH 12/16] binman: test: Move UEFI capsule test files to test/capsule/
Hi Simon,
Quoted 7 lines · Simon Glass
From: Simon Glass <[email protected]>
Move about a dozen test files for UEFI capsule creation (signed, versioned, accept, revert) into a capsule/ subdirectory. Drop the numeric prefixes and the redundant
capsule_filename prefix, and update all references.
What about tools/binman/test/key.key (seems to be used in security/, but duplication/symlink is probably fine?)?
Separate commit though.
Thanks!
Quentin
RFC PATCH 13/16 binman: test: Move vendor-specific test files to test/vendor/
In reply to Simon GlassFrom: Simon Glass <[email protected]>
Move about 20 test files for vendor-specific platform support (TI, NXP i.MX, Renesas R-Car, Rockchip, PowerPC MPC85xx) into a vendor/ subdirectory. Drop the numeric prefixes and update all references.
---
doc/develop/binman_tests.rst | 8 +--
tools/binman/ftest.py | 56 +++++++++----------
.../nxp_ddrfw_imx95.dts} | 0
.../{339_nxp_imx8.dts => vendor/nxp_imx8.dts} | 0
.../nxp_imx8_csf.dts} | 0
.../nxp_imx8_csf_fast_auth.dts} | 0
.../nxp_imx8_imagename.dts} | 0
.../nxp_imx95.dts} | 0
.../powerpc_mpc85xx_bootpg_resetvec.dts} | 0
.../renesas_rcar4_sa0.dts} | 0
.../renesas_rcar4_sa0_size.dts} | 0
.../rockchip_tpl.dts} | 0
.../ti_board_cfg.dts} | 0
.../ti_board_cfg_combined.dts} | 0
.../ti_board_cfg_no_type.dts} | 0
.../ti_board_cfg_phony.dts} | 0
.../test/{351_ti_dm.dts => vendor/ti_dm.dts} | 0
.../ti_secure.dts} | 0
.../ti_secure_firewall.dts} | 0
.../ti_secure_firewall_missing_property.dts} | 0
.../ti_secure_rom.dts} | 0
.../ti_secure_rom_a.dts} | 0
.../ti_secure_rom_b.dts} | 0
.../ti_secure_rom_combined.dts} | 0
24 files changed, 32 insertions(+), 32 deletions(-)
rename tools/binman/test/{353_nxp_ddrfw_imx95.dts => vendor/nxp_ddrfw_imx95.dts} (100%)
rename tools/binman/test/{339_nxp_imx8.dts => vendor/nxp_imx8.dts} (100%)
rename tools/binman/test/{364_nxp_imx8_csf.dts => vendor/nxp_imx8_csf.dts} (100%)
rename tools/binman/test/{365_nxp_imx8_csf_fast_auth.dts => vendor/nxp_imx8_csf_fast_auth.dts} (100%)
rename tools/binman/test/{366_nxp_imx8_imagename.dts => vendor/nxp_imx8_imagename.dts} (100%)
rename tools/binman/test/{359_nxp_imx95.dts => vendor/nxp_imx95.dts} (100%)
rename tools/binman/test/{150_powerpc_mpc85xx_bootpg_resetvec.dts => vendor/powerpc_mpc85xx_bootpg_resetvec.dts} (100%)
rename tools/binman/test/{357_renesas_rcar4_sa0.dts => vendor/renesas_rcar4_sa0.dts} (100%)
rename tools/binman/test/{358_renesas_rcar4_sa0_size.dts => vendor/renesas_rcar4_sa0_size.dts} (100%)
rename tools/binman/test/{291_rockchip_tpl.dts => vendor/rockchip_tpl.dts} (100%)
rename tools/binman/test/{293_ti_board_cfg.dts => vendor/ti_board_cfg.dts} (100%)
rename tools/binman/test/{294_ti_board_cfg_combined.dts => vendor/ti_board_cfg_combined.dts} (100%)
rename tools/binman/test/{295_ti_board_cfg_no_type.dts => vendor/ti_board_cfg_no_type.dts} (100%)
rename tools/binman/test/{352_ti_board_cfg_phony.dts => vendor/ti_board_cfg_phony.dts} (100%)
rename tools/binman/test/{351_ti_dm.dts => vendor/ti_dm.dts} (100%)
rename tools/binman/test/{296_ti_secure.dts => vendor/ti_secure.dts} (100%)
rename tools/binman/test/{324_ti_secure_firewall.dts => vendor/ti_secure_firewall.dts} (100%)
rename tools/binman/test/{325_ti_secure_firewall_missing_property.dts => vendor/ti_secure_firewall_missing_property.dts} (100%)
rename tools/binman/test/{297_ti_secure_rom.dts => vendor/ti_secure_rom.dts} (100%)
rename tools/binman/test/{299_ti_secure_rom_a.dts => vendor/ti_secure_rom_a.dts} (100%)
rename tools/binman/test/{300_ti_secure_rom_b.dts => vendor/ti_secure_rom_b.dts} (100%)
rename tools/binman/test/{298_ti_secure_rom_combined.dts => vendor/ti_secure_rom_combined.dts} (100%)doc/develop/binman_tests.rst +4 -4
@@ -457,7 +457,7 @@ can, which contains the new etype. Put it in a numbered file in ``tool/binman/test`` so that it comes last. All the numbers are unique and there are no gaps. -Example from ``tools/binman/test/339_nxp_imx8.dts``: +Example from ``tools/binman/test/vendor/nxp_imx8.dts``: .. code-block:: devicetree
@@ -493,7 +493,7 @@ Then create your test by adding a new function at the end of ``ftest.py``: def testNxpImx8Image(self): """Test that binman can produce an iMX8 image""" - self._DoTestFile('339_nxp_imx8.dts') + self._DoTestFile('vendor/nxp_imx8.dts') This uses the test file that you created. It doesn't check anything, it just runs the image description through binman.
@@ -517,7 +517,7 @@ The next step is to update it to actually check the output: def testNxpImx8Image(self): """Test that binman can produce an iMX8 image""" - data = self._DoReadFile('339_nxp_imx8.dts') + data = self._DoReadFile('vendor/nxp_imx8.dts') print('data', len(data)) The ``_DoReadFile()`` function is documented in the code. It returns the image
@@ -573,7 +573,7 @@ In the above example, here are some possible steps: def testNxpImx8ImageMkimageMissing(self): """Test that binman can produce an iMX8 image""" with terminal.capture() as (_, stderr): - self._DoTestFile('339_nxp_imx8.dts', + self._DoTestFile('vendor/nxp_imx8.dts', force_missing_bintools='mkimage') err = stderr.getvalue() self.assertRegex(err, "Image 'image'.*missing bintools.*: mkimage")
tools/binman/ftest.py +28 -28
202 lines not on this page · raw message
tools/binman/test/vendor/nxp_ddrfw_imx95.dts renamed from tools/binman/test/353_nxp_ddrfw_imx95.dts +0 -0
tools/binman/test/vendor/nxp_imx8.dts renamed from tools/binman/test/339_nxp_imx8.dts +0 -0
tools/binman/test/vendor/nxp_imx8_csf.dts renamed from tools/binman/test/364_nxp_imx8_csf.dts +0 -0
tools/binman/test/vendor/nxp_imx8_csf_fast_auth.dts renamed from tools/binman/test/365_nxp_imx8_csf_fast_auth.dts +0 -0
tools/binman/test/vendor/nxp_imx8_imagename.dts renamed from tools/binman/test/366_nxp_imx8_imagename.dts +0 -0
tools/binman/test/vendor/nxp_imx95.dts renamed from tools/binman/test/359_nxp_imx95.dts +0 -0
tools/binman/test/vendor/powerpc_mpc85xx_bootpg_resetvec.dts renamed from tools/binman/test/150_powerpc_mpc85xx_bootpg_resetvec.dts +0 -0
tools/binman/test/vendor/renesas_rcar4_sa0.dts renamed from tools/binman/test/357_renesas_rcar4_sa0.dts +0 -0
tools/binman/test/vendor/renesas_rcar4_sa0_size.dts renamed from tools/binman/test/358_renesas_rcar4_sa0_size.dts +0 -0
tools/binman/test/vendor/rockchip_tpl.dts renamed from tools/binman/test/291_rockchip_tpl.dts +0 -0
tools/binman/test/vendor/ti_board_cfg.dts renamed from tools/binman/test/293_ti_board_cfg.dts +0 -0
tools/binman/test/vendor/ti_board_cfg_combined.dts renamed from tools/binman/test/294_ti_board_cfg_combined.dts +0 -0
tools/binman/test/vendor/ti_board_cfg_no_type.dts renamed from tools/binman/test/295_ti_board_cfg_no_type.dts +0 -0
tools/binman/test/vendor/ti_board_cfg_phony.dts renamed from tools/binman/test/352_ti_board_cfg_phony.dts +0 -0
tools/binman/test/vendor/ti_dm.dts renamed from tools/binman/test/351_ti_dm.dts +0 -0
tools/binman/test/vendor/ti_secure.dts renamed from tools/binman/test/296_ti_secure.dts +0 -0
tools/binman/test/vendor/ti_secure_firewall.dts renamed from tools/binman/test/324_ti_secure_firewall.dts +0 -0
tools/binman/test/vendor/ti_secure_firewall_missing_property.dts renamed from tools/binman/test/325_ti_secure_firewall_missing_property.dts +0 -0
tools/binman/test/vendor/ti_secure_rom.dts renamed from tools/binman/test/297_ti_secure_rom.dts +0 -0
tools/binman/test/vendor/ti_secure_rom_a.dts renamed from tools/binman/test/299_ti_secure_rom_a.dts +0 -0
tools/binman/test/vendor/ti_secure_rom_b.dts renamed from tools/binman/test/300_ti_secure_rom_b.dts +0 -0
tools/binman/test/vendor/ti_secure_rom_combined.dts renamed from tools/binman/test/298_ti_secure_rom_combined.dts +0 -0
Signature · 1 line
2.43.0
Re: [RFC PATCH 13/16] binman: test: Move vendor-specific test files to test/vendor/
Hi Simon,
Quoted 6 lines · Simon Glass
From: Simon Glass <[email protected]>
Move about 20 test files for vendor-specific platform support (TI, NXP i.MX, Renesas R-Car, Rockchip, PowerPC MPC85xx) into a vendor/ subdirectory. Drop the numeric prefixes and update all references.
What about config.yaml, schema.yaml, schema_notype.yaml
Separate patch is fine.
I'm wondering if we shouldn't go for vendor-specific directories, e.g. instead of vendor/ti_*.dts, have ti/*.dts.
Quoted 28 lines
Signed-off-by Simon Glass <[email protected]>---
doc/develop/binman_tests.rst | 8 +-- tools/binman/ftest.py | 56 +++++++++---------- .../nxp_ddrfw_imx95.dts} | 0 .../{339_nxp_imx8.dts => vendor/nxp_imx8.dts} | 0 .../nxp_imx8_csf.dts} | 0 .../nxp_imx8_csf_fast_auth.dts} | 0 .../nxp_imx8_imagename.dts} | 0 .../nxp_imx95.dts} | 0 .../powerpc_mpc85xx_bootpg_resetvec.dts} | 0 .../renesas_rcar4_sa0.dts} | 0 .../renesas_rcar4_sa0_size.dts} | 0 .../rockchip_tpl.dts} | 0 .../ti_board_cfg.dts} | 0 .../ti_board_cfg_combined.dts} | 0 .../ti_board_cfg_no_type.dts} | 0 .../ti_board_cfg_phony.dts} | 0 .../test/{351_ti_dm.dts => vendor/ti_dm.dts} | 0 .../ti_secure.dts} | 0 .../ti_secure_firewall.dts} | 0 .../ti_secure_firewall_missing_property.dts} | 0 .../ti_secure_rom.dts} | 0 .../ti_secure_rom_a.dts} | 0 .../ti_secure_rom_b.dts} | 0 .../ti_secure_rom_combined.dts} | 0 24 files changed, 32 insertions(+), 32 deletions(-)
Quoted 1 line
rename
tools/binman/test/{353_nxp_ddrfw_imx95.dts=>vendor/nxp_ddrfw_imx95.dts} (100%)
This also depends on https://lore.kernel.org/u-boot/[email protected]/.
Quoted 27 lines
rename
tools/binman/test/{339_nxp_imx8.dts=>vendor/nxp_imx8.dts} (100%)
renametools/binman/test/{364_nxp_imx8_csf.dts=>vendor/nxp_imx8_csf.dts} (100%)
renametools/binman/test/{365_nxp_imx8_csf_fast_auth.dts=>vendor/nxp_imx8_csf_fast_auth.dts} (100%) renametools/binman/test/{366_nxp_imx8_imagename.dts=>vendor/nxp_imx8_imagename.dts} (100%)
renametools/binman/test/{359_nxp_imx95.dts=>vendor/nxp_imx95.dts} (100%)
renametools/binman/test/{150_powerpc_mpc85xx_bootpg_resetvec.dts=>vendor/powerpc_mpc85xx_bootpg_resetvec.dts} (100%) renametools/binman/test/{357_renesas_rcar4_sa0.dts=>vendor/renesas_rcar4_sa0.dts} (100%)
renametools/binman/test/{358_renesas_rcar4_sa0_size.dts=>vendor/renesas_rcar4_sa0_size.dts} (100%) renametools/binman/test/{291_rockchip_tpl.dts=>vendor/rockchip_tpl.dts} (100%)
renametools/binman/test/{293_ti_board_cfg.dts=>vendor/ti_board_cfg.dts} (100%)
renametools/binman/test/{294_ti_board_cfg_combined.dts=>vendor/ti_board_cfg_combined.dts} (100%)
renametools/binman/test/{295_ti_board_cfg_no_type.dts=>vendor/ti_board_cfg_no_type.dts} (100%)
renametools/binman/test/{352_ti_board_cfg_phony.dts=>vendor/ti_board_cfg_phony.dts} (100%)
renametools/binman/test/{351_ti_dm.dts=>vendor/ti_dm.dts} (100%)
renametools/binman/test/{296_ti_secure.dts=>vendor/ti_secure.dts} (100%)
renametools/binman/test/{324_ti_secure_firewall.dts=>vendor/ti_secure_firewall.dts} (100%)
renametools/binman/test/{325_ti_secure_firewall_missing_property.dts=>vendor/ti_secure_firewall_missing_property.dts} (100%) renametools/binman/test/{297_ti_secure_rom.dts=>vendor/ti_secure_rom.dts} (100%)
renametools/binman/test/{299_ti_secure_rom_a.dts=>vendor/ti_secure_rom_a.dts} (100%)
renametools/binman/test/{300_ti_secure_rom_b.dts=>vendor/ti_secure_rom_b.dts} (100%)
renametools/binman/test/{298_ti_secure_rom_combined.dts=>vendor/ti_secure_rom_combined.dts} (100%)doc/develop/binman_tests.rst +0
-0
doc/develop/binman_tests.rst can, which contains the new etype. Put it in a numbered file in · line 463
Quoted 8 lines
doc/develop/binman_tests.rst +1
-1@@ -457,7 +457,7 @@ can, which contains the new etype. Put it in a numbered file in ``tool/binman/test`` so that it comes last. All the numbers are unique and there are no gaps. -Example from ``tools/binman/test/339_nxp_imx8.dts``: +Example from ``tools/binman/test/vendor/nxp_imx8.dts``: .. code-block:: devicetree
We could also do
.. literalinclude:: ../../../tools/binman/test/vendor/nxp_imx8.dts
:language: devicetree
To make sure it's never outdated (not tested). In a separate patch though.
Cheers,
Quentin
RFC PATCH 14/16 binman: test: Move symbol test files to test/symbols/
In reply to Simon GlassFrom: Simon Glass <[email protected]>
Move about 10 test files for binman symbol patching into a symbols/ subdirectory. Drop the numeric prefixes and the redundant symbols_ filename prefix, and update all references.
---
tools/binman/ftest.py | 24 +++++++++----------
.../base.dts} | 0
.../base_expand.dts} | 0
.../comp.dts} | 0
.../disable.dts} | 0
.../{260_symbols_elf.dts => symbols/elf.dts} | 0
.../expand.dts} | 0
.../nodtb.dts} | 0
.../{187_symbols_sub.dts => symbols/sub.dts} | 0
.../{053_symbols.dts => symbols/symbols.dts} | 0
.../{149_symbols_tpl.dts => symbols/tpl.dts} | 0
11 files changed, 12 insertions(+), 12 deletions(-)
rename tools/binman/test/{336_symbols_base.dts => symbols/base.dts} (100%)
rename tools/binman/test/{337_symbols_base_expand.dts => symbols/base_expand.dts} (100%)
rename tools/binman/test/{338_symbols_comp.dts => symbols/comp.dts} (100%)
rename tools/binman/test/{282_symbols_disable.dts => symbols/disable.dts} (100%)
rename tools/binman/test/{260_symbols_elf.dts => symbols/elf.dts} (100%)
rename tools/binman/test/{197_symbols_expand.dts => symbols/expand.dts} (100%)
rename tools/binman/test/{196_symbols_nodtb.dts => symbols/nodtb.dts} (100%)
rename tools/binman/test/{187_symbols_sub.dts => symbols/sub.dts} (100%)
rename tools/binman/test/{053_symbols.dts => symbols/symbols.dts} (100%)
rename tools/binman/test/{149_symbols_tpl.dts => symbols/tpl.dts} (100%)tools/binman/ftest.py +12 -12
@@ -1611,11 +1611,11 @@ class TestFunctional(unittest.TestCase): def testSymbols(self): """Test binman can assign symbols embedded in U-Boot""" - self.checkSymbols('053_symbols.dts', U_BOOT_SPL_DATA, 0x1c) + self.checkSymbols('symbols/symbols.dts', U_BOOT_SPL_DATA, 0x1c) def testSymbolsNoDtb(self): """Test binman can assign symbols embedded in U-Boot SPL""" - self.checkSymbols('196_symbols_nodtb.dts', + self.checkSymbols('symbols/nodtb.dts', U_BOOT_SPL_NODTB_DATA + U_BOOT_SPL_DTB_DATA, 0x38)
@@ -3833,7 +3833,7 @@ class TestFunctional(unittest.TestCase): """Test binman can assign symbols embedded in U-Boot TPL in a section""" self._SetupSplElf('u_boot_binman_syms') self._SetupTplElf('u_boot_binman_syms') - self._CheckSymbolsTplSection('149_symbols_tpl.dts', + self._CheckSymbolsTplSection('symbols/tpl.dts', [0x04, 0x20, 0x10 + 0x3c, 0x04]) def testSymbolsTplSectionX86(self):
@@ -4756,7 +4756,7 @@ class TestFunctional(unittest.TestCase): def testSymbolsSubsection(self): """Test binman can assign symbols from a subsection""" - self.checkSymbols('187_symbols_sub.dts', U_BOOT_SPL_DATA, 0x1c) + self.checkSymbols('symbols/sub.dts', U_BOOT_SPL_DATA, 0x1c) def testReadImageEntryArg(self): """Test reading an image that would need an entry arg to generate"""
@@ -5007,7 +5007,7 @@ class TestFunctional(unittest.TestCase): entry_args = { 'spl-dtb': '1', } - self.checkSymbols('197_symbols_expand.dts', U_BOOT_SPL_NODTB_DATA + + self.checkSymbols('symbols/expand.dts', U_BOOT_SPL_NODTB_DATA + U_BOOT_SPL_DTB_DATA, 0x38, entry_args=entry_args, use_expanded=True)
@@ -6406,7 +6406,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap self._SetupTplElf('u_boot_binman_syms') self._SetupVplElf('u_boot_binman_syms') self._SetupSplElf('u_boot_binman_syms') - data = self._DoReadFileDtb('260_symbols_elf.dts')[0] + data = self._DoReadFileDtb('symbols/elf.dts')[0] image_fname = tools.get_output_filename('image.bin') image = control.images['image']
@@ -6449,7 +6449,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap try: elf.ELF_TOOLS = False with self.assertRaises(ValueError) as exc: - self._DoReadFileDtb('260_symbols_elf.dts') + self._DoReadFileDtb('symbols/elf.dts') finally: elf.ELF_TOOLS = True self.assertIn(
@@ -6987,7 +6987,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testSymbolNoWrite(self): """Test disabling of symbol writing""" self._SetupSplElf() - self.checkSymbols('282_symbols_disable.dts', U_BOOT_SPL_DATA, 0x1c, + self.checkSymbols('symbols/disable.dts', U_BOOT_SPL_DATA, 0x1c, no_write_symbols=True) def testSymbolNoWriteExpanded(self):
@@ -6995,7 +6995,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap entry_args = { 'spl-dtb': '1', } - self.checkSymbols('282_symbols_disable.dts', U_BOOT_SPL_NODTB_DATA + + self.checkSymbols('symbols/disable.dts', U_BOOT_SPL_NODTB_DATA + U_BOOT_SPL_DTB_DATA, 0x38, entry_args=entry_args, use_expanded=True, no_write_symbols=True)
@@ -7874,7 +7874,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testSymbolsBase(self): """Test handling of symbols-base""" - self.checkSymbols('336_symbols_base.dts', U_BOOT_SPL_DATA, 0x1c, + self.checkSymbols('symbols/base.dts', U_BOOT_SPL_DATA, 0x1c, symbols_base=0) def testSymbolsBaseExpanded(self):
@@ -7882,7 +7882,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap entry_args = { 'spl-dtb': '1', } - self.checkSymbols('337_symbols_base_expand.dts', U_BOOT_SPL_NODTB_DATA + + self.checkSymbols('symbols/base_expand.dts', U_BOOT_SPL_NODTB_DATA + U_BOOT_SPL_DTB_DATA, 0x38, entry_args=entry_args, use_expanded=True, symbols_base=0)
@@ -7890,7 +7890,7 @@ fdt fdtmap Extract the devicetree blob from the fdtmap def testSymbolsCompressed(self): """Test binman complains about symbols from a compressed section""" with terminal.capture() as (stdout, stderr): - self.checkSymbols('338_symbols_comp.dts', U_BOOT_SPL_DATA, None) + self.checkSymbols('symbols/comp.dts', U_BOOT_SPL_DATA, None) out = stdout.getvalue() self.assertIn('Symbol-writing: no value for /binman/section/u-boot', out)
tools/binman/test/symbols/base.dts renamed from tools/binman/test/336_symbols_base.dts +0 -0
tools/binman/test/symbols/base_expand.dts renamed from tools/binman/test/337_symbols_base_expand.dts +0 -0
tools/binman/test/symbols/comp.dts renamed from tools/binman/test/338_symbols_comp.dts +0 -0
tools/binman/test/symbols/disable.dts renamed from tools/binman/test/282_symbols_disable.dts +0 -0
tools/binman/test/symbols/elf.dts renamed from tools/binman/test/260_symbols_elf.dts +0 -0
tools/binman/test/symbols/expand.dts renamed from tools/binman/test/197_symbols_expand.dts +0 -0
tools/binman/test/symbols/nodtb.dts renamed from tools/binman/test/196_symbols_nodtb.dts +0 -0
tools/binman/test/symbols/sub.dts renamed from tools/binman/test/187_symbols_sub.dts +0 -0
tools/binman/test/symbols/symbols.dts renamed from tools/binman/test/053_symbols.dts +0 -0
tools/binman/test/symbols/tpl.dts renamed from tools/binman/test/149_symbols_tpl.dts +0 -0
Signature · 1 line
2.43.0
Re: [RFC PATCH 14/16] binman: test: Move symbol test files to test/symbols/
Hi Simon,
Quoted 6 lines · Simon Glass
From: Simon Glass <[email protected]>
Move about 10 test files for binman symbol patching into a symbols/ subdirectory. Drop the numeric prefixes and the redundant
symbols_filename prefix, and update all references.
Thanks!
Quentin
RFC PATCH 15/16 binman: test: Move remaining test files to test/entry/
In reply to Simon GlassFrom: Simon Glass <[email protected]>
Move the remaining 60 or so test files into an entry/ subdirectory. These cover general entry types and features: entry args, fill, text, env, compress, replace, template, collection, ELF, overlap, listing, sections, symlink, TEE OS, and other miscellaneous entries. Drop the numeric prefixes and update all references.
---
doc/develop/binman_tests.rst | 2 +-
tools/binman/fdt_test.py | 2 +-
tools/binman/ftest.py | 160 +++++++++---------
.../test/{262_absent.dts => entry/absent.dts} | 0
.../collection.dts} | 0
.../collection_other.dts} | 0
.../collection_section.dts} | 0
.../{083_compress.dts => entry/compress.dts} | 0
.../compress_extra.dts} | 0
.../compress_image.dts} | 0
.../compress_image_less.dts} | 0
.../compress_section.dts} | 0
.../compress_section_size.dts} | 0
.../test/{096_elf.dts => entry/elf.dts} | 0
.../elf_strip.dts} | 0
.../entry_args.dts} | 0
.../entry_args_missing.dts} | 0
.../entry_args_required.dts} | 0
.../entry_args_unknown_datatype.dts} | 0
.../test/{174_env.dts => entry/env.dts} | 0
.../env_no_size.dts} | 0
.../env_too_small.dts} | 0
.../test/{084_files.dts => entry/files.dts} | 0
.../files_align.dts} | 0
.../files_compress.dts} | 0
.../files_no_pattern.dts} | 0
.../files_none.dts} | 0
.../test/{069_fill.dts => entry/fill.dts} | 0
.../fill_empty.dts} | 0
.../fill_no_size.dts} | 0
.../image_entryarg.dts} | 0
.../test/{127_list.dts => entry/list.dts} | 0
.../name_prefix.dts} | 0
.../test/{268_null.dts => entry/null.dts} | 0
.../offset_from_elf.dts} | 0
.../{269_overlap.dts => entry/overlap.dts} | 0
.../overlap_bad.dts} | 0
.../overlap_no_size.dts} | 0
.../overlap_null.dts} | 0
.../prop_test.dts} | 0
.../read_image_skip.dts} | 0
.../remove_template.dts} | 0
.../{132_replace.dts => entry/replace.dts} | 0
.../replace_all.dts} | 0
.../replace_multi.dts} | 0
.../replace_repack.dts} | 0
.../replace_section_deep.dts} | 0
.../replace_section_simple.dts} | 0
.../replace_with_bintool.dts} | 0
.../section_fname.dts} | 0
.../section_timeout.dts} | 0
.../{055_sections.dts => entry/sections.dts} | 0
.../{259_symlink.dts => entry/symlink.dts} | 0
.../test/{222_tee_os.dts => entry/tee_os.dts} | 0
.../tee_os_opt.dts} | 0
.../{286_template.dts => entry/template.dts} | 0
.../template_multi.dts} | 0
.../template_phandle.dts} | 0
.../template_phandle_dup.dts} | 0
.../template_section.dts} | 0
.../test/{066_text.dts => entry/text.dts} | 0
.../unique_names.dts} | 0
.../unique_names_multi.dts} | 0
.../unknown_contents.dts} | 0
.../unknown_pos_size.dts} | 0
65 files changed, 82 insertions(+), 82 deletions(-)
rename tools/binman/test/{262_absent.dts => entry/absent.dts} (100%)
rename tools/binman/test/{198_collection.dts => entry/collection.dts} (100%)
rename tools/binman/test/{246_collection_other.dts => entry/collection_other.dts} (100%)
rename tools/binman/test/{199_collection_section.dts => entry/collection_section.dts} (100%)
rename tools/binman/test/{083_compress.dts => entry/compress.dts} (100%)
rename tools/binman/test/{186_compress_extra.dts => entry/compress_extra.dts} (100%)
rename tools/binman/test/{182_compress_image.dts => entry/compress_image.dts} (100%)
rename tools/binman/test/{183_compress_image_less.dts => entry/compress_image_less.dts} (100%)
rename tools/binman/test/{185_compress_section.dts => entry/compress_section.dts} (100%)
rename tools/binman/test/{184_compress_section_size.dts => entry/compress_section_size.dts} (100%)
rename tools/binman/test/{096_elf.dts => entry/elf.dts} (100%)
rename tools/binman/test/{097_elf_strip.dts => entry/elf_strip.dts} (100%)
rename tools/binman/test/{062_entry_args.dts => entry/entry_args.dts} (100%)
rename tools/binman/test/{063_entry_args_missing.dts => entry/entry_args_missing.dts} (100%)
rename tools/binman/test/{064_entry_args_required.dts => entry/entry_args_required.dts} (100%)
rename tools/binman/test/{065_entry_args_unknown_datatype.dts => entry/entry_args_unknown_datatype.dts} (100%)
rename tools/binman/test/{174_env.dts => entry/env.dts} (100%)
rename tools/binman/test/{175_env_no_size.dts => entry/env_no_size.dts} (100%)
rename tools/binman/test/{176_env_too_small.dts => entry/env_too_small.dts} (100%)
rename tools/binman/test/{084_files.dts => entry/files.dts} (100%)
rename tools/binman/test/{190_files_align.dts => entry/files_align.dts} (100%)
rename tools/binman/test/{085_files_compress.dts => entry/files_compress.dts} (100%)
rename tools/binman/test/{087_files_no_pattern.dts => entry/files_no_pattern.dts} (100%)
rename tools/binman/test/{086_files_none.dts => entry/files_none.dts} (100%)
rename tools/binman/test/{069_fill.dts => entry/fill.dts} (100%)
rename tools/binman/test/{080_fill_empty.dts => entry/fill_empty.dts} (100%)
rename tools/binman/test/{070_fill_no_size.dts => entry/fill_no_size.dts} (100%)
rename tools/binman/test/{188_image_entryarg.dts => entry/image_entryarg.dts} (100%)
rename tools/binman/test/{127_list.dts => entry/list.dts} (100%)
rename tools/binman/test/{056_name_prefix.dts => entry/name_prefix.dts} (100%)
rename tools/binman/test/{268_null.dts => entry/null.dts} (100%)
rename tools/binman/test/{274_offset_from_elf.dts => entry/offset_from_elf.dts} (100%)
rename tools/binman/test/{269_overlap.dts => entry/overlap.dts} (100%)
rename tools/binman/test/{271_overlap_bad.dts => entry/overlap_bad.dts} (100%)
rename tools/binman/test/{272_overlap_no_size.dts => entry/overlap_no_size.dts} (100%)
rename tools/binman/test/{270_overlap_null.dts => entry/overlap_null.dts} (100%)
rename tools/binman/test/{045_prop_test.dts => entry/prop_test.dts} (100%)
rename tools/binman/test/{191_read_image_skip.dts => entry/read_image_skip.dts} (100%)
rename tools/binman/test/{346_remove_template.dts => entry/remove_template.dts} (100%)
rename tools/binman/test/{132_replace.dts => entry/replace.dts} (100%)
rename tools/binman/test/{143_replace_all.dts => entry/replace_all.dts} (100%)
rename tools/binman/test/{133_replace_multi.dts => entry/replace_multi.dts} (100%)
rename tools/binman/test/{139_replace_repack.dts => entry/replace_repack.dts} (100%)
rename tools/binman/test/{278_replace_section_deep.dts => entry/replace_section_deep.dts} (100%)
rename tools/binman/test/{241_replace_section_simple.dts => entry/replace_section_simple.dts} (100%)
rename tools/binman/test/{239_replace_with_bintool.dts => entry/replace_with_bintool.dts} (100%)
rename tools/binman/test/{261_section_fname.dts => entry/section_fname.dts} (100%)
rename tools/binman/test/{202_section_timeout.dts => entry/section_timeout.dts} (100%)
rename tools/binman/test/{055_sections.dts => entry/sections.dts} (100%)
rename tools/binman/test/{259_symlink.dts => entry/symlink.dts} (100%)
rename tools/binman/test/{222_tee_os.dts => entry/tee_os.dts} (100%)
rename tools/binman/test/{263_tee_os_opt.dts => entry/tee_os_opt.dts} (100%)
rename tools/binman/test/{286_template.dts => entry/template.dts} (100%)
rename tools/binman/test/{287_template_multi.dts => entry/template_multi.dts} (100%)
rename tools/binman/test/{309_template_phandle.dts => entry/template_phandle.dts} (100%)
rename tools/binman/test/{310_template_phandle_dup.dts => entry/template_phandle_dup.dts} (100%)
rename tools/binman/test/{289_template_section.dts => entry/template_section.dts} (100%)
rename tools/binman/test/{066_text.dts => entry/text.dts} (100%)
rename tools/binman/test/{237_unique_names.dts => entry/unique_names.dts} (100%)
rename tools/binman/test/{238_unique_names_multi.dts => entry/unique_names_multi.dts} (100%)
rename tools/binman/test/{057_unknown_contents.dts => entry/unknown_contents.dts} (100%)
rename tools/binman/test/{041_unknown_pos_size.dts => entry/unknown_pos_size.dts} (100%)doc/develop/binman_tests.rst +1 -1
@@ -402,7 +402,7 @@ Another type of test is one which checks error-handling, for example: def testFillNoSize(self): """Test for an fill entry type with no size""" with self.assertRaises(ValueError) as e: - self._DoReadFile('070_fill_no_size.dts') + self._DoReadFile('entry/fill_no_size.dts') self.assertIn("'fill' entry is missing properties: size", str(e.exception))
tools/binman/fdt_test.py +1 -1
@@ -41,7 +41,7 @@ class TestFdt(unittest.TestCase): self._DeleteProp(dt) def testFdtNormalProp(self): - fname = self.GetCompiled('045_prop_test.dts') + fname = self.GetCompiled('entry/prop_test.dts') dt = FdtScan(fname) node = dt.GetNode('/binman/intel-me') self.assertEqual('intel-me', node.name)
tools/binman/ftest.py +80 -80
629 lines not on this page · raw message
tools/binman/test/entry/absent.dts renamed from tools/binman/test/262_absent.dts +0 -0
tools/binman/test/entry/collection.dts renamed from tools/binman/test/198_collection.dts +0 -0
tools/binman/test/entry/collection_other.dts renamed from tools/binman/test/246_collection_other.dts +0 -0
tools/binman/test/entry/collection_section.dts renamed from tools/binman/test/199_collection_section.dts +0 -0
tools/binman/test/entry/compress.dts renamed from tools/binman/test/083_compress.dts +0 -0
tools/binman/test/entry/compress_extra.dts renamed from tools/binman/test/186_compress_extra.dts +0 -0
tools/binman/test/entry/compress_image.dts renamed from tools/binman/test/182_compress_image.dts +0 -0
tools/binman/test/entry/compress_image_less.dts renamed from tools/binman/test/183_compress_image_less.dts +0 -0
tools/binman/test/entry/compress_section.dts renamed from tools/binman/test/185_compress_section.dts +0 -0
tools/binman/test/entry/compress_section_size.dts renamed from tools/binman/test/184_compress_section_size.dts +0 -0
tools/binman/test/entry/elf.dts renamed from tools/binman/test/096_elf.dts +0 -0
tools/binman/test/entry/elf_strip.dts renamed from tools/binman/test/097_elf_strip.dts +0 -0
tools/binman/test/entry/entry_args.dts renamed from tools/binman/test/062_entry_args.dts +0 -0
tools/binman/test/entry/entry_args_missing.dts renamed from tools/binman/test/063_entry_args_missing.dts +0 -0
tools/binman/test/entry/entry_args_required.dts renamed from tools/binman/test/064_entry_args_required.dts +0 -0
tools/binman/test/entry/entry_args_unknown_datatype.dts renamed from tools/binman/test/065_entry_args_unknown_datatype.dts +0 -0
tools/binman/test/entry/env.dts renamed from tools/binman/test/174_env.dts +0 -0
tools/binman/test/entry/env_no_size.dts renamed from tools/binman/test/175_env_no_size.dts +0 -0
tools/binman/test/entry/env_too_small.dts renamed from tools/binman/test/176_env_too_small.dts +0 -0
tools/binman/test/entry/files.dts renamed from tools/binman/test/084_files.dts +0 -0
tools/binman/test/entry/files_align.dts renamed from tools/binman/test/190_files_align.dts +0 -0
tools/binman/test/entry/files_compress.dts renamed from tools/binman/test/085_files_compress.dts +0 -0
tools/binman/test/entry/files_no_pattern.dts renamed from tools/binman/test/087_files_no_pattern.dts +0 -0
tools/binman/test/entry/files_none.dts renamed from tools/binman/test/086_files_none.dts +0 -0
tools/binman/test/entry/fill.dts renamed from tools/binman/test/069_fill.dts +0 -0
tools/binman/test/entry/fill_empty.dts renamed from tools/binman/test/080_fill_empty.dts +0 -0
tools/binman/test/entry/fill_no_size.dts renamed from tools/binman/test/070_fill_no_size.dts +0 -0
tools/binman/test/entry/image_entryarg.dts renamed from tools/binman/test/188_image_entryarg.dts +0 -0
tools/binman/test/entry/list.dts renamed from tools/binman/test/127_list.dts +0 -0
tools/binman/test/entry/name_prefix.dts renamed from tools/binman/test/056_name_prefix.dts +0 -0
tools/binman/test/entry/null.dts renamed from tools/binman/test/268_null.dts +0 -0
tools/binman/test/entry/offset_from_elf.dts renamed from tools/binman/test/274_offset_from_elf.dts +0 -0
tools/binman/test/entry/overlap.dts renamed from tools/binman/test/269_overlap.dts +0 -0
tools/binman/test/entry/overlap_bad.dts renamed from tools/binman/test/271_overlap_bad.dts +0 -0
tools/binman/test/entry/overlap_no_size.dts renamed from tools/binman/test/272_overlap_no_size.dts +0 -0
tools/binman/test/entry/overlap_null.dts renamed from tools/binman/test/270_overlap_null.dts +0 -0
tools/binman/test/entry/prop_test.dts renamed from tools/binman/test/045_prop_test.dts +0 -0
tools/binman/test/entry/read_image_skip.dts renamed from tools/binman/test/191_read_image_skip.dts +0 -0
tools/binman/test/entry/remove_template.dts renamed from tools/binman/test/346_remove_template.dts +0 -0
tools/binman/test/entry/replace.dts renamed from tools/binman/test/132_replace.dts +0 -0
tools/binman/test/entry/replace_all.dts renamed from tools/binman/test/143_replace_all.dts +0 -0
tools/binman/test/entry/replace_multi.dts renamed from tools/binman/test/133_replace_multi.dts +0 -0
tools/binman/test/entry/replace_repack.dts renamed from tools/binman/test/139_replace_repack.dts +0 -0
tools/binman/test/entry/replace_section_deep.dts renamed from tools/binman/test/278_replace_section_deep.dts +0 -0
tools/binman/test/entry/replace_section_simple.dts renamed from tools/binman/test/241_replace_section_simple.dts +0 -0
tools/binman/test/entry/replace_with_bintool.dts renamed from tools/binman/test/239_replace_with_bintool.dts +0 -0
tools/binman/test/entry/section_fname.dts renamed from tools/binman/test/261_section_fname.dts +0 -0
tools/binman/test/entry/section_timeout.dts renamed from tools/binman/test/202_section_timeout.dts +0 -0
tools/binman/test/entry/sections.dts renamed from tools/binman/test/055_sections.dts +0 -0
tools/binman/test/entry/symlink.dts renamed from tools/binman/test/259_symlink.dts +0 -0
tools/binman/test/entry/tee_os.dts renamed from tools/binman/test/222_tee_os.dts +0 -0
tools/binman/test/entry/tee_os_opt.dts renamed from tools/binman/test/263_tee_os_opt.dts +0 -0
tools/binman/test/entry/template.dts renamed from tools/binman/test/286_template.dts +0 -0
tools/binman/test/entry/template_multi.dts renamed from tools/binman/test/287_template_multi.dts +0 -0
tools/binman/test/entry/template_phandle.dts renamed from tools/binman/test/309_template_phandle.dts +0 -0
tools/binman/test/entry/template_phandle_dup.dts renamed from tools/binman/test/310_template_phandle_dup.dts +0 -0
tools/binman/test/entry/template_section.dts renamed from tools/binman/test/289_template_section.dts +0 -0
tools/binman/test/entry/text.dts renamed from tools/binman/test/066_text.dts +0 -0
tools/binman/test/entry/unique_names.dts renamed from tools/binman/test/237_unique_names.dts +0 -0
tools/binman/test/entry/unique_names_multi.dts renamed from tools/binman/test/238_unique_names_multi.dts +0 -0
tools/binman/test/entry/unknown_contents.dts renamed from tools/binman/test/057_unknown_contents.dts +0 -0
tools/binman/test/entry/unknown_pos_size.dts renamed from tools/binman/test/041_unknown_pos_size.dts +0 -0
Signature · 1 line
2.43.0
Re: [RFC PATCH 15/16] binman: test: Move remaining test files to test/entry/
Hi Simon,
Quoted 8 lines · Simon Glass
From: Simon Glass <[email protected]>
Move the remaining 60 or so test files into an entry/ subdirectory. These cover general entry types and features: entry args, fill, text, env, compress, replace, template, collection, ELF, overlap, listing, sections, symlink, TEE OS, and other miscellaneous entries. Drop the numeric prefixes and update all references.
What about files/*.dat, blob_syms*, key.pem (seems to be used in security/ as well, but duplication/symlink should be fine?).
Thanks!
Quentin
RFC PATCH 16/16 binman: doc: Update binman_tests.rst for subdirectory layout
In reply to Simon GlassFrom: Simon Glass <[email protected]>
Update the documentation to reflect the new test file organisation:
replace references to numbered test files with their new subdirectory paths, and update the guidance for adding new tests to describe the subdirectory structure instead of the old numbering scheme. Also fix a stale comment in ftest.py.
---
doc/develop/binman_tests.rst | 11 ++++++----- tools/binman/ftest.py | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-)
doc/develop/binman_tests.rst +6 -5
@@ -453,9 +453,10 @@ help with this, but your code will be different. Generally you are adding a test because you are adding a new entry type ('etype'). So start by creating the shortest and simplest image-description you -can, which contains the new etype. Put it in a numbered file in -``tool/binman/test`` so that it comes last. All the numbers are unique and there -are no gaps. +can, which contains the new etype. Put it in the appropriate subdirectory +under ``tools/binman/test`` with a descriptive filename (e.g. ``fit/`` for +FIT image tests, ``vendor/`` for vendor-specific tests, ``entry/`` for +general entry types). Example from ``tools/binman/test/vendor/nxp_imx8.dts``:
@@ -610,7 +611,7 @@ In the above example, here are some possible steps: Entry_section.SetImagePos(self, image_pos) - The solution is to add an entry, e.g. in ``340_nxp_imx8_non_empty.dts``: + The solution is to add an entry, e.g. in ``vendor/nxp_imx8_non_empty.dts``: .. code-block:: devicetree
@@ -641,7 +642,7 @@ In the above example, here are some possible steps: def testNxpImx8ImageNonEmpty(self): """Test that binman can produce an iMX8 image with something in it""" - data = self._DoReadFile('340_nxp_imx8_non_empty.dts') + data = self._DoReadFile('vendor/nxp_imx8_non_empty.dts') # check data here With that, the second red bit goes away, because the for() loop is now used.
tools/binman/ftest.py +1 -1
@@ -2130,7 +2130,7 @@ class TestFunctional(unittest.TestCase): # Unfortunately, compiling a source file always results in a file # called source.dtb (see fdt_util.EnsureCompiled()). The test - # source file (e.g. test/075_fdt_update_all.dts) thus does not enter + # source file (e.g. test/fdt/fdt_update_all.dts) thus does not enter # binman as a file called u-boot.dtb. To fix this, copy the file # over to the expected place. start = 0
Signature · 1 line
2.43.0
Re: [RFC PATCH 16/16] binman: doc: Update binman_tests.rst for subdirectory layout
Hi Simon,
Quoted 21 lines · Simon Glass
From: Simon Glass <[email protected]>
Update the documentation to reflect the new test file organisation:
replace references to numbered test files with their new subdirectory paths, and update the guidance for adding new tests to describe the subdirectory structure instead of the old numbering scheme. Also fix a stale comment inftest.py.Signed-off-by Simon Glass <[email protected]>---
doc/develop/binman_tests.rst | 11 ++++++----- tools/binman/ftest.py | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-)doc/develop/binman_tests.rst +0
-0@@ -453,9 +453,10 @@ help with this, but your code will be different.
doc/develop/binman_tests.rst help with this, but your code will be different. · line 460
Quoted 10 lines
doc/develop/binman_tests.rst +4
-3Generally you are adding a test because you are adding a new entry type ('etype'). So start by creating the shortest and simplest image-description you -can, which contains the new etype. Put it in a numbered file in -``tool/binman/test`` so that it comes last. All the numbers are unique and there -are no gaps. +can, which contains the new etype. Put it in the appropriate subdirectory +under ``tools/binman/test`` with a descriptive filename (e.g. ``fit/`` for +FIT image tests, ``vendor/`` for vendor-specific tests, ``entry/`` for +general entry types).
This is an awkward wording, the content in the parentheses seem to apply to "descriptive filename" but it only explains the "appropriate subdirectory" part.
What about:
Put it under ``tools/binman/test`` in the appropriate subdirectory (e.g. ``fit/`` for FIT image tests, ``vendor/`` for vendor-specific tests, ``entry/`` for general entry types) with a descriptive filename.
?
doc/develop/binman_tests.rst In the above example, here are some possible steps: · line 615
Quoted 9 lines
doc/develop/binman_tests.rst +1
-1Example from ``tools/binman/test/vendor/nxp_imx8.dts``:@@ -610,7 +611,7 @@ In the above example, here are some possible steps: Entry_section.SetImagePos(self, image_pos) - The solution is to add an entry, e.g. in ``340_nxp_imx8_non_empty.dts``: + The solution is to add an entry, e.g. in ``vendor/nxp_imx8_non_empty.dts``:
This should be with the patch changing the filename + path.
doc/develop/binman_tests.rst In the above example, here are some possible steps: · line 645
Quoted 8 lines
doc/develop/binman_tests.rst +1
-1.. code-block:: devicetree@@ -641,7 +642,7 @@ In the above example, here are some possible steps: def testNxpImx8ImageNonEmpty(self): """Test that binman can produce an iMX8 image with something in it""" - data = self._DoReadFile('340_nxp_imx8_non_empty.dts') + data = self._DoReadFile('vendor/nxp_imx8_non_empty.dts')
Ditto.
tools/binman/ftest.py class TestFunctional(unittest.TestCase): · line 2133
Quoted 13 lines
doc/develop/binman_tests.rst +0
-0# check data here With that, the second red bit goes away, because the for() loop is now used.tools/binman/ftest.py +1
-1@@ -2130,7 +2130,7 @@ class TestFunctional(unittest.TestCase): # Unfortunately, compiling a source file always results in a file # called source.dtb (see fdt_util.EnsureCompiled()). The test - # source file (e.g. test/075_fdt_update_all.dts) thus does not enter + # source file (e.g. test/fdt/fdt_update_all.dts) thus does not enter
Ditto.
Cheers,
Quentin
Quoted 5 lines · Simon Glass
From: Simon Glass <[email protected]>
There are about 350 numbered .dts test files in
tools/binman/test/and we sometimes have trouble with numbers being reused.
Quoted 7 lines
As an alternative approach, this series moves the files into thematic subdirectories, without the numeric prefixes. This means it's no-longer possible to simply type a three-digit number to get the right file, but the names are shorter so it is still easy enough.
The subdirectories chosen are: blob, capsule, cbfs, cros, entry, fdt, fip, fit, mkimage, pack, security, symbols, vendor, x86, and xpl.
This seems much more maintainable, thank you.
Signature · 1 line
Tom
Hi Tom,
Quoted 13 lines · Tom Rini
Quoted 10 lines · Simon Glass
From: Simon Glass <[email protected]>
There are about 350 numbered .dts test files in
tools/binman/test/and we sometimes have trouble with numbers being reused.As an alternative approach, this series moves the files into thematic subdirectories, without the numeric prefixes. This means it's no-longer possible to simply type a three-digit number to get the right file, but the names are shorter so it is still easy enough.
Quoted 4 lines
Quoted 2 lines
The subdirectories chosen are: blob, capsule, cbfs, cros, entry, fdt, fip, fit, mkimage, pack, security, symbols, vendor, x86, and xpl.
This seems much more maintainable, thank you.
Yes, I hope so. I could perhaps do a series to split ftest.py along the same lines, but let's see how this one pans out.
Regards,
Simon
Hi Simon,
Thanks for doing that :)
As a general remark, I would suggest to remove the dependency from this series on https://lore.kernel.org/u-boot/[email protected]/.
That is:
- remove patch 1 and 2 from the linked series,
- squash changes made in this series to tests added in the linked series (patch 4),
- maybe something else I missed,
If the series cannot be applied independently even with this done, I would suggest to invert the dependencies such that this is the base.
I'm assuming this series here doesn't need too many eyes, but the imx8/cst changes should be thoroughly checked and there's no need to postpone merging this series here I believe, especially since we're about to have tests for UEFI capsule and may receive other tests in the future.
Cheers,
Quentin
Hi Quentin,
Quoted 16 lines · Quentin Schulz
Hi Simon,
Thanks for doing that :)
As a general remark, I would suggest to remove the dependency from this series on
https://lore.kernel.org/u-boot/[email protected]/.That is:
- remove patch 1 and 2 from the linked series,
- squash changes made in this series to tests added in the linked series (patch 4),
- maybe something else I missed,
Quoted 8 lines
If the series cannot be applied independently even with this done, I would suggest to invert the dependencies such that this is the base.
I'm assuming this series here doesn't need too many eyes, but the imx8/cst changes should be thoroughly checked and there's no need to postpone merging this series here I believe, especially since we're about to have tests for UEFI capsule and may receive other tests in the future.
Thanks very much taking such a good look through. For imx8/cst it should be OK as the code doesn't change, it just adds tests.
Regards,
Simon