summaryrefslogtreecommitdiff
path: root/test/py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-05-08 18:29:50 +0300
committerTom Rini <trini@konsulko.com>2022-05-08 18:29:50 +0300
commit258a57907d158d3ba54ec4e6daf0595d2f670d65 (patch)
treed23bd81722297b0febeb84ec7db4d4b23020702b /test/py
parent145921bdbdcfc24f18ce21d570ff86cc7e1fa3ba (diff)
parent9ac4c2bfe9f502549362c6d394c7024236146a5b (diff)
downloadu-boot-258a57907d158d3ba54ec4e6daf0595d2f670d65.tar.xz
Merge branch '2022-05-06-assorted-updates'
- Drop "linux,phandle" setting code, it's very long obsolete. - Add ability to fix broken GPT via backup GPT.
Diffstat (limited to 'test/py')
-rw-r--r--test/py/tests/test_gpt.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/py/tests/test_gpt.py b/test/py/tests/test_gpt.py
index 229d7eb2c2..f707d9f253 100644
--- a/test/py/tests/test_gpt.py
+++ b/test/py/tests/test_gpt.py
@@ -101,6 +101,16 @@ def test_gpt_verify(state_disk_image, u_boot_console):
@pytest.mark.boardspec('sandbox')
@pytest.mark.buildconfigspec('cmd_gpt')
@pytest.mark.requiredtool('sgdisk')
+def test_gpt_repair(state_disk_image, u_boot_console):
+ """Test the gpt repair command."""
+
+ u_boot_console.run_command('host bind 0 ' + state_disk_image.path)
+ output = u_boot_console.run_command('gpt repair host 0')
+ assert 'Repairing GPT: success!' in output
+
+@pytest.mark.boardspec('sandbox')
+@pytest.mark.buildconfigspec('cmd_gpt')
+@pytest.mark.requiredtool('sgdisk')
def test_gpt_guid(state_disk_image, u_boot_console):
"""Test the gpt guid command."""