osmo-gsm-tester[master]: log: Use sys._getframe() to avoid stat(2) calls

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Mon Feb 12 10:29:20 UTC 2018


Patch Set 1: Code-Review-1

(1 comment)

Regarding the test failure: We recently updated the unit running osmo-gsm-tester to debian9 using new ansible recipes and we are experiencing some ofono modems stability issues and I need to restart ofono every few hours. I restarted ofono and re-triggered the jenkins job.

https://gerrit.osmocom.org/#/c/6377/1/src/osmo_gsm_tester/log.py
File src/osmo_gsm_tester/log.py:

Line 278:     # Poke into internal to avoid hitting the linecache which will make one or
According to [1], _getframe() can have a depth parameter, which if I understand correctly, makes useless the for loop below as you can pass levels_up - 1 directly. Then better except for ValueError and return "<unknown:unknown>" if raised.

In the doc it is also specified that this function is cython specific, which means it may be better to leave old implementation as fallback. Check for except AttributeError when calling sys._getframe() and then call older implementation.

[1] https://docs.python.org/3/library/sys.html


-- 
To view, visit https://gerrit.osmocom.org/6377
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8f6bacadcf74d3aa25db1e1f41644f64aa19cf92
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list