Project

General

Profile

Actions

Bug #5858

open

osmo-python-tests: Ignore, at least clean up 'tmp_dummy_sock'

Added by arehbein 18 days ago. Updated 18 days ago.

Status:
In Progress
Priority:
Normal
Assignee:
Target version:
-
Start date:
01/15/2023
Due date:
% Done:

20%

Spec Reference:

Description

I've had osmo-bsc/tests/ctrl_test_runner.py fail on me (make distclean didn't help either) seemingly inexplicably.

What seems to be happening is the script osmo-python-tests/scripts/osmotestconfig.py tries to copy the config directory to osmo-bsc/writtenconfig, and along the way - if osmo-bsc/tests/ctrl_test_runner.py exited before teardown of the testcase occurred, e.g. due to cancellation - it encounters an error due to trying to copy a socket file (tmp_dummy_sock), resulting in a very unspecific/misleading error (see https://github.com/python/cpython/issues/81881) and exits:

(osmo-python-tests/scripts/osmopythontestconfig.py: 42)

    # If there's a socket error, skip the rest of the tests for this config
    except IOError:
        return 1

I would suggest the following, unless there is a good reason why none of this has been done before (I suppose there isn't...):
  • ignore all files tmp_dummy_sock in shutil in osmo-python-tests/scripts/osmotestconfigpython.py
  • register a signal handler to clean up such files in osmo-bsc/tests/ctrl_test_runner.py
  • fix make clean, make distclean to cleanup such files

Possibly related: OS#5665


Related issues

Related to Core testing infrastructure - Bug #5665: ERROR: files left in build directory after distclean: ./tests/coreNewfixeria08/28/2022

Actions
Actions #1

Updated by arehbein 18 days ago

  • Related to Bug #5665: ERROR: files left in build directory after distclean: ./tests/core added
Actions #2

Updated by arehbein 18 days ago

Might also be good to print the exception involving a backtrace on error, because there are several operations that could throw one in that block

Actions #3

Updated by arehbein 18 days ago

WIP patch, currently with the ignore only:

https://gerrit.osmocom.org/c/python/osmo-python-tests/+/30980

Actions #4

Updated by arehbein 18 days ago

  • % Done changed from 0 to 20
Actions #5

Updated by arehbein 18 days ago

  • Status changed from New to In Progress
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)