Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inconsistency with env attribute behavior #113

Open
Adnan-Elhammoudi opened this issue Feb 26, 2024 · 1 comment
Open

inconsistency with env attribute behavior #113

Adnan-Elhammoudi opened this issue Feb 26, 2024 · 1 comment

Comments

@Adnan-Elhammoudi
Copy link

Hi @Rahix

I am using the same code to fetch the environmental variables in U-boot using env
with two different boards one with U-Boot 2023.07.02 and U-Boot 2020.04 respectively.

code:

       filesize =  ub.env("filesize")
       output = ub.exec0("crc32", f"{fileaddr}" ,f"{filesize}")
       assert expected_crc in output

and I have noticed an inconsistency with the result

First board:

│   ├─[device-u-boot] printenv fileaddr
│   │    ## fileaddr=60000000
│   ├─[device-u-boot] printenv filesize
│   │    ## filesize=2c
│   ├─[device-u-boot] crc32 60000000 2c
│   │    ## crc32 for 60000000 ... 6000002b ==> e58cdcf0
PASSEDPOWEROFF (imx8q)

second board:

│   ├─[device-u-boot] printenv fileaddr
│   │    ## 
│   │    ## fileaddr=80280000
│   ├─[device-u-boot] printenv filesize
│   │    ## 
│   │    ## filesize=2c
│   ├─[device-u-boot] crc32 '=80280000␍' '=2c␍'
│   │    ## 
│   │    ## > '
│   │    ## crc32 for 00000000 ... ffffffffffffffff ==> 00000000
FAILEDPOWEROFF (imx8q)


================================================================= FAILURES =================================================================
____________________________________________________________ test_net_tftpboot _____________________________________________________________

    def test_net_tftpboot():
           .
           .
           .
            fileaddr =  ub.env("fileaddr")
            filesize =  ub.env("filesize")
            output = ub.exec0("crc32", f"{fileaddr}" ,f"{filesize}")
>           assert expected_crc in output
E           assert 'e58cdcf0' in "\n> '\r\ncrc32 for 00000000 ... ffffffffffffffff ="

test_cases/test_unetwork.py:141: AssertionError
@Rahix
Copy link
Owner

Rahix commented Mar 2, 2024

Can you please rerun your testcases on the second board with channel debugging active so we can see in more detail where it is going wrong? If you are using the pytest integration, change this line:

-    with tbot.log.with_verbosity(tbot.log.Verbosity.STDOUT, nesting=1):
+    with tbot.log.with_verbosity(tbot.log.Verbosity.CHANNEL, nesting=1):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants