tbot
tbot copied to clipboard
inconsistency with env attribute behavior
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
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):