I see main gap is next, for others, I all could adapt to the new changes to make reset shell work:

 

elif name == "test":

        parameters["stage"] = test_count

        cls = LavaTest.select(device, parameters)

        action = cls.action(parameters)

 

In fact, both “boot” & “deploy” did not pass “parameters” to “cls.action()”, just “test” did it.

And “docker.py”, “interactive.py”, “monitor.py”, “shell.py” in fact no need the “parameters”, just “multinode.py” need it to call “get_subaction(parameters)”, so you add the “parameters” for multinode test use.

 

So, if it’s also reasonable to add back the “pipeline”, like “action = cls.action(parameters, pipeline)”, test action could just don’t use it like they treat with “parameters”, but if any test action need the “pipeline”, just use it.

 

Or if above not accept, then still the question, if possible with other way I could get the parameters of boot action when Im in a test action? Thanks.

 

From: Larry Shen
Sent: Friday, May 15, 2020 2:41 PM
To: lava-users@lists.lavasoftware.org
Subject: Need help for 2020.05 release.

 

Hi,

 

We have a problem here needs your help, as its critical to us, could you give some suggestion? Thanks in advance.

 

You know, we submit a MR here about reset shell: https://git.lavasoftware.org/lava/lava/-/merge_requests/1023

 

Its nearly compatible from 2018.11 to 2020.04 release when we patch it in local, the only changes I remember is once upon a time you changed all internal_pipeline to pipeline, so we had to follow the new name.

 

But in yesterdays 2020.05 release, I saw this commit: https://git.lavasoftware.org/lava/lava/-/commit/eefeef1864cc055c48215169b616e6ed7b0b0715

 

In this commit, the test action no longer been added as before like next:

 

def __init__(self, parent, parameters):

        super().__init__(parent)

        self.action = TestShellRetry()

        self.action.job = self.job

        self.action.section = self.action_type

        parent.add_action(self.action, parameters)

 

It becomes next:

 

    @classmethod

    def action(cls, parameters):

        return TestShellRetry()

 

Correspondingly, in parse.py, it becomes from next:

 

action(pipeline, parameters)

 

to next:

 

action = cls.action(parameters)

 

That means parent pipeline no longer been passed to next level pipeline, parse.py will responsible for low level action inject into pipeline.

 

Above change is the key issue we encountered as in our ResetTestShell we need to reuse the parameters of Boot in same namespace, we need it to operate UBoot & Login again after device reset, like next:

 

def __init__(self, parent, parameters):

        super().__init__(parent)

 

        boot_action_para = None

        for per_action in parent.actions:

            if per_action.parameters["namespace"] == parameters["namespace"]:

                if per_action.__class__.__base__.__name__ == "BootAction":

                    boot_action_para = per_action.parameters

 

        self.action = TestShellLoop(boot_action_para)

        self.action.job = self.job

        self.action.section = self.action_type

        parent.add_action(self.action, parameters)

 

You see we could get the Boot action from its parent action, thus we could get the boot actions parameters defined in job.yaml, then reconstruct the boot action, inject it as a internal action to our own test action.

 

But now, we cant do it as parent action no longer be passed to low level action

 

Could you give me some suggestion on it, if any other way I could get the parameters of boot action when Im in test action?

 

Thanks again.

 

Regards,

Larry