Re: [libgpiod][PATCH 2/2] bindings: python: tests: set the process name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 7 Dec 2022 at 11:57, Andy Shevchenko
<andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
>
> On Wed, Dec 07, 2022 at 10:14:13AM +0100, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
> >
> > When we run the test suite by calling the __main__ function of the module,
> > the name of the process as visible in the system becomes "python". Let's
> > set it to "python-gpiod" before running the tests. This way gpiosim will
> > name its configfs attributes appropriately.
>
> Perhaps you can refer to the [1] to explain why it's needed in Python.
> Also it can be done via ctype module [2][3] or via module [4], although
> I haven't checked if most used distros pack it.
>
> [1]: https://bugs.python.org/issue5672

Sounds good, thanks. I'll add it as Link:.

> [2]: https://stackoverflow.com/a/923034
> [3]: https://stackoverflow.com/a/31134436

We're already using cpython C extensions so let's not mix multiple
different FFIs.

> [4]: https://github.com/dvarrazzo/py-setproctitle

I was aware of this module, just don't want to pull third-party
requirements for python bindings if I don't need to.

Fun fact: the above C extension is a modified version of the code
generated by ChatGPT[1].

Bart

[1] https://imgur.com/a/SuDnyuO



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux