[U-Boot,2/2] test: Fix test_vboot to call openssl without redirection

Message ID 20180516071025.21270-2-sjg@chromium.org
State New
Delegated to: Simon Glass
Headers show
Series
  • [U-Boot,1/2] test: Fix sandbox_spl test filter
Related show

Commit Message

Simon Glass May 16, 2018, 7:10 a.m.
The redirection seems to cause this test to fail now. It isn't needed, so
drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 test/py/tests/test_vboot.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Stephen Warren May 16, 2018, 3:55 p.m. | #1
On 05/16/2018 01:10 AM, Simon Glass wrote:
> The redirection seems to cause this test to fail now. It isn't needed, so
> drop it.

I guess I have no particular objection to this, but I will point out 
that the test is working just fine as-is right now, so it might be worth 
investigating more re: what the error is and why it's happening... It'd 
be good to describe the details of the failure in the commit description 
too.
Simon Glass May 16, 2018, 8:57 p.m. | #2
Hi Stephen,

On 16 May 2018 at 09:55, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 05/16/2018 01:10 AM, Simon Glass wrote:
>>
>> The redirection seems to cause this test to fail now. It isn't needed, so
>> drop it.
>
>
> I guess I have no particular objection to this, but I will point out that
> the test is working just fine as-is right now, so it might be worth
> investigating more re: what the error is and why it's happening... It'd be
> good to describe the details of the failure in the commit description too.

So the test works OK for you? For me it fails. I'll update the commit message.

        # Store the output so it can be accessed if we raise an exception.
        self.output = output
        self.exit_status = exit_status
        if exception:
>           raise exception
E           Exception: Exit code: 1

test/py/multiplexed_log.py:173: Exception
--------------------------------------- Captured stdout call
---------------------------------------
+openssl genpkey -algorithm RSA -out
/usr/local/google/home/sjg/cosarm/src/third_party/u-boot/files/build-sandbox/dev.key
-pkeyopt rsa_keygen_bits:2048 -pkeyopt rsa_keygen_pubexp:65537
2>/dev/null
genpkey: Use -help for summary.
Exit code: 1

Regards,
Simon

Patch

diff --git a/test/py/tests/test_vboot.py b/test/py/tests/test_vboot.py
index ee939f2034e..3009529c6dc 100644
--- a/test/py/tests/test_vboot.py
+++ b/test/py/tests/test_vboot.py
@@ -177,8 +177,8 @@  def test_vboot(u_boot_console):
     public_exponent = 65537
     util.run_and_log(cons, 'openssl genpkey -algorithm RSA -out %sdev.key '
                      '-pkeyopt rsa_keygen_bits:2048 '
-                     '-pkeyopt rsa_keygen_pubexp:%d '
-                     '2>/dev/null'  % (tmpdir, public_exponent))
+                     '-pkeyopt rsa_keygen_pubexp:%d' %
+                     (tmpdir, public_exponent))
 
     # Create a certificate containing the public key
     util.run_and_log(cons, 'openssl req -batch -new -x509 -key %sdev.key -out '