Avocado-framework

Latest version: v104.0

Safety actively analyzes 619494 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 6

104.0

Users/Test Writers
==================

* The minimal Python version requirement now is 3.8. Python 3.7 and
earlier are not tested nor supported starting with this release.
* The result.json test attributes related to time has been renamed in version 104.0
to correspond to `job.result.tests` in Job API. The Difference between new and old::

time_start = start
actual_time_start = actual_start
time_end = end
actual_time_end = actual_end
time_elapsed = time

* The parsing of avocado configuration files has been improved to
show better error messages during parsing error.
* Unused and legacy ``simpletest.*`` settings have been removed
from avocado as leftover of legacy runner.

Utility Modules
===============

* :func:`avocado.utils.network.interfaces.NetworkInterface.get_device_IPI_name`,
got a fix for "ERROR: 'CmdResult' object has no attribute 'decode'".
* :func:`avocado.utils.data_structures.comma_separated_ranges_to_list` has been optimized.
* :mod:`avocado.utils.podman` got a synchronous version of podman utilities.

Bug Fixes
=========

* TaskStatusService got error handling for lost connection and
``avocado-runner-*`` won’t crash any more when the status server socket is closed.

Internal Changes
================

* The ``contrib/scripts/avocado-fetch-eggs.py`` got an update for
egg handling related to post LTS changes.
* Added CodeQL workflow for GitHub code scanning in Avocado repo.
* The ``tmpfile.mktemp`` has been changed to ``tmpdir`` because of security reasons.
* CI: fix for testing of different OS images with egg and version tasks.
* Unused and legacy ``runner queue`` has been removed from :class:`avocado.Test`.

Additional information
======================

For more information, please check out the complete
`Avocado changelog
<https://github.com/avocado-framework/avocado/compare/103.0...104.0>`_.

For more information on the actual issues addressed, please check out
the `milestone information
<https://github.com/avocado-framework/avocado/milestone/30>`_.

For more information on the release codename, please refer to `IMDb
<https://www.imdb.com/title/tt9362492/>`_.

103.0

Not secure
Users/Test Writers
==================

* The remote spawner is a new optional plugin that makes use of remote
aexpect (https://github.com/avocado-framework/aexpect/) sessions
(to remote hosts or equivalently remote containers behind remote hosts
forwarded via specific ports) as slots to schedule test runs on.

* The format of test log messages have been reverted to more closely
match previous LTS (92.x) format like line number and Python module
name (see https://github.com/avocado-framework/avocado/issues/5721).

* The ``avocado-instrumented`` runner used to have an internal timeout
of 24 hours that users might not have intended to use or respect.
This internal timeout has been removed and configuration such as
``task.timeout.running`` or ``--job-timeout`` are the timeout users
should worry about (see https://github.com/avocado-framework/avocado/issues/5394).

* The ``json`` result file now contains the actual start and end time
of tests in a format based on :func:`time.time` (see
https://github.com/avocado-framework/avocado/pull/5768).

* The ``avocado jobs list`` command now presents a sorted list of jobs
based on the modification of the results file (see https://github.com/avocado-framework/avocado/pull/5762/commits/a956ff05ad18cec8fad88401a51d95a9da4a1462.

* If the status server is manually configured (that is,
``--status-server-disable-auto`` is set), and either the URI
(``--status-server-uri`` or the listen address is given
(``--status-server-listen``) the other will automatically be set to
the same value for convenience (see
https://github.com/avocado-framework/avocado/pull/5748).

* Python 3.12 is now formally supported (see
https://github.com/avocado-framework/avocado/pull/5789).

* Resolvers can now choose to report a resolution result of type
:data:`avocado.core.resolver.ReferenceResolutionResult.CORRUPT`, which
can be used when the reference seems to be accurate to the resolver in
question, but something is broken in the resolved entity (such as a
corrupt test file. See
https://github.com/avocado-framework/avocado/issues/5710.

* When running ``avocado-instrumented`` tests with a ``timeout``
defined, it's possible to set a ``timeout_factor`` parameter that
will either extend or shorten the actual timeout for that execution
(see https://github.com/avocado-framework/avocado/issues/5820).

Utility Modules
===============

* The :meth:`avocado.utils.ssh.Session.cmd` now supports setting a
``timeout`` for the command execution (see
https://github.com/avocado-framework/avocado/issues/5775).

* The :mod:`avocado.utils.distro` module added specific detection for
CentOS Stream (see https://github.com/avocado-framework/avocado/issues/5667).

* The :mod:`avocado.utils.distro` module improved detection for
Amazon Linux (see https://github.com/avocado-framework/avocado/issues/5668>.

Bug Fixes
=========

* The loader for ``avocado-instrumented`` tests could end up using the
wrong Python module if a module of the same name existed elsewhere
in the import path. Now, the actual path of the Python file
containing the test (given in the ``modulePath`` parameter) is used
explicitly by the Python module importer (see
https://github.com/avocado-framework/avocado/issues/5686).

* When :ref:`dependencies <managing-requirements>` are not fulfilled,
test results would be missing, instead of being clearly shown as
``CANCEL`` (see https://github.com/avocado-framework/avocado/issues/5667).

* :func:`avocado.utils.path.init_dir` would raise
:class:`FileExistsError` if the directory already existed, usually
causing crashes on its users (see `5746
<https://github.com/avocado-framework/avocado/pull/5746>`__).

* The :ref:`whiteboard <saving-test-generated-custom-data>` file was
being created with duplicate content because of the legacy runner
implementation, which is now removed (see `5770
<https://github.com/avocado-framework/avocado/issues/5770>`__).

* The ``avocado jobs show`` command now presents the correct time
tests have ended (see `5762
<https://github.com/avocado-framework/avocado/pull/5762/commits/b7ec30e69b2a51f97eb97ee445b12997366b5652>`__).

* The :func:`avocado.utils.download.url_open` function used to
misleadingly says that a URL had been retrieved at a stage where
only a response was obtained. It now presents an accurate message
(see `5742
<https://github.com/avocado-framework/avocado/issues/5742>`__).

* The Podman Spawner had a race condition where the state of the
container (and thus the task) would not take into account the
transition from "created" to "running" (see `5783
<https://github.com/avocado-framework/avocado/pull/5783>`__).

* Avocado has re-enabled ``stdout`` and ``stderr`` files for
``avocado-instrumented`` files (see `5779
<https://github.com/avocado-framework/avocado/issues/5779>`__).

* The Spawner interface and implementations now properly checks if the
termination of a task was successful or not. The statemachine uses
that information to let users know of situations where a task could
not be terminated (see `5788
<https://github.com/avocado-framework/avocado/pull/5788>`__).

* The ``tearDown()`` of ``avocado-instrumented`` now gets called
properly if a test times out (see `5795
<https://github.com/avocado-framework/avocado/pull/5795>`__).

* The Process Spawner now properly handles a situation where, during
the termination of a task, the process itself finishes before the
spawner has the chance to do so (see `5805
<https://github.com/avocado-framework/avocado/pull/5805>`__).

* When interrupting ``avocado-instrumented`` tests, the ``tearDown()``
will be called to allow for cleanups. If an error occurred during
the execution of ``tearDown()`` the status of the test would change
to ``ERROR`` (instead of keeping its original ``INTERRUPT`` status
(see `5801
<https://github.com/avocado-framework/avocado/issues/5801>`__).

* The HTML result plugin was not properly filtering tests based on
their status (see `5828
<https://github.com/avocado-framework/avocado/issues/5828>`__).

* The ``testlogs`` plugin was not showing tests with all "not ok"
statuses and was showing test names instead of test IDs which are
unique in a suite (see `5827
<https://github.com/avocado-framework/avocado/issues/5827>`__).

Additional information
======================

For more information, please check out the complete
`Avocado changelog
<https://github.com/avocado-framework/avocado/compare/102.0...103.0>`_.

For more information on the actual issues addressed, please check out
the `milestone information
<https://github.com/avocado-framework/avocado/milestone/29?closed=1>`_.

For more information on the release codename, please refer to `IMDb
<https://www.imdb.com/title/tt7599146>`_.

102.0

Not secure
Users/Test Writers
==================

* There were major changes to the Avocado logging behavior, most of them
to address feedback from users since the previous logging changes:

* The root logger handler was restored. This enables all loggers out
of ``avocado.*`` namespace by default. If a test, either directly
or indirectly through 3rd party libraries, logs into any namespace
(say ``logging.getLogger('my-library')``) it will show up in the
Avocado's test logs.
* The ``job.log`` file continues to contain logs for the
``avocado.job`` namespace, but a new file called ``full.log``
contains all generated logs for a job, including logs from all
tests.

* The Avocado Resolver now allows tests that are implemented in files
(by far the most common scenario) and that may also access test data
files (see :ref:`accessing-test-data-files`) to pass that
information along to spawners. The effect of that is that when
running such tests on "remote" spawner environments (such as
"podman") the test file and the data files can be made available in
the remote environment. This is currently enabled in
``avocado-instrumented``, ``python-unittest``, ``exec-test`` and
``tap`` tests.

* User of macOS will have a better experience when using Avocado. The
full set of Avocado's selftests are now run under macOS on CI.
Please be advised that macOS is not currently supported at the same
level of Linux-based operating systems due to the lack of
contributors/maintainers with access to the needed hardware. If you
are a user/developer and are willing to contribute to this, please
let the Avocado team know.

* :ref:`sysinfo-collection` is now fully supported in nrunner,
including per-test collection of system information.

* A new plugin interface called :class:`PostTest
<avocado.core.plugin_interfaces.PostTest>` allow actions to be
executed right after the execution of a test, in the same spawner
environment as the test itself. This complements the :class:`PreTest
<avocado.core.plugin_interfaces.PreTest>` introduced on version 101.0.

* Environment variables such as ``AVOCADO_TEST_BASEDIR``,
``AVOCADO_TEST_LOGDIR`` and ``AVOCADO_TEST_LOGFILE`` are now
made available to ``exec-test``.

Utility Modules
===============

* New functions were added to :mod:`avocado.utils.nvme`, such as
:func:`avocado.utils.nvme.create_namespaces`,
:func:`avocado.utils.nvme.get_ns_status` and
:func:`avocado.utils.nvme.get_nslist_with_pci`.

* A new :func:`avocado.utils.multipath.get_mpath_paths_status` that
returns the status of all paths of a mpath device was introduced.

* :mod:`avocado.utils.distro` received updates to support more recent
versions of the UnionTech OS.

Bug Fixes
=========

* Avocado now presents the correct message when it's interrupted with
a "CTRL+C" (AKA ``SIGNINT``, AKA ``KeyboardInterrupt``).

* The ``fetchasset`` plugin would fail when parsing some Python test
files (in search of assets) and would produce a hard to follow error
message (``AttributeError: 'Subscript' object has no attribute 'id'``).

* When tests were implemented in base classes (without tags), but then
the derived classes added tags, the resulting tests in the derived
class would not have the derived class tags applied to them.

Internal Changes
================

* The ``avocado.app.debug`` and controlling environment variable
``AVOCADO_LOG_DEBUG`` have been removed to simplify the logging
code.

* The documentation for the optional plugins were previously hosted in
the main Avocado "directory", but are now integral part of each
individual plugin. This makes the documentation available as each
individual package metadata too (which will now show on PyPI).

* The plugin information given as the output to ``avocado plugins``
command is now much more dynamic (instead of hard coded). That
also fixes a plugin section that used to be missing.

Additional information
======================

For more information, please check out the complete
`Avocado changelog
<https://github.com/avocado-framework/avocado/compare/101.0...102.0>`_.

For more information on the actual issues addressed, please check out
the `milestone information
<https://github.com/avocado-framework/avocado/milestone/28?closed=1>`_.

For more information on the release codename, please refer to `IMDb
<https://www.imdb.com/title/tt0211181>`_.

101.0

Not secure
Users/Test Writers
==================

* The ``xunit`` (AKA ``junit``) result file now contains the class
name and better error information for test cases.

* The ``xunit`` and ``json`` result files now contain the test variant
information.

* The documentation now uses proper terminology everywhere, matching
the nrunner architecture.

Utility Modules
===============

* :mod:`avocado.utils.cpu` introduced a utility to check if a given CPU
is hotpluggable.

* :mod:`avocado.utils.network` introduced
:func:`avocado.utils.network.hosts.Host.validate_mac_addr` which
checks if a given MAC address is valid.

* :mod:`avocado.utils.network` now adds a missing network mask prefix
when creating static configurations.

* :mod:`avocado.utils.disk` introduced
:func:`avocado.utils.disk.get_disks_by_id` which returns all disks by
device ids.

* :mod:`avocado.utils.archive` added support for Zstandard
uncompression.

Bug Fixes
=========

* Test runners written in Python (using Python modules as an
entrypoint) will now be found by the podman spawner.

* A runnable's variant (and thus parameters) information was not being
respected when using the Job API.

Internal Changes
================

* A number of lint checks were added, with the bump of Pylint to
version 2.15.10.

* Besides the main Avocado egg, all of the optional plugins (but part
of the Avocado code repository), now build eggs on the CI.

Additional information
======================

For more information, please check out the complete
`Avocado changelog
<https://github.com/avocado-framework/avocado/compare/100.0...101.0>`_.

For more information on the actual issues addressed, please check out
the `milestone information
<https://github.com/avocado-framework/avocado/milestone/27?closed=1>`_.

For more information on the release codename, please refer to `IMDb
<https://www.imdb.com/title/tt0055254/>`_.

100.1

Not secure
========================

* Podman spawner bug fix: use runner plugins instead of removed
generic nrunner. This is the issue that prompted this bug fix
release, and it re-enables the Podman spawner functionality when
using the default eggs provided by the Avocado project.

* Include Python 3.11 eggs builds during the release process.

* CI (GitHub Actions) fixes and versions bumps.

The following changes are from the 100.0 release notes.

Users/Test Writers
==================

* Asset cache checksum can now use multiple hash algorithms. The
ability to store multiple hashes, created by different algorithm to
the cache ``CHECKSUM`` file was added. This is useful when
different tests refer to the same asset, but use different hash
algorithms.

* Information on a test's file name was introduced in the xunit/junit
result files. Although not a standard field everywhere, this
information is used and displayed on platforms such as GitLab.

* Python 3.11 (final) is now formally supported and tested on CI.

* The ``runner.output.utf8`` and ``core.input_encoding`` were settings
were removed, and now default to the the system's setting (by using
:func:`sys.getdefaultencoding()`.

* Command line options prefixed with ``--nrunner-`` had that prefixed
removed. A command line option such as ``--nrunner-spawner`` is now
simply ``--spawner``. The matching configuration options such as
``nrunner.something`` became ``run.something``. This is due to the
fact that nrunner is now the only runner implementation offered by
default, so the differentiation and extra typing seems unnecessary.
If other runners are added in the future (or by custom, out of tree,
plugins) they can choose to respect the existing options if they
apply.

* The ``avocado jobs get-output-files`` command was removed. Its
original intended purpose has not been relevant for some time, and
the preservation of output files are already handled directly by all
spawner implementations.

Utility Modules
===============

* :mod:`avocado.utils.process` received the changes necessary to cope
with changes in :func:`signal.default_int_handler`. It now passes
all the given arguments along.

* :mod:`avocado.utils.software_manager` now allows DNF/YUM repository
options to be customized.

Bug Fixes
=========

* Fixed a limit for ``exec-test`` and ``tap`` tests, where the
``STDOUT`` or ``STDERR`` buffers could be exhausted, and the test
would get stuck forever on further writes. The ``exec-test`` and
``tap`` runners can now make use of the (optional) ``output_dir``
parameter, resulting in a much more efficient I/O handling. When
``output_dir`` is used, the only limitation on ``STDOUT`` and
``STDERR`` is the file-system itself.

* The ``--show`` option was not being respected when running
``avocado-instrumented`` tests. The log messages generated by, say,
an ``avocado.test.foo`` logger, should be presented at the Avocado
job UI as it happens, provided ``--show=avocado.test.foo`` was
given.

* An existing aid for the usage of Avocado running from Python eggs
would result in unnecessary changes to the ``PYTHONPATH``. Those
changes could cause unpredictable Python module import behavior.

* Fixed a condition in which, when failing to import Python modules on
tests, the error message returned was ``Test.__init__() got an
unexpected keyword argument 'run.results_dir'`` which was quite
cryptic and confused users.

* The assets fetch plugin won't attempt to fetch and cache the assets
of the same test more than once.

* Running tests' statuses are now properly marked as ``INTERRUPTED``
instead of ``CANCEL`` when they reach their own (or the job)
timeout.

* The ``avocado jobs show`` command used to show a simplified and
possibly incorrect information about the spawner used. This
information is no longer displayed, given that it's a test suite
attribute, and not really a job level information.

* The Podman spawner could fail to preserve the output directory when
users on the host and the container did not match. This has now
been fixed.

Internal Changes
================

* The resolver received the same kind of test coverage as the legacy
loader architecture, in preparation for the removal of the loader.

* The Fedora version used on selftests related to the Podman spawner
were pinned to 36. The reason is that, because of the release of
Fedora 37, which has Python 3.11, no ``setuptools`` or Avocado eggs
are available for Python 3.11 yet.

* Removal of the generic ``avocado-runner`` runner, which is a
reminiscent of the all-in-one ``nrunner.py`` file, for ease of
deployment. With the nrunner split and now deployed via Python eggs,
it does not have to exist anymore.

* Selftests will no longer not store temporary results in user's
default results directory.

---

For more information, please check out the complete
Avocado [changelog](https://github.com/avocado-framework/avocado/compare/99.0...100.1).

100.0

Not secure
Users/Test Writers
==================

* Asset cache checksum can now use multiple hash algorithms. The
ability to store multiple hashes, created by different algorithm to
the cache ``CHECKSUM`` file was added. This is useful when
different tests refer to the same asset, but use different hash
algorithms.

* Information on a test's file name was introduced in the xunit/junit
result files. Although not a standard field everywhere, this
information is used and displayed on platforms such as GitLab.

* Python 3.11 (final) is now formally supported and tested on CI.

* The ``runner.output.utf8`` and ``core.input_encoding`` were settings
were removed, and now default to the the system's setting (by using
:func:`sys.getdefaultencoding()`.

* Command line options prefixed with ``--nrunner-`` had that prefixed
removed. A command line option such as ``--nrunner-spawner`` is now
simply ``--spawner``. The matching configuration options such as
``nrunner.something`` became ``run.something``. This is due to the
fact that nrunner is now the only runner implementation offered by
default, so the differentiation and extra typing seems unnecessary.
If other runners are added in the future (or by custom, out of tree,
plugins) they can choose to respect the existing options if they
apply.

* The ``avocado jobs get-output-files`` command was removed. Its
original intended purpose has not been relevant for some time, and
the preservation of output files are already handled directly by all
spawner implementations.

Utility Modules
===============

* :mod:`avocado.utils.process` received the changes necessary to cope
with changes in :func:`signal.default_int_handler`. It now passes
all the given arguments along.

* :mod:`avocado.utils.software_manager` now allows DNF/YUM repository
options to be customized.

Bug Fixes
=========

* Fixed a limit for ``exec-test`` and ``tap`` tests, where the
``STDOUT`` or ``STDERR`` buffers could be exhausted, and the test
would get stuck forever on further writes. The ``exec-test`` and
``tap`` runners can now make use of the (optional) ``output_dir``
parameter, resulting in a much more efficient I/O handling. When
``output_dir`` is used, the only limitation on ``STDOUT`` and
``STDERR`` is the file-system itself.

* The ``--show`` option was not being respected when running
``avocado-instrumented`` tests. The log messages generated by, say,
an ``avocado.test.foo`` logger, should be presented at the Avocado
job UI as it happens, provided ``--show=avocado.test.foo`` was
given.

* An existing aid for the usage of Avocado running from Python eggs
would result in unnecessary changes to the ``PYTHONPATH``. Those
changes could cause unpredictable Python module import behavior.

* Fixed a condition in which, when failing to import Python modules on
tests, the error message returned was ``Test.__init__() got an
unexpected keyword argument 'run.results_dir'`` which was quite
cryptic and confused users.

* The assets fetch plugin won't attempt to fetch and cache the assets
of the same test more than once.

* Running tests' statuses are now properly marked as ``INTERRUPTED``
instead of ``CANCEL`` when they reach their own (or the job)
timeout.

* The ``avocado jobs show`` command used to show a simplified and
possibly incorrect information about the spawner used. This
information is no longer displayed, given that it's a test suite
attribute, and not really a job level information.

* The Podman spawner could fail to preserve the output directory when
users on the host and the container did not match. This has now
been fixed.

Internal Changes
================

* The resolver received the same kind of test coverage as the legacy
loader architecture, in preparation for the removal of the loader.

* The Fedora version used on selftests related to the Podman spawner
were pinned to 36. The reason is that, because of the release of
Fedora 37, which has Python 3.11, no ``setuptools`` or Avocado eggs
are available for Python 3.11 yet.

* Removal of the generic ``avocado-runner`` runner, which is a
reminiscent of the all-in-one ``nrunner.py`` file, for ease of
deployment. With the nrunner split and now deployed via Python eggs,
it does not have to exist anymore.

* Selftests will no longer not store temporary results in user's
default results directory.

---

For more information, please check out the complete
Avocado [changelog](https://github.com/avocado-framework/avocado/compare/99.0...100.0).

Page 1 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.