summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2026-03-06 11:12:37 -0700
committerSimon Glass <[email protected]>2026-03-18 06:14:16 -0600
commita39fdf2aad51ac8206d855cf958cf5c96b502bb1 (patch)
treef84825292e888f4bd9b853caffe9a0c0f0441b84 /tools
parentdd487d0d55c5c8828972cbff871252ba98f8d65c (diff)
binman: test: Move CBFS test files to test/cbfs/
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. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Quentin Schulz <[email protected]>
Diffstat (limited to 'tools')
-rw-r--r--tools/binman/ftest.py28
-rw-r--r--tools/binman/test/cbfs/bad_arch.dts (renamed from tools/binman/test/106_cbfs_bad_arch.dts)0
-rw-r--r--tools/binman/test/cbfs/bad_compress.dts (renamed from tools/binman/test/109_cbfs_bad_compress.dts)0
-rw-r--r--tools/binman/test/cbfs/bad_type.dts (renamed from tools/binman/test/126_cbfs_bad_type.dts)0
-rw-r--r--tools/binman/test/cbfs/name.dts (renamed from tools/binman/test/110_cbfs_name.dts)0
-rw-r--r--tools/binman/test/cbfs/no_contents.dts (renamed from tools/binman/test/108_cbfs_no_contents.dts)0
-rw-r--r--tools/binman/test/cbfs/no_size.dts (renamed from tools/binman/test/107_cbfs_no_size.dts)0
-rw-r--r--tools/binman/test/cbfs/offset.dts (renamed from tools/binman/test/114_cbfs_offset.dts)0
-rw-r--r--tools/binman/test/cbfs/raw.dts (renamed from tools/binman/test/102_cbfs_raw.dts)0
-rw-r--r--tools/binman/test/cbfs/raw_compress.dts (renamed from tools/binman/test/105_cbfs_raw_compress.dts)0
-rw-r--r--tools/binman/test/cbfs/raw_ppc.dts (renamed from tools/binman/test/103_cbfs_raw_ppc.dts)0
-rw-r--r--tools/binman/test/cbfs/replace.dts (renamed from tools/binman/test/142_replace_cbfs.dts)0
-rw-r--r--tools/binman/test/cbfs/stage.dts (renamed from tools/binman/test/104_cbfs_stage.dts)0
-rw-r--r--tools/binman/test/cbfs/update.dts (renamed from tools/binman/test/125_cbfs_update.dts)0
14 files changed, 14 insertions, 14 deletions
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index 9ceb85f2b28..d43bb9183bb 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -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'
diff --git a/tools/binman/test/106_cbfs_bad_arch.dts b/tools/binman/test/cbfs/bad_arch.dts
index 4318d45a7d4..4318d45a7d4 100644
--- a/tools/binman/test/106_cbfs_bad_arch.dts
+++ b/tools/binman/test/cbfs/bad_arch.dts
diff --git a/tools/binman/test/109_cbfs_bad_compress.dts b/tools/binman/test/cbfs/bad_compress.dts
index 9695024ee9b..9695024ee9b 100644
--- a/tools/binman/test/109_cbfs_bad_compress.dts
+++ b/tools/binman/test/cbfs/bad_compress.dts
diff --git a/tools/binman/test/126_cbfs_bad_type.dts b/tools/binman/test/cbfs/bad_type.dts
index 2cd6fc6d52d..2cd6fc6d52d 100644
--- a/tools/binman/test/126_cbfs_bad_type.dts
+++ b/tools/binman/test/cbfs/bad_type.dts
diff --git a/tools/binman/test/110_cbfs_name.dts b/tools/binman/test/cbfs/name.dts
index 98c16f30b41..98c16f30b41 100644
--- a/tools/binman/test/110_cbfs_name.dts
+++ b/tools/binman/test/cbfs/name.dts
diff --git a/tools/binman/test/108_cbfs_no_contents.dts b/tools/binman/test/cbfs/no_contents.dts
index 623346760d2..623346760d2 100644
--- a/tools/binman/test/108_cbfs_no_contents.dts
+++ b/tools/binman/test/cbfs/no_contents.dts
diff --git a/tools/binman/test/107_cbfs_no_size.dts b/tools/binman/test/cbfs/no_size.dts
index 3592f62f7e6..3592f62f7e6 100644
--- a/tools/binman/test/107_cbfs_no_size.dts
+++ b/tools/binman/test/cbfs/no_size.dts
diff --git a/tools/binman/test/114_cbfs_offset.dts b/tools/binman/test/cbfs/offset.dts
index 7aa9d9d4bf3..7aa9d9d4bf3 100644
--- a/tools/binman/test/114_cbfs_offset.dts
+++ b/tools/binman/test/cbfs/offset.dts
diff --git a/tools/binman/test/102_cbfs_raw.dts b/tools/binman/test/cbfs/raw.dts
index 779cbc121ad..779cbc121ad 100644
--- a/tools/binman/test/102_cbfs_raw.dts
+++ b/tools/binman/test/cbfs/raw.dts
diff --git a/tools/binman/test/105_cbfs_raw_compress.dts b/tools/binman/test/cbfs/raw_compress.dts
index 646168d84b4..646168d84b4 100644
--- a/tools/binman/test/105_cbfs_raw_compress.dts
+++ b/tools/binman/test/cbfs/raw_compress.dts
diff --git a/tools/binman/test/103_cbfs_raw_ppc.dts b/tools/binman/test/cbfs/raw_ppc.dts
index df1caf092f4..df1caf092f4 100644
--- a/tools/binman/test/103_cbfs_raw_ppc.dts
+++ b/tools/binman/test/cbfs/raw_ppc.dts
diff --git a/tools/binman/test/142_replace_cbfs.dts b/tools/binman/test/cbfs/replace.dts
index d64142f9d5c..d64142f9d5c 100644
--- a/tools/binman/test/142_replace_cbfs.dts
+++ b/tools/binman/test/cbfs/replace.dts
diff --git a/tools/binman/test/104_cbfs_stage.dts b/tools/binman/test/cbfs/stage.dts
index 215e2f287a4..215e2f287a4 100644
--- a/tools/binman/test/104_cbfs_stage.dts
+++ b/tools/binman/test/cbfs/stage.dts
diff --git a/tools/binman/test/125_cbfs_update.dts b/tools/binman/test/cbfs/update.dts
index 6d2e8a0b8ff..6d2e8a0b8ff 100644
--- a/tools/binman/test/125_cbfs_update.dts
+++ b/tools/binman/test/cbfs/update.dts