Skip to content

if the ping utility is missing the error message is missleading #63

@TimofteBogdan1900

Description

@TimofteBogdan1900

When ping command is missing from host the error message is missleading . The target is ping-able but the ping utility is missing

.....
==================================== ERRORS ====================================
________________ ERROR at setup of test_cpp_unit_tests_on_qemu _________________

config = {'qemu_config': namespace(networks=[namespace(name='tap-qemu1', ip_address='192.168.87.2', gateway='192.168.87.1')], ssh_port}
request = <SubRequest 'target_init' for >
dlt = None

@pytest.fixture(scope="session")
def target_init(config, request, dlt):
    logger.info(f"Starting tests on host: {socket.gethostname()}")
    with qemu_target(config) as qemu:
      pre_tests_phase(qemu)

../score_itf+/score/itf/plugins/qemu/init.py:56:


../score_itf+/score/itf/plugins/qemu/checks.py:25: in pre_tests_phase
_check_ping(target, check_timeout=10)


target = <score.itf.plugins.qemu.qemu_target.QemuTarget object at 0x79282cf43a40>
check_timeout = 10

def _check_ping(target, check_timeout: int = 180):
    """Checks whether the target can be pinged.

    :param Target target: Target to ping.
    :param boolext_ip: Use external IP address. Default: False.
    :param int check_timeout: How long to wait for check to succeed. Default: 180.
    :raises AssertionError: If the target cannot be pinged within the specified time-frame.
    """
    result = target.ping(timeout=check_timeout)
  assert result, f"Target is not pingable within expected time frame"

E AssertionError: Target is not pingable within expected time frame
E assert False
....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions