#2 Add CI tests using the standard test interface
Opened 6 years ago by sturivny. Modified 6 years ago
git://fedorapeople.org/~sturivny/elfutils new_tests  into  master

No commits found

no initial comment

Justification

Adds tests according to the CI wiki specifically the standard test interface in the spec.

The playbook includes Tier1 level test cases that have been tested in the following contexts and is passing reliably: Classic and Container. Test logs are stored in the artifacts directory.

The following steps are used to execute the tests using the standard test interface:

Test environment

Make sure you have installed packages from the spec

# rpm -q ansible python2-dnf libselinux-python standard-test-roles \
ansible-2.3.2.0-1.fc26.noarch \
python2-dnf-2.6.3-11.fc26.noarch \
libselinux-python-2.6-7.fc26.x86_64 \
standard-test-roles-2.4-1.fc26.noarch

Run tests for Classic

# export TEST_SUBJECTS=
# sudo ansible-playbook --tags classic tests.yml

Snip of the example test run for Classic tests:

TASK [standard-test-beakerlib : Check the results] ******************************************************************************************************************************************************************
changed: [localhost]

PLAY RECAP **********************************************************************************************************************************************************************************************************
localhost                  : ok=15   changed=8    unreachable=0    failed=0   

PASS Stack-overflow-in-dwarf-getsrclines
PASS Support-64-bit-SYM64-symbol-table
PASS When-linking-statically-only-against-elfutils
PASS abrt-faf-elfutils-IO-default-xsputn
PASS eu-stack-killed-by-SIGABRT-processing-gcore
PASS eu-strip-invalid-section-alignment-while
PASS eu-unstrip-M-abort-on-socket-line
PASS eu-unstrip-unwilling-to-reassembled-corrupted
PASS readelf-segfault-tests
PASS yama-scope

Run tests for Container

# export TEST_SUBJECTS=docker:docker.io/library/fedora:26
# sudo ansible-playbook --tags=container tests.yml

Snip of the example test run for Container tests:

fatal: [e73b92ef99063e2952ed73239904f70928bb3df38ecd414b491570d379f7261b]: FAILED! => {"changed": true, "cmd": "grep \"^FAIL\" /tmp/artifacts/test.log", "delta": "0:00:00.117040", "end": "2017-10-23 11:10:00.966163", "failed": true, "failed_when_result": true, "rc": 0, "start": "2017-10-23 11:10:00.849123", "stderr": "", "stderr_lines": [], "stdout": "FAIL readelf-segfault-tests\nFAIL yama-scope", "stdout_lines": ["FAIL readelf-segfault-tests", "FAIL yama-scope"]}
        to retry, use: --limit @/home/fedora/tests/elfutils/tests.retry

PLAY RECAP **********************************************************************************************************************************************************************************************************
e73b92ef99063e2952ed73239904f70928bb3df38ecd414b491570d379f7261b : ok=14   changed=10   unreachable=0    failed=1   

PASS Stack-overflow-in-dwarf-getsrclines
PASS Support-64-bit-SYM64-symbol-table
PASS When-linking-statically-only-against-elfutils
PASS abrt-faf-elfutils-IO-default-xsputn
PASS eu-stack-killed-by-SIGABRT-processing-gcore
PASS eu-strip-invalid-section-alignment-while
PASS eu-unstrip-M-abort-on-socket-line
PASS eu-unstrip-unwilling-to-reassembled-corrupted
PASS readelf-segfault-tests
PASS yama-scope

Run tests for Atomic Host**

# export ANSIBLE_INVENTORY=$(test -e inventory && echo inventory || echo /usr/share/ansible/inventory)
# curl -Lo atomic.qcow2 https://ftp-stud.hs-esslingen.de/pub/Mirrors/alt.fedoraproject.org/atomic/stable/Fedora-Atomic-26-20170707.1/CloudImages/x86_64/images/Fedora-Atomic-26-20170707.1.x86_64.qcow2
# export TEST_SUBJECTS=$PWD/atomic.qcow2
# ansible-playbook --tags=atomic tests.yml

Snip of the example test run for Atomic tests:

TASK [standard-test-beakerlib : Pull out the logs] ******************************************************************************************************************************************************************
changed: [localhost]

TASK [standard-test-beakerlib : Check the results] ******************************************************************************************************************************************************************
changed: [localhost]

PLAY RECAP **********************************************************************************************************************************************************************************************************
localhost                  : ok=15   changed=8    unreachable=0    failed=0 

Notes

Tests will be enabled in CI, yet gating is currently disabled, so nothing will change. Tests will run on each dist-git commit, they are not triggered on koji builds and if you are using FMN, it should notify you of failures normally.

The RH QE maintainer contact in case you have questions: sturivny @redhat.com
The idea is that these tests become yours just as you're maintaining the package, there will of course be people around if you have questions or troubles.

rebased onto 14483d0

6 years ago
Metadata