diff mbox series

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

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

Commit Message

Simon Glass May 16, 2018, 7:10 a.m. UTC
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. UTC | #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. UTC | #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
Simon Glass June 8, 2018, 6:02 a.m. UTC | #3
Hi Stephen,

On 16 May 2018 at 12:57, Simon Glass <sjg@chromium.org> wrote:
> 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
>

From Stephen:

> Yes. I just double-checked and it's definitely running in Jenkins for me; not being skipped or anything. It's running on Denx u-boot.git, u-boot-dm.git and a slew of others too. I assume it's running on Travis CI without issue too.

> I'm running Ubuntu 16.04 right now, but only recently upgraded from 14.04 where I believe the test was running without issue too. Is this issue OS-specific or Python-version-specific (I have 2.7.12)?

I am really not sure what is going on...I can definitely repeat this
but only on my workstation, not my laptop.

I will see if I can dig into it further.

Regards,
Simon
Simon Glass July 15, 2018, 9:22 p.m. UTC | #4
Hi Stephen,

On 8 June 2018 at 00:02, Simon Glass <sjg@chromium.org> wrote:
>
> Hi Stephen,
>
> On 16 May 2018 at 12:57, Simon Glass <sjg@chromium.org> wrote:
> > 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
> >
>
> From Stephen:
>
> > Yes. I just double-checked and it's definitely running in Jenkins for me; not being skipped or anything. It's running on Denx u-boot.git, u-boot-dm.git and a slew of others too. I assume it's running on Travis CI without issue too.
>
> > I'm running Ubuntu 16.04 right now, but only recently upgraded from 14.04 where I believe the test was running without issue too. Is this issue OS-specific or Python-version-specific (I have 2.7.12)?
>
> I am really not sure what is going on...I can definitely repeat this
> but only on my workstation, not my laptop.
>
> I will see if I can dig into it further.

I found a patch from someone else from a while back, which you had
reviewed :-) So I applied that.

The redirection only works if a shell is being used, and it normally
isn't. We certainly are not requesting a shell when calling
subprocess. As to why on some machines we appear to get one anyway, I
cannot comment.

Regards,
Simon
diff mbox series

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 '