diff mbox series

[3/3] test: py: tests: test_gpt.py: add a simple test for the command gpt repair

Message ID 20220422154650.160435-4-philippe.reynes@softathome.com
State Accepted
Commit b6b6a906469ab11f460b493a5ecca8160393bfad
Delegated to: Tom Rini
Headers show
Series gpt: add support to repair gpt | expand

Commit Message

Philippe REYNES April 22, 2022, 3:46 p.m. UTC
Adds a simple test for the command gpt repair.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
---
 test/py/tests/test_gpt.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Tom Rini May 8, 2022, 3:31 p.m. UTC | #1
On Fri, Apr 22, 2022 at 05:46:50PM +0200, Philippe Reynes wrote:

> Adds a simple test for the command gpt repair.
> 
> Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

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
@@ -98,6 +98,16 @@  def test_gpt_verify(state_disk_image, u_boot_console):
     output = u_boot_console.run_command('gpt verify host 0')
     assert 'Verify GPT: success!' in output
 
+@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')