public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Igor Opaniuk <igor.opaniuk@foundries.io>
To: u-boot@lists.denx.de
Cc: Igor Opaniuk <igor.opaniuk@gmail.com>, Tom Rini <trini@konsulko.com>
Subject: [PATCH v1 4/5] test: py: add optee_rpmb tests
Date: Wed, 14 Feb 2024 19:34:43 +0100	[thread overview]
Message-ID: <20240214183444.493629-5-igor.opaniuk@gmail.com> (raw)
In-Reply-To: <20240214183444.493629-1-igor.opaniuk@gmail.com>

Add read/write tests for optee_rpmb cmd.

Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
---

 test/py/tests/test_optee_rpmb.py | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 test/py/tests/test_optee_rpmb.py

diff --git a/test/py/tests/test_optee_rpmb.py b/test/py/tests/test_optee_rpmb.py
new file mode 100644
index 00000000000..8a081b5c494
--- /dev/null
+++ b/test/py/tests/test_optee_rpmb.py
@@ -0,0 +1,20 @@
+# SPDX-License-Identifier:  GPL-2.0+
+#
+# Tests for OP-TEE RPMB read/write support
+
+"""
+This tests optee_rpmb cmd in U-Boot
+"""
+
+import pytest
+import u_boot_utils as util
+
+@pytest.mark.buildconfigspec('cmd_optee_rpmb')
+def test_optee_rpmb_read_write(u_boot_console):
+    """Test OP-TEE RPMB cmd read/write
+    """
+    response = u_boot_console.run_command('optee_rpmb write_pvalue test_variable test_value')
+    assert response == 'Wrote 11 bytes'
+
+    response = u_boot_console.run_command('optee_rpmb read_pvalue test_variable 11')
+    assert response == 'Read 11 bytes, value = test_value'
\ No newline at end of file
-- 
2.34.1


  parent reply	other threads:[~2024-02-14 18:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-14 18:34 [PATCH v1 0/5] TEE: minor cleanup Igor Opaniuk
2024-02-14 18:34 ` [PATCH v1 1/5] tee: optee: fix description in Kconfig Igor Opaniuk
2024-02-14 21:40   ` Heinrich Schuchardt
2024-03-01  6:53   ` Ilias Apalodimas
2024-02-14 18:34 ` [PATCH v1 2/5] tee: sandbox: fix spelling errors Igor Opaniuk
2024-02-14 21:41   ` Heinrich Schuchardt
2024-03-01  6:55   ` Ilias Apalodimas
2024-02-14 18:34 ` [PATCH v1 3/5] cmd: optee_rpmb: build cmd for sandbox Igor Opaniuk
2024-02-15  9:52   ` Mattijs Korpershoek
2024-02-14 18:34 ` Igor Opaniuk [this message]
2024-02-14 18:34 ` [PATCH v1 5/5] tee: remove common.h inclusion Igor Opaniuk
2024-02-29 19:11 ` [PATCH v1 0/5] TEE: minor cleanup Igor Opaniuk
2024-02-29 19:25   ` Peter Robinson
2024-02-29 19:38     ` Tom Rini
2024-03-01  9:40   ` Ilias Apalodimas
2024-03-02 22:02     ` Igor Opaniuk

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=20240214183444.493629-5-igor.opaniuk@gmail.com \
    --to=igor.opaniuk@foundries.io \
    --cc=igor.opaniuk@gmail.com \
    --cc=trini@konsulko.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox