All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Reynes <philippe.reynes@softathome.com>
To: sjg@chromium.org
Cc: u-boot@lists.denx.de, Philippe Reynes <philippe.reynes@softathome.com>
Subject: [PATCH 3/3] test: py: tests: test_gpt.py: add a simple test for the command gpt repair
Date: Fri, 22 Apr 2022 17:46:50 +0200	[thread overview]
Message-ID: <20220422154650.160435-4-philippe.reynes@softathome.com> (raw)
In-Reply-To: <20220422154650.160435-1-philippe.reynes@softathome.com>

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(+)

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')
-- 
2.25.1


  parent reply	other threads:[~2022-04-22 15:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-22 15:46 [PATCH 0/3] gpt: add support to repair gpt Philippe Reynes
2022-04-22 15:46 ` [PATCH 1/3] disk: part_efi: add support to repair gpt table Philippe Reynes
2022-05-08 15:31   ` Tom Rini
2022-04-22 15:46 ` [PATCH 2/3] cmd: gpt: add subcommand repair Philippe Reynes
2022-05-08 15:31   ` Tom Rini
2022-04-22 15:46 ` Philippe Reynes [this message]
2022-05-08 15:31   ` [PATCH 3/3] test: py: tests: test_gpt.py: add a simple test for the command gpt repair Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220422154650.160435-4-philippe.reynes@softathome.com \
    --to=philippe.reynes@softathome.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.