On Fri, 21 May 2021 at 15:46, Vinay Kumar <vinay.m.engg@gmail.com> wrote:

If we set "export TEST_DEVICE_ADDR=192.168.7.2:12345;" in do_check of
rust-testsuite.inc connection establishes with image
and the test execution is as expected.

That's because bitbake sanitizes the environment of the tasks and those externally set variables do not propagate into do_check().

I would suggest that you do not try to do the testing step as a bitbake task in a recipe, but rather move what it does directly into meta/lib/oeqa/selftest/cases/rust.py.

I will respond to the patch separately.

Alex