~fginther/+git/autotest:fginther/2to3

Last commit made on 2022-01-26
Get this branch:
git clone -b fginther/2to3 https://git.launchpad.net/~fginther/+git/autotest
Only Francis Ginther can upload to this branch. If you are Francis Ginther please log in for upload directions.

Branch merges

Branch information

Name:
fginther/2to3
Repository:
lp:~fginther/+git/autotest

Recent commits

bfd31f0... by Francis Ginther

UBUNTU: SAUCE: When nuking a pid, nuke the entire process tree

When terminating a process due to timeout, send the signal to the entire
process tree. This prevents autotest from getting stuck when child
processes are left running.

Signed-off-by: Francis Ginther <email address hidden>
Acked-by: Po-Hsu Lin <email address hidden>
Signed-off-by: Po-Hsu Lin <email address hidden>

0fdc242... by Francis Ginther

UBUNTU: SAUCE: Skip http/https proxy when instructed

Some systems in the CI infrastructure need to skip the http/https proxy.
These are identified by CKCT by writing a special marker file.

Signed-off-by: Francis Ginther <email address hidden>
Acked-by: Sean Feole <email address hidden>
Acked-by: Po-Hsu Lin <email address hidden>
Signed-off-by: Po-Hsu Lin <email address hidden>

d9c024c... by Krzysztof Kozlowski

Revert "UBUNTU: SAUCE: fix missing setup on second run"

This reverts commit f6e444df45f45fccd3b18f098233e5c4fabe1153.

The change looks incorrect because it makes the setup() basically the
same as initialize() callback. Instead each test should be fixed so on
next runs it will work with setup() being called only once.

This change also breaks several tests which do not clean after setup()
or are not prepared for resources already prepared, like "git clone".
For example ubuntu_ltp_syscalls:

    INFO | START ---- ---- timestamp=1623064688 localtime=Jun 07 11:18:08
    DEBUG| Persistent state client._record_indent now set to 1
    DEBUG| Test has timeout: 1800 sec.
    INFO | START ubuntu_ltp_syscalls.setup ubuntu_ltp_syscalls.setup timestamp=1623064688 timeout=1800 localtime=Jun 07
    ...
    DEBUG| Running 'git clone https://github.com/linux-test-project/ltp.git'
    ERROR| [stderr] fatal: destination path 'ltp' already exists and is not an empty directory.
    ERROR| Exception escaping from test:
    Traceback (most recent call last):
      File "/home/ubuntu/autotest/client/shared/test.py", line 387, in _exec
        *p_args, **p_dargs)
      File "/home/ubuntu/autotest/client/shared/utils.py", line 868, in update_version
        install(*args, **dargs)
      File "/home/ubuntu/autotest/client/tests/ubuntu_ltp_syscalls/ubuntu_ltp_syscalls.py", line 85, in setup
        self.results = utils.system_output(cmd, retain_output=True)
      File "/home/ubuntu/autotest/client/shared/utils.py", line 1271, in system_output
        verbose=verbose, args=args).stdout
      File "/home/ubuntu/autotest/client/shared/utils.py", line 922, in run
        "Command returned non-zero exit status")
    CmdError: Command <git clone https://github.com/linux-test-project/ltp.git> failed, rc=128, Command returned non-zero exit status
    * Command:
        git clone https://github.com/linux-test-project/ltp.git

Signed-off-by: Krzysztof Kozlowski <email address hidden>
Acked-by: Po-Hsu Lin <email address hidden>
Signed-off-by: Po-Hsu Lin <email address hidden>

f6e444d... by Krzysztof Kozlowski

UBUNTU: SAUCE: fix missing setup on second run

The autotest had nice idea that test setup can be executed only once on
a machine, till test version does not change. If version stays the
same, autotest will not run test setup on next executions.

However this requirement/feature was not defined clear enough and some
tests:
1. Perform cleanup() which reverts the setup() (e.g. ubuntu_boot).
2. Set runtime configuration (e.g. initialize object's field in Python
   __init__()) during setup() and read it on each test (e.g.
   ubuntu_sysdig_smoke_test).

All of these cases fail. Fix this by calling the test setup() every
time.

Signed-off-by: Krzysztof Kozlowski <email address hidden>
Acked-by: Sean Feole <email address hidden>

873ad4f... by Francis Ginther

UBUNTU: SAUCE: drop the interim encoding to utf-8

Generating output via JUnit_api is still failing with the interim step
to encode to 'utf-8'. Futher testing indicates the input is already a
unicode string so encoding it was the wrong step. This time, just
provide the 'backslashreplace' action to replace the unicode character
during the encode to 'ascii'.

Signed-off-by: Francis Ginther <email address hidden>

e0f93c9... by Francis Ginther

UBUNTU: SAUCE: add a decode to utf-8 step

When generating output via JUnit_api, provide 'backslashreplace' as
the actionwhen encountering encoding errors instead of raising an
exception. This also requires first decoding into 'utf-8' for handling
unicode in the output stream.

Signed-off-by: Francis Ginther <email address hidden>

f21e446... by Paolo Pisati

UBUNTU: SAUCE: sfdisk: let sfdisk decide the first available sector

BugLink: https://bugs.launchpad.net/bugs/1864642

Using 0 as a fixed starting sector causes an error:

>>> Created a new DOS disklabel with disk identifier 0x9b4a9cf7.
/dev/loop1p1: Start sector 0 out of range.
Failed to add #1 partition: Numerical result out of range
Leaving.

Fix it by letting sfdisk pick the first available sector instead of
using a fixed value.

Signed-off-by: Paolo Pisati <email address hidden>

debf8a2... by Paolo Pisati

UBUNTU: SAUCE: move proxy setup to a Canonical specific catch-all

Signed-off-by: Paolo Pisati <email address hidden>
Acked-by: Po-Hsu Lin <email address hidden>
Signed-off-by: Po-Hsu Lin <email address hidden>

12275c9... by Paolo Pisati

UBUNTU: SAUCE: convert python shebangs to python2

Signed-off-by: Paolo Pisati <email address hidden>
Signed-off-by: Po-Hsu Lin <email address hidden>

965d530... by Sean Feole

Revert UBUNTU: SAUCE: Log list of installed module

- This has been causing tracebacks in some cases and
appears to be a problem with autotest. For now, reverting
until proper investigation can be done.

Signed-off-by: sfeole <email address hidden>