RTEMS Tools | rtems-run: TypeError: console.open() takes 1 positional argument but 3 were given (#13)

Frank Kuehndel (@frank_k) gitlab at rtems.org
Mon Sep 2 12:43:43 UTC 2024



Frank Kuehndel created an issue: https://gitlab.rtems.org/rtems/tools/rtems-tools/-/issues/13



## Summary

We have a CI job which regular checks the [Rust documentation in the RTEMS user manual](Rust documentation in the RTEMS user manual). It failed 2024-08-29T03:30:57+02:00 with the following Error:

```
$ rtems-run --rtems-bsp=rv64imafdc hello_rtems_riscv.exe


RTEMS Testing - Run, 6.0.not_released
 Command Line: /opt/rtems/6/bin/rtems-run --rtems-bsp=rv64imafdc hello_rtems_riscv.exe
 Host: Linux 0d087dc755c2 5.14.21-150500.55.73-default #1 SMP PREEMPT_DYNAMIC Tue Aug 6 15:51:33 UTC 2024 (a0ede6a) x86_64
 Python: 3.12.3 (main, Jul 31 2024, 17:43:48) [GCC 13.2.0]
Host: Linux-5.14.21-150500.55.73-default-x86_64-with-glibc2.39 (Linux 0d087dc755c2 5.14.21-150500.55.73-default #1 SMP PREEMPT_DYNAMIC Tue Aug 6 15:51:33 UTC 2024 (a0ede6a) x86_64 x86_64)
Traceback (most recent call last):
  File "/opt/rtems/6/bin/rtems-run", line 42, in <module>
    tester.rt.run.run(sys.argv)
  File "/opt/rtems/6/share/rtems/tester/rt/run.py", line 144, in run
    tst.run()
  File "/opt/rtems/6/share/rtems/tester/rt/run.py", line 75, in run
    self.config.run()
  File "/opt/rtems/6/share/rtems/tester/rt/config.py", line 403, in run
    self.load(self.name)
  File "/opt/rtems/6/share/rtems/rtemstoolkit/config.py", line 772, in load
    dir, info, data = self._process_directive(r, dir, info, data)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/rtems/6/share/rtems/rtemstoolkit/config.py", line 638, in _process_directive
    directive, into, data = self._directive_filter(results, directive, info, data)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/rtems/6/share/rtems/tester/rt/config.py", line 358, in _directive_filter
    self._dir_execute(ds, total, index, fexe, bsp_arch, bsp)
  File "/opt/rtems/6/share/rtems/tester/rt/config.py", line 240, in _dir_execute
    self.console.open(index, total)
TypeError: console.open() takes 1 positional argument but 3 were given
```

So the command `rtems-run --rtems-bsp=rv64imafdc hello_rtems_riscv.exe` caused the error. The GIT_HEADs for the failed build where:

```
BUILD_GIT_RSB="7298cc8103d90177f46517d577f9b661de8424b9"
BUILD_GIT_RTEMS="ad51286e2b00f0e2bdd080397f4287646f512ef1"
BUILD_GIT_RTEMS_DOCS="b48c84bc4906d74ae644f005ae485e108cdb006d"
Python 3.12.3
Container OS: Ubuntu 24.04.1 LTS
```

The last run of this CI job without showing this error was on 2024-08-26T03:32:02+02:00. The GIT_HEADs for the good bild where:

```
BUILD_GIT_RSB="f279f357e61e2e4ab56eef4c718d45c0f7cdd652"
BUILD_GIT_RTEMS="07728e0913d694751abc429acb3598d91aff0cb9"
BUILD_GIT_RTEMS_DOCS="b48c84bc4906d74ae644f005ae485e108cdb006d"
```

I assume the error is triggered by the merge of https://gitlab.rtems.org/rtems/tools/rtems-tools/-/merge_requests/24 because it changed the relevant line in `tester/rt/config.py`:

```
        self.process = tester.rt.exe.exe(bsp_arch, bsp, trace = self.exe_trace('exe'))
        if not self.in_error:
            if self.console:
                self.console.open()
                self.console.open(index, total)
            if not self.opts.dry_run():
                self.process.open(data,
                                  ignore_exit_code = self.defined('exe_ignore_ret'),
```

@kirspelk I cannot assign this issue but may I ask you to have a look into this issue? Thanks.

## Steps to reproduce

The CI job which found this issue carries out the exact instructions you can find in section [Bare Metal Rust with RTEMS](https://docs.rtems.org/branches/master/user/rust/bare-metal.html#bare-metal-rust-with-rtems). It actually extracts the instructions from the source code of the page in the `rtems-docs` repository.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/tools/rtems-tools/-/issues/13
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20240902/f20bcb47/attachment.htm>


More information about the bugs mailing list