Compare commits

...
Sign in to create a new pull request.

34 commits

Author SHA1 Message Date
Fedora Release Engineering
1b7c95110e Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-24 20:46:56 +00:00
Fedora Release Engineering
a9e8ed26c0 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-17 15:49:19 +00:00
Fedora Release Engineering
8628bbee8c Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-18 15:51:25 +00:00
Peter Robinson
d740992627 1.0.18 2024-07-03 11:13:05 +01:00
Fedora Release Engineering
c465fcc832 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-25 04:29:39 +00:00
Fedora Release Engineering
8955f53aa0 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-21 06:04:49 +00:00
Florian Weimer
45a2ef9188 Reapply C99 compatibility fix 2023-11-28 18:53:40 +01:00
Fedora Release Engineering
18e5d8ad50 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-20 12:54:45 +00:00
Peter Hjalmarsson
b496f4ae4b Currecting user creation and runtime issues 2023-05-02 17:58:55 +02:00
Peter Robinson
00f8ba1781 remove patch that no longer applies 2023-04-12 13:39:19 +01:00
Peter Robinson
05f07cbc7d 1.0.16 2023-04-11 20:19:15 +01:00
Fedora Release Engineering
9161abcddd Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 18:09:27 +00:00
Florian Weimer
143870e535 Port configure script to C99
Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
2022-12-08 13:07:01 +01:00
Aaron Conole
f8e69988b0 Merge #5 tests: cleanup imports and spelling 2022-09-15 12:20:21 +00:00
Fedora Release Engineering
b7fb9ab09e Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-21 19:44:15 +00:00
Fedora Release Engineering
12ee52fe5c - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 17:57:12 +00:00
Yaakov Selkowitz
ccd9d51f19 tests: cleanup imports and spelling
psutil does not appear to be used, but would require installing
python3-psutil.  networkd is now a separate subpackage of systemd.
2021-07-28 18:18:06 -04:00
Fedora Release Engineering
7075f4ffa7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 13:02:47 +00:00
Zbigniew Jędrzejewski-Szmek
3c3fd479f1 Rebuilt for updated systemd-rpm-macros
See https://pagure.io/fesco/issue/2583.
2021-03-02 16:13:36 +01:00
Fedora Release Engineering
bc4bb42cf4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 18:36:00 +00:00
Tom Stellard
406e64d74c Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-05 03:19:22 +00:00
Zbigniew Jędrzejewski-Szmek
dac3c93984 Rebuilt for libevent 2.1.12
See https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/QOQW2BJBYMTIEUQIAYVEIX2L5IIOHDZL/
2020-09-29 20:35:23 +02:00
Josef Řídký
6f89166f55 Rebuilt for new net-snmp release 2020-09-02 09:38:31 +02:00
Fedora Release Engineering
9053f3529f - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 06:11:24 +00:00
Fedora Release Engineering
d7a3fa5ca2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-29 11:09:03 +00:00
James Hogarth
92c1b0affb Update to 1.0.4 upstream release 2019-08-13 12:37:22 +01:00
Fedora Release Engineering
6ecf9d58c5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-25 15:03:42 +00:00
Igor Gnatenko
127743f0e6 Rebuild for readline 8.0 2019-02-17 09:30:51 +01:00
Fedora Release Engineering
097bf84c74 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-01 08:52:32 +00:00
Adam Williamson
a30f348307 BuildRequires gcc 2018-07-24 14:58:28 -07:00
Adam Williamson
75ff0e290e Rebuild for new net-snmp 2018-07-24 14:45:48 -07:00
Fedora Release Engineering
e788c0a4bf - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-13 09:16:13 +00:00
Susant Sahani
f3240b1c15 Fix: lldpd name to requuire package list
ansible-playbook tests.yml
 [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [localhost] ***************************************************************************************************************************************************************************************************

TASK [Gathering Facts] *********************************************************************************************************************************************************************************************
ok: [localhost]

TASK [str-common : Check if system is Atomic Host] *****************************************************************************************************************************************************************
ok: [localhost]

TASK [str-common : Set fact 'is_atomic'] ***************************************************************************************************************************************************************************
ok: [localhost]

TASK [str-common : Set facts about system] *************************************************************************************************************************************************************************
ok: [localhost]

TASK [str-common : Hardcode Python interpreter for ansible modules on RHEL8 based OS] ******************************************************************************************************************************
skipping: [localhost]

TASK [str-common : debug] ******************************************************************************************************************************************************************************************
skipping: [localhost]

TASK [str-common : debug] ******************************************************************************************************************************************************************************************
skipping: [localhost]

TASK [str-common : debug] ******************************************************************************************************************************************************************************************
skipping: [localhost]

TASK [str-common : Add test-runner to ansible inventory] ***********************************************************************************************************************************************************
changed: [localhost]

TASK [str-common : Gather facts] ***********************************************************************************************************************************************************************************
ok: [localhost -> test-runner]

TASK [str-common : Set facts about test-runner] ********************************************************************************************************************************************************************
ok: [localhost -> test-runner]

TASK [str-common : Hardcode Python interpreter for ansible modules on RHEL8 based OS] ******************************************************************************************************************************
skipping: [localhost]

TASK [str-common : Fetch tests from remote repositories] ***********************************************************************************************************************************************************
skipping: [localhost]

TASK [str-common : debug] ******************************************************************************************************************************************************************************************
skipping: [localhost]

TASK [str-common : debug] ******************************************************************************************************************************************************************************************
skipping: [localhost]

TASK [str-common : debug] ******************************************************************************************************************************************************************************************
skipping: [localhost]

TASK [str-common : debug] ******************************************************************************************************************************************************************************************
skipping: [localhost]

TASK [str-common : Build packages lists to be present on test environment] *****************************************************************************************************************************************
ok: [localhost]

TASK [str-common : debug] ******************************************************************************************************************************************************************************************
skipping: [localhost]

TASK [str-common : include_tasks] **********************************************************************************************************************************************************************************
included: /usr/share/ansible/roles/str-common/tasks/pkgs-dnf.yml for localhost

TASK [str-common : Install test-specific package requirements] *****************************************************************************************************************************************************
ok: [localhost] => (item=lldpd)
ok: [localhost] => (item=python3)
ok: [localhost] => (item=tcpdump)
ok: [localhost] => (item=systemd)
ok: [localhost] => (item=iproute)

TASK [str-common : Install the common requirements on target] ******************************************************************************************************************************************************
ok: [localhost] => (item=rsync)

TASK [str-common : Install dnf-utils] ******************************************************************************************************************************************************************************
 [WARNING]: Consider using the dnf module rather than running dnf.  If you need to use command because dnf is insufficient you can add warn=False to this command task or set command_warnings=False in ansible.cfg
to get rid of this message.

changed: [localhost]

TASK [str-common : Install debuginfo packages] *********************************************************************************************************************************************************************

TASK [str-common : package] ****************************************************************************************************************************************************************************************
skipping: [localhost]

TASK [str-common : Enable copr repos using DNF] ********************************************************************************************************************************************************************
skipping: [localhost]

TASK [str-common : Make artifacts directory] ***********************************************************************************************************************************************************************
changed: [localhost]

TASK [str-common : Copy tests to test environment] *****************************************************************************************************************************************************************
changed: [localhost]

TASK [standard-test-beakerlib : package] ***************************************************************************************************************************************************************************
ok: [localhost -> test-runner]

TASK [standard-test-beakerlib : shell] *****************************************************************************************************************************************************************************
changed: [localhost -> test-runner]

TASK [standard-test-beakerlib : package] ***************************************************************************************************************************************************************************
skipping: [localhost]

TASK [standard-test-beakerlib : shell] *****************************************************************************************************************************************************************************
skipping: [localhost]

TASK [standard-test-beakerlib : Install the beakerlib requirements] ************************************************************************************************************************************************
ok: [localhost -> test-runner] => (item=beakerlib)
ok: [localhost -> test-runner] => (item=restraint-rhts)
ok: [localhost -> test-runner] => (item=rsync)

TASK [standard-test-beakerlib : debug] *****************************************************************************************************************************************************************************
skipping: [localhost]

TASK [standard-test-beakerlib : Install the beakerlib requirements to test environment] ****************************************************************************************************************************
ok: [localhost] => (item=rsync)
ok: [localhost] => (item=findutils)
ok: [localhost] => (item=make)
changed: [localhost] => (item=libselinux-python)
ok: [localhost] => (item=python2-lxml)

TASK [standard-test-beakerlib : Put beakerlib binaries to test environment] ****************************************************************************************************************************************
ok: [localhost] => (item=/usr/bin/beakerlib-testwatcher)
ok: [localhost] => (item=/usr/bin/beakerlib-lsb_release)
ok: [localhost] => (item=/usr/bin/beakerlib-journalling)
ok: [localhost] => (item=/usr/bin/beakerlib-journalcmp)
ok: [localhost] => (item=/usr/bin/beakerlib-rlMemPeak)
ok: [localhost] => (item=/usr/bin/beakerlib-rlMemAvg)
ok: [localhost] => (item=/usr/bin/beakerlib-deja-summarize)
ok: [localhost] => (item=/usr/share/beakerlib/journal.sh)
ok: [localhost] => (item=/usr/share/beakerlib/testing.sh)
ok: [localhost] => (item=/usr/share/beakerlib/synchronisation.sh)
ok: [localhost] => (item=/usr/share/beakerlib/analyze.sh)
ok: [localhost] => (item=/usr/share/beakerlib/performance.sh)
changed: [localhost] => (item=/usr/share/beakerlib/libraries.sh)
ok: [localhost] => (item=/usr/share/beakerlib/dictionary.vim)
ok: [localhost] => (item=/usr/share/beakerlib/rpms.sh)
ok: [localhost] => (item=/usr/share/beakerlib/storage.sh)
changed: [localhost] => (item=/usr/share/beakerlib/beakerlib.sh)
ok: [localhost] => (item=/usr/share/beakerlib/virtualX.sh)
ok: [localhost] => (item=/usr/share/beakerlib/infrastructure.sh)
ok: [localhost] => (item=/usr/share/beakerlib/logging.sh)
ok: [localhost] => (item=/usr/bin/rhts-lint)
ok: [localhost] => (item=/usr/bin/rhts-submit-log)
ok: [localhost] => (item=/usr/bin/rhts-flush)
ok: [localhost] => (item=/usr/bin/rhts-recipe-sync-block)
ok: [localhost] => (item=/usr/bin/rhts-recipe-sync-set)
ok: [localhost] => (item=/usr/bin/rhts-reboot)
ok: [localhost] => (item=/usr/bin/rhts-sync-set)
ok: [localhost] => (item=/usr/bin/rhts-environment.sh)
ok: [localhost] => (item=/usr/bin/rhts-backup)
ok: [localhost] => (item=/usr/bin/rhts-abort)
ok: [localhost] => (item=/usr/bin/rhts-report-result)
changed: [localhost] => (item=/usr/bin/rhts-run-simple-test)
ok: [localhost] => (item=/usr/bin/rhts-sync-block)
ok: [localhost] => (item=/usr/bin/rhts-restore)
ok: [localhost] => (item=/usr/share/rhts/lib/rhts-make.include)
ok: [localhost] => (item=/usr/bin/rstrnt-backup)
ok: [localhost] => (item=/usr/bin/rstrnt-package)
ok: [localhost] => (item=/usr/bin/rstrnt-abort)
ok: [localhost] => (item=/usr/bin/rstrnt-adjust-watchdog)
ok: [localhost] => (item=/usr/bin/rstrnt-reboot)
ok: [localhost] => (item=/usr/bin/rstrnt-sync)
ok: [localhost] => (item=/usr/bin/rstrnt-report-log)
ok: [localhost] => (item=/usr/bin/rstrnt-restore)
ok: [localhost] => (item=/usr/bin/rstrnt-report-result)
ok: [localhost] => (item=/usr/share/ansible/roles/standard-test-beakerlib/files/rpm.py)

TASK [standard-test-beakerlib : Copy tests to test environment] ****************************************************************************************************************************************************
changed: [localhost]

TASK [standard-test-beakerlib : Fix up beakerlib at tests environment] *********************************************************************************************************************************************
changed: [localhost]

TASK [standard-test-beakerlib : Run beakerlib tests] ***************************************************************************************************************************************************************
changed: [localhost] => (item=miscellaneous-tests)

TASK [standard-test-beakerlib : Make the master tests summary log artifact] ****************************************************************************************************************************************
changed: [localhost] => (item=miscellaneous-tests)

TASK [standard-test-beakerlib : include_role] **********************************************************************************************************************************************************************

TASK [str-common : Pull out the logs from test environment to test runner] *****************************************************************************************************************************************
changed: [localhost]

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

PLAY RECAP *********************************************************************************************************************************************************************************************************
localhost                  : ok=25   changed=13   unreachable=0    failed=0

posix          	on

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   TEST PROTOCOL
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

    Package       : lldpd
    Installed     : lldpd-1.0.1-1.fc29.x86_64
    beakerlib RPM : beakerlib-1.17-13.fc29.noarch
    Test started  : 2018-05-24 01:29:14 IST
    Test finished :
    Test duration :
    Test name     : miscellaneous-tests
    Distro        : Fedora release 29 (Rawhide)
    Hostname      : Zeus
    Architecture  : x86_64
    CPUs          : 1 x Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz
    RAM size      : 963 MB
    HDD size      : 6.98 GB
:: [ 01:29:14 ] :: [ WARNING  ] :: POSIX mode detected and switched off
:: [ 01:29:14 ] :: [ WARNING  ] :: POSIX mode detected and switched off
:: [ 01:29:14 ] :: [ WARNING  ] :: Please fix your test to have /bin/bash shebang
:: [ 01:29:14 ] :: [ WARNING  ] :: Please fix your test to have /bin/bash shebang

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Setup
::   Setup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

lldpd-1.0.1-1.fc29.x86_64
:: [ 01:29:14 ] :: [   PASS   ] :: Checking for the presence of lldpd rpm
:: [ 01:29:14 ] :: [   PASS   ] :: Checking for the presence of lldpd rpm
:: [ 01:29:14 ] :: [   LOG    ] :: Package versions:
:: [ 01:29:14 ] :: [   LOG    ] :: Package versions:
:: [ 01:29:14 ] :: [   LOG    ] ::   lldpd-1.0.1-1.fc29.x86_64
:: [ 01:29:14 ] :: [   LOG    ] ::   lldpd-1.0.1-1.fc29.x86_64
:: [ 01:29:14 ] :: [  BEGIN   ] :: Running 'cp lldpd-tests.py /usr/bin/'
:: [ 01:29:14 ] :: [   PASS   ] :: Command 'cp lldpd-tests.py /usr/bin/' (Expected 0, got 0)
:: [ 01:29:14 ] :: [   PASS   ] :: Command 'cp lldpd-tests.py /usr/bin/' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 0s
::   Duration: 0s
::   Assertions: 2 good, 0 bad
::   Assertions: 2 good, 0 bad
::   RESULT: PASS
::   RESULT: PASS

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Test
::   Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 01:29:14 ] :: [   LOG    ] :: lladpd tests
:: [ 01:29:14 ] :: [   LOG    ] :: lladpd tests
:: [ 01:29:14 ] :: [  BEGIN   ] :: Running '/usr/bin/python3 /usr/bin/lldpd-tests.py'
test_lldpd_trasmitted_lldp_attributes (__main__.lldpdTests)
verify at the other end of veth received LLDP packets that contains attibutes (link address, hostname, TTL, system desc). tcpdump ... reading from file /tmp/lldpd-tcp-dump.pcap, link-type EN10MB (Ethernet)
ok
test_lldpd_trasmitted_lldp_packets (__main__.lldpdTests)
verify at the other end of veth ifname lldpd has received LLDP packets. tcpdump ... reading from file /tmp/lldpd-tcp-dump.pcap, link-type EN10MB (Ethernet)
ok
test_lldpd_received_lldp_packets_sent_by_systemd_networkd (__main__.lldpdTestsViaNetworkd) ... ok
test_systemd_networkd_received_lldp_packets (__main__.lldpdTestsViaNetworkd) ... ok

----------------------------------------------------------------------
Ran 4 tests in 63.926s

OK
:: [ 01:30:18 ] :: [   PASS   ] :: Command '/usr/bin/python3 /usr/bin/lldpd-tests.py' (Expected 0, got 0)
:: [ 01:30:18 ] :: [   PASS   ] :: Command '/usr/bin/python3 /usr/bin/lldpd-tests.py' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 64s
::   Duration: 64s
::   Assertions: 1 good, 0 bad
::   Assertions: 1 good, 0 bad
::   RESULT: PASS
::   RESULT: PASS

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Cleanup
::   Cleanup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 01:30:18 ] :: [  BEGIN   ] :: Running 'rm /usr/bin/lldpd-tests.py'
:: [ 01:30:18 ] :: [   PASS   ] :: Command 'rm /usr/bin/lldpd-tests.py' (Expected 0, got 0)
:: [ 01:30:18 ] :: [   PASS   ] :: Command 'rm /usr/bin/lldpd-tests.py' (Expected 0, got 0)
:: [ 01:30:18 ] :: [   LOG    ] :: lladpd tests done
:: [ 01:30:18 ] :: [   LOG    ] :: lladpd tests done
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 0s
::   Duration: 0s
::   Assertions: 1 good, 0 bad
::   Assertions: 1 good, 0 bad
::   RESULT: PASS
::   RESULT: PASS

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   TEST PROTOCOL
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

    Package       : lldpd
    Installed     : lldpd-1.0.1-1.fc29.x86_64
    beakerlib RPM : beakerlib-1.17-13.fc29.noarch
    Test started  : 2018-05-24 01:29:14 IST
    Test finished : 2018-05-24 01:30:18 IST (still running)
    Test duration : 64 seconds
    Test name     : miscellaneous-tests
    Distro        : Fedora release 29 (Rawhide)
    Hostname      : Zeus
    Architecture  : x86_64
    CPUs          : 1 x Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz
    RAM size      : 963 MB
    HDD size      : 6.98 GB
:: [ 01:29:14 ] :: [ WARNING  ] :: POSIX mode detected and switched off
:: [ 01:29:14 ] :: [ WARNING  ] :: Please fix your test to have /bin/bash shebang

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Setup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 01:29:14 ] :: [   PASS   ] :: Checking for the presence of lldpd rpm
:: [ 01:29:14 ] :: [   LOG    ] :: Package versions:
:: [ 01:29:14 ] :: [   LOG    ] ::   lldpd-1.0.1-1.fc29.x86_64
:: [ 01:29:14 ] :: [   PASS   ] :: Command 'cp lldpd-tests.py /usr/bin/' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 0s
::   Assertions: 2 good, 0 bad
::   RESULT: PASS

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 01:29:14 ] :: [   LOG    ] :: lladpd tests
:: [ 01:30:18 ] :: [   PASS   ] :: Command '/usr/bin/python3 /usr/bin/lldpd-tests.py' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 64s
::   Assertions: 1 good, 0 bad
::   RESULT: PASS

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Cleanup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 01:30:18 ] :: [   PASS   ] :: Command 'rm /usr/bin/lldpd-tests.py' (Expected 0, got 0)
:: [ 01:30:18 ] :: [   LOG    ] :: lladpd tests done
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 0s
::   Assertions: 1 good, 0 bad
::   RESULT: PASS

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   miscellaneous-tests
::   miscellaneous-tests
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 01:30:18 ] :: [   LOG    ] :: JOURNAL XML: /var/tmp/beakerlib-o97vwu4/journal.xml
:: [ 01:30:18 ] :: [   LOG    ] :: JOURNAL XML: /var/tmp/beakerlib-o97vwu4/journal.xml
:: [ 01:30:18 ] :: [   LOG    ] :: JOURNAL TXT: /var/tmp/beakerlib-o97vwu4/journal.txt
:: [ 01:30:18 ] :: [   LOG    ] :: JOURNAL TXT: /var/tmp/beakerlib-o97vwu4/journal.txt
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 64s
::   Duration: 64s
::   Phases: 3 good, 0 bad
::   Phases: 3 good, 0 bad
::   OVERALL RESULT: PASS
::   OVERALL RESULT: PASS
2018-05-24 01:37:17 +05:30
Susant Sahani
28fe98a570 Adds tests according to the CI
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. Test logs are stored in the artifacts directory.
The following steps are used to execute the tests using the standard test interface:

Test enveronment
Make sure you have installed packages from the spec
```
ansible-2.4.1.0-2.fc28.noarch
python2-dnf-2.7.5-1.fc28.noarch
libselinux-python-2.7-2.fc28.x86_64
standard-test-roles-2.5-1.fc28.noarch
Run tests for Classic
Snip of the example test run for Classic tests:
```

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Setup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

lldpd-1.0.1-1.fc28.x86_64
:: [ 17:45:16 ] :: [   PASS   ] :: Checking for the presence of lldpd rpm
:: [ 17:45:16 ] :: [   LOG    ] :: Package versions:
:: [ 17:45:16 ] :: [   LOG    ] ::   lldpd-1.0.1-1.fc28.x86_64
:: [ 17:45:16 ] :: [  BEGIN   ] :: Running 'cp lldpd-tests.py /usr/bin/'
:: [ 17:45:16 ] :: [   PASS   ] :: Command 'cp lldpd-tests.py /usr/bin/' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 0s
::   Assertions: 2 good, 0 bad
::   RESULT: PASS

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 17:45:16 ] :: [   LOG    ] :: lladpd tests
:: [ 17:45:16 ] :: [  BEGIN   ] :: Running '/usr/bin/python3 /usr/bin/lldpd-tests.py'
test_lldpd_trasmitted_lldp_attributes (__main__.lldpdTests)
verify at the other end of veth received LLDP packets that contains attibutes (link address, hostname, TTL, system desc). tcpdump ... reading from file /tmp/lldpd-tcp-dump.pcap, link-type EN10MB (Ethernet)
ok
test_lldpd_trasmitted_lldp_packets (__main__.lldpdTests)
verify at the other end of veth ifname lldpd has received LLDP packets. tcpdump ... reading from file /tmp/lldpd-tcp-dump.pcap, link-type EN10MB (Ethernet)
ok
test_lldpd_received_lldp_packets_sent_by_systemd_networkd (__main__.lldpdTestsViaNetworkd) ... ok
test_systemd_networkd_received_lldp_packets (__main__.lldpdTestsViaNetworkd) ... ok

----------------------------------------------------------------------
Ran 4 tests in 64.222s

OK
:: [ 17:46:21 ] :: [   PASS   ] :: Command '/usr/bin/python3 /usr/bin/lldpd-tests.py' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 65s
::   Assertions: 1 good, 0 bad
::   RESULT: PASS

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Cleanup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 17:46:21 ] :: [  BEGIN   ] :: Running 'rm /usr/bin/lldpd-tests.py'
:: [ 17:46:21 ] :: [   PASS   ] :: Command 'rm /usr/bin/lldpd-tests.py' (Expected 0, got 0)
:: [ 17:46:21 ] :: [   LOG    ] :: lladpd tests done
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 0s
::   Assertions: 1 good, 0 bad
::   RESULT: PASS

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   TEST PROTOCOL
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

    Package       : lldpd
    Installed     : lldpd-1.0.1-1.fc28.x86_64
    beakerlib RPM : beakerlib-1.17-13.fc28.noarch
    Test started  : 2018-05-23 17:45:15 IST
    Test finished : 2018-05-23 17:46:21 IST (still running)
    Test duration : 66 seconds
    Test name     : unknown
    Distro        : Fedora release 28 (Twenty Eight)
    Hostname      : Zeus
    Architecture  : x86_64
    CPUs          : 8 x Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz
    RAM size      : 15731 MB
    HDD size      : 226.83 GB

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Setup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 17:45:16 ] :: [   PASS   ] :: Checking for the presence of lldpd rpm
:: [ 17:45:16 ] :: [   LOG    ] :: Package versions:
:: [ 17:45:16 ] :: [   LOG    ] ::   lldpd-1.0.1-1.fc28.x86_64
:: [ 17:45:16 ] :: [   PASS   ] :: Command 'cp lldpd-tests.py /usr/bin/' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 0s
::   Assertions: 2 good, 0 bad
::   RESULT: PASS

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 17:45:16 ] :: [   LOG    ] :: lladpd tests
:: [ 17:46:21 ] :: [   PASS   ] :: Command '/usr/bin/python3 /usr/bin/lldpd-tests.py' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 65s
::   Assertions: 1 good, 0 bad
::   RESULT: PASS

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Cleanup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 17:46:21 ] :: [   PASS   ] :: Command 'rm /usr/bin/lldpd-tests.py' (Expected 0, got 0)
:: [ 17:46:21 ] :: [   LOG    ] :: lladpd tests done
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 0s
::   Assertions: 1 good, 0 bad
::   RESULT: PASS

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   unknown
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 17:46:21 ] :: [   LOG    ] :: JOURNAL XML: /var/tmp/beakerlib-msOLBiM/journal.xml
:: [ 17:46:21 ] :: [   LOG    ] :: JOURNAL TXT: /var/tmp/beakerlib-msOLBiM/journal.txt
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 66s
::   Phases: 3 good, 0 bad
::   OVERALL RESULT: PASS
2018-05-23 17:48:08 +05:30
11 changed files with 412 additions and 218 deletions

4
.gitignore vendored
View file

@ -1,3 +1 @@
/lldpd-0.9.7.tar.gz
/lldpd-0.9.8.tar.gz
/lldpd-1.0.1.tar.gz
/lldpd-1.*.tar.gz

22
lldpd-configure-c99.patch Normal file
View file

@ -0,0 +1,22 @@
commit 01aee0f3601c60e570aeb9040c036c83d053cc5a
Author: Florian Weimer <fweimer@redhat.com>
Date: Thu Dec 8 13:01:07 2022 +0100
m4/progname.m4: Include <stdio.h> for printf in lldp_CHECK___PROGNAME
Otherwise the checks always fails with a compiler that does not
support implict function declarations.
diff --git a/configure b/configure
index 10baaca5824a3568..f43b2fd9beb18847 100755
--- a/configure
+++ b/configure
@@ -19039,7 +19039,7 @@
do CFLAGS="$ac_save_CFLAGS $LLDP_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
+#include<stdio.h>
int
main (void)
{

View file

@ -1,104 +0,0 @@
#!/bin/bash
# lldpd init file
#
# chkconfig: - 60 20
# description: 802.1ab (LLDP) daemon
#
# processname: lldpd
# pidfile: /var/run/lldpd.pid
### BEGIN INIT INFO
# Provides: lldpd
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: $syslog $network $net-snmp
# Should-Stop: $syslog $network $net-snmp
# Default-Stop: 0 1 6
# Short-Description: LLDP daemon
# Description: 802.1ab (LLDP) daemon
### END INIT INFO
# source function library
. /etc/rc.d/init.d/functions
exec="/usr/sbin/lldpd"
prog="lldpd"
config="/etc/lldpd.d"
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
lockfile=/var/lock/subsys/$prog
start() {
[ -x $exec ] || exit 4
[ -d $config ] || exit 6
echo -n $"Starting $prog: "
daemon $exec $LLDPD_OPTIONS
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
echo -n $"Stopping $prog: "
killproc $exec
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $RETVAL
}
restart() {
stop
start
}
reload() {
restart
}
force_reload() {
restart
}
rh_status() {
# run checks to determine if the service is running or use generic status
status $prog
}
rh_status_q() {
rh_status >/dev/null 2>&1
}
case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart)
$1
;;
reload)
rh_status_q || exit 7
$1
;;
force-reload)
force_reload
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
exit 2
esac
exit $?

View file

@ -1,20 +0,0 @@
[Unit]
Description=LLDP daemon
Documentation=man:lldpd(8)
After=network.target
[Service]
Type=notify
NotifyAccess=main
EnvironmentFile=-/etc/sysconfig/lldpd
ExecStart=/usr/sbin/lldpd $DAEMON_ARGS $LLDPD_OPTIONS
Restart=on-failure
PrivateTmp=yes
RestrictAddressFamilies=AF_INET AF_INET6 AF_PACKET AF_NETLINK AF_UNIX
ProtectHome=yes
ReadWriteDirectories=/var/run/lldpd
ProtectSystem=full
[Install]
WantedBy=multi-user.target

View file

@ -12,7 +12,7 @@ Restart=on-failure
PrivateTmp=yes
RestrictAddressFamilies=AF_INET AF_INET6 AF_PACKET AF_NETLINK AF_UNIX
ProtectHome=yes
ReadWritePaths=/var/run/lldpd
ReadWritePaths=/run/lldpd
ProtectSystem=strict
ProtectKernelTunables=yes
ProtectControlGroups=yes

View file

@ -0,0 +1,2 @@
#Type Name ID GECOS Home directory Shell
u lldpd - "Used by the lldpd daemon" /var/lib/lldpd /sbin/nologin

View file

@ -1,48 +1,26 @@
%if 0%{?el6}
%bcond_with systemd
%global rundir /var/run/
%else
%bcond_without systemd
%global rundir /run/
%endif
%global gh_owner vincentbernat
Name: lldpd
Version: 1.0.1
Release: 1%{?dist}
Version: 1.0.18
Release: 4%{?dist}
Summary: ISC-licensed implementation of LLDP
License: ISC
URL: https://%{gh_owner}.github.io/%{name}/
Source0: https://media.luffy.cx/files/lldpd/lldpd-%{version}.tar.gz
URL: https://github.com/lldpd/
Source0: https://github.com/lldpd/lldpd/archive/v%{version}/%{name}-%{version}.tar.gz
Source1: %{name}-fedora.service
Source2: %{name}-tmpfiles
Source3: %{name}-fedora.sysconfig
Source4: %{name}-el6.init
Source5: %{name}-el7.service
Source4: %{name}-systemd-sysusers.conf
Patch1: lldpd-configure-c99.patch
BuildRequires: readline-devel
BuildRequires: check-devel
BuildRequires: net-snmp-devel
BuildRequires: gcc
BuildRequires: libxml2-devel
# EL6 needs libevent2 as the package
%if 0%{?el6}
BuildRequires: libevent2-devel
%else
BuildRequires: libevent-devel
%endif
%if 0%{?with_systemd}
# For systemd stuff
BuildRequires: systemd
BuildRequires: make
BuildRequires: net-snmp-devel
BuildRequires: readline-devel
BuildRequires: systemd-devel
%{?systemd_requires}
%else
Requires(post): chkconfig
Requires(preun): chkconfig
# This is for /sbin/service
Requires(preun): initscripts
%endif
Requires(pre): shadow-utils
@ -60,107 +38,72 @@ Summary: %{summary}
%{name} development libraries and headers
%prep
%autosetup
%autosetup -p1
%build
%configure --disable-static --with-snmp --disable-silent-rules \
--with-privsep-user=%{name} --with-privsep-group=%{name} \
--with-privsep-chroot=%{rundir}%{name}/chroot \
--with-lldpd-ctl-socket=%{rundir}%{name}/%{name}.socket \
%if 0%{?with_systemd}
--with-privsep-chroot=%{_rundir}/%{name}/chroot \
--with-lldpd-ctl-socket=%{_rundir}/%{name}/%{name}.socket \
--with-systemdsystemunitdir=%{_unitdir} --with-sysusersdir=no
%endif
make %{?_smp_mflags}
%make_build
%install
%make_install
%if 0%{?with_systemd}
%if 0%{?fedora} >= 26
install -p -D -m644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
%else
install -p -D -m644 %{SOURCE5} %{buildroot}%{_unitdir}/%{name}.service
%endif
install -p -D -m644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/%{name}.conf
%else
install -p -D -m755 %{SOURCE4} %{buildroot}%{_initddir}/%{name}
%endif
install -p -D -m644 %{SOURCE3} %{buildroot}/etc/sysconfig/%{name}
install -p -D -m644 %{SOURCE4} %{buildroot}%{_sysusersdir}/%{name}.conf
install -d -D -m 0755 %{buildroot}%{rundir}%{name}/chroot
install -d -D -m 0755 %{buildroot}%{_rundir}/%{name}/chroot
install -d -m 0755 %{buildroot}%{_sharedstatedir}/%{name}
# remove the docs from buildroot
rm -rf %{buildroot}/usr/share/doc/%{name}
# don't include completion conf yet
rm -f %{buildroot}/usr/share/bash-completion/completions/lldpcli
rm -f %{buildroot}/usr/share/zsh/vendor-completions/_lldpcli
rm -f %{buildroot}/usr/share/zsh/site-functions/_lldpcli
# remove static libtool archive
rm -f %{buildroot}%{_libdir}/liblldpctl.la
find %{buildroot} -type f -name "*.la" -delete
%ldconfig_scriptlets
%pre
getent group %{name} >/dev/null || groupadd -r %{name}
getent passwd %{name} >/dev/null || \
useradd -r -g %{name} -d %{_sharedstatedir}/%{name} -s /sbin/nologin \
-c "Used by the %{name} daemon" %{name}
%sysusers_create_compat %{SOURCE4}
exit 0
%post
/sbin/ldconfig
%if 0%{?with_systemd}
%systemd_post %{name}.service
%else
# This adds the proper /etc/rc*.d links for the script
/sbin/chkconfig --add %{name}
%endif
%systemd_post lldpd.service
%preun
%if 0%{?with_systemd}
%systemd_preun %{name}.service
%else
if [ $1 -eq 0 ] ; then
/sbin/service %{name} stop >/dev/null 2>&1
/sbin/chkconfig --del %{name}
fi
%endif
%systemd_preun lldpd.service
%postun
/sbin/ldconfig
%if 0%{?with_systemd}
%systemd_postun_with_restart %{name}.service
%else
if [ "$1" -ge "1" ] ; then
/sbin/service %{name} condrestart >/dev/null 2>&1 || :
fi
%endif
%systemd_postun_with_restart lldpd.service
%files
%doc NEWS README.md
%license LICENSE
%doc NEWS README.md
%config %{_sysconfdir}/%{name}.d
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%{_sbindir}/lldpcli
%{_sbindir}/lldpctl
%{_sbindir}/%{name}
%config %{_sysconfdir}/%{name}.d
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%{_mandir}/man8/lldpcli.8*
%{_mandir}/man8/lldpctl.8*
%{_mandir}/man8/%{name}.8*
%{_libdir}/liblldpctl.so.4
%{_libdir}/liblldpctl.so.4.8.0
%dir %{rundir}%{name}
%dir %{rundir}%{name}/chroot
%if 0%{?with_systemd}
%{_libdir}/liblldpctl.so.4*
%dir %{_rundir}/%{name}
%dir %{_rundir}/%{name}/chroot
%{_unitdir}/%{name}.service
%{_tmpfilesdir}/%{name}.conf
%else
%{_initddir}/%{name}
%endif
%{_sysusersdir}/%{name}.conf
%dir %attr(-,lldpd,lldpd) %{_sharedstatedir}/%{name}
%files devel
@ -171,6 +114,91 @@ fi
%changelog
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.18-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.18-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.18-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Wed Jul 03 2024 Peter Robinson <pbrobinson@fedoraproject.org> - 1.0.18-1
- Update to 1.0.18
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.16-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.16-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Tue Nov 28 2023 Florian Weimer <fweimer@redhat.com> - 1.0.16-4
- Reapply C99 compatibility fix
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.16-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue May 2 2023 Peter Hjalmarsson <kanelxake@gmail.com> - 1.0.16-2
- Correcting usage of rundir macro
- Fix creation of sysuser
* Tue Apr 11 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 1.0.16-1
- Update to 1.0.16
- Modernise spec file
- CVEs: CVE-2020-27827, CVE-2020-27827, CVE-2021-43612
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Dec 8 2022 Florian Weimer <fweimer@redhat.com> - 1.0.4-11
- Port configure script to C99
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.0.4-7
- Rebuilt for updated systemd-rpm-macros
See https://pagure.io/fesco/issue/2583.
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Sep 29 20:35:23 CEST 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.0.4-5
- Rebuilt for libevent 2.1.12
* Wed Sep 02 2020 Josef Ridky <jridky@redhat.com> - 1.0.4-4
- Rebuilt for new net-snmp release
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Aug 13 2019 James Hogarth <james.hogarth@gmail.com> - 1.0.4-1
- Updated to new upstream release 1.0.4
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.0.1-5
- Rebuild for readline 8.0
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Jul 24 2018 Adam Williamson <awilliam@redhat.com> - 1.0.1-3
- Rebuild for new net-snmp
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Apr 17 2018 James Hogarth <james.hogarth@gmail.com> - 1.0.1-1
- Update to 1.0.1

View file

@ -1 +1 @@
SHA512 (lldpd-1.0.1.tar.gz) = 61b2a7a3a78276c613c6d0b34eb625e69e5c8a206b6658a167d6a09ac6d0e1c943e46c0ff6fc3538a791d9947f193185b65848da581b3d6ecb9bc0befadde8dd
SHA512 (lldpd-1.0.18.tar.gz) = c8734221767cd879c98ea3ee6fa80e1dce2f8470a97b0f757cfe7ef8fe2adaf878fdedcda896cf65e1af980634f2ab312588658fb85f89c6d5b6cc9d2da52045

View file

@ -0,0 +1,219 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-2.1+
# ~~~
# lldpd-test.py integration test
# Description: Test for lldpd: implementation of IEEE 802.1ab (LLDP)
#
# Author: Susant Sahani <susant@redhat.com>
# Copyright (c) 2018 Red Hat, Inc.
#~~~
import errno
import os
import sys
import time
import unittest
import subprocess
import signal
import shutil
import re
import socket
LLDPD_TCP_DUMP_FILE='/tmp/lldpd-tcp-dump.pcap'
LLDPD_PID_FILE='/var/run/lldpd.pid'
SERVICE_UNITDIR = '/run/systemd/system'
NETWORK_UNITDIR = '/run/systemd/network'
def setUpModule():
"""Initialize the environment, and perform sanity checks on it."""
if shutil.which('lldpd') is None:
raise OSError(errno.ENOENT, 'lldpd not found')
# Ensure the unit directory exists so tests can dump files into it.
os.makedirs(NETWORK_UNITDIR, exist_ok=True)
class lldpdUtilities():
"""Provide a set of utility functions start stop lldpd ."""
def Startlldpd(self):
"""Start lldpd interface lldpd-peer """
subprocess.check_output(['/usr/sbin/lldpd', '-cfse', '-D', '-C', 'lldpd-peer', '-I', 'lldpd-peer', '-S', 'lldpd-system-name','-m', '192.168.50.6'])
def Stoplldpd(self):
try:
with open(LLDPD_PID_FILE, 'r') as f:
pid = f.read().rstrip(' \t\r\n\0')
os.kill(int(pid), signal.SIGTERM)
os.remove(LLDPD_PID_FILE)
except IOError:
pass
def StartCaptureLLDPPackets(self):
"""Start tcpdump to capture packets"""
self.WriteServiceFile('tcpdump.service', '''\
[Unit]
Description=TCPDumpd
After=multi-user.target network.target
[Service]
Type=simple
ExecStart=/usr/sbin/tcpdump -pnnli lldpd ether proto 0x88cc -vvv -w "/tmp/lldpd-tcp-dump.pcap"
[Install]
WantedBy=multi-user.target
''')
subprocess.check_output(['systemctl','daemon-reload'])
subprocess.check_output(['systemctl','restart', 'tcpdump.service'])
def StopCapturingPackets(self):
subprocess.check_output(['systemctl', 'stop', 'tcpdump.service'])
time.sleep(3);
def SetupVethInterface(self):
"""Setup veth interface"""
subprocess.check_output(['ip', 'link', 'add', 'lldpd', 'type', 'veth', 'peer', 'name', 'lldpd-peer'])
subprocess.check_output(['ip', 'link', 'set', 'lldpd', 'address', '02:01:02:03:04:08'])
subprocess.check_output(['ip', 'link', 'set', 'lldpd-peer', 'address', '02:01:02:03:04:09'])
subprocess.check_output(['ip', 'link', 'set', 'lldpd', 'up'])
subprocess.check_output(['ip', 'link', 'set', 'lldpd-peer', 'up'])
time.sleep(3);
self.addCleanup(subprocess.call, ['ip', 'link', 'del', 'dev', 'lldpd'])
def WriteServiceFile(self, unit_name, contents):
"""Write a tcpdump unit file, and queue it to be removed."""
unit_path = os.path.join(SERVICE_UNITDIR, unit_name)
with open(unit_path, 'w') as unit:
unit.write(contents)
self.addCleanup(os.remove, unit_path)
def WriteNetworkFile(self, unit_name, contents):
"""Write a networkd unit file, and queue it to be removed."""
unit_path = os.path.join(NETWORK_UNITDIR, unit_name)
with open(unit_path, 'w') as unit:
unit.write(contents)
self.addCleanup(os.remove, unit_path)
def FindProtocolFieldsinTCPDump(self, **kwargs):
"""Look attributes in lldpd logs."""
contents = subprocess.check_output(['tcpdump', '-v', '-r', LLDPD_TCP_DUMP_FILE]).rstrip().decode('utf-8')
if kwargs is not None:
for key in kwargs:
self.assertRegex(contents, kwargs[key])
class lldpdTestsViaNetworkd(unittest.TestCase, lldpdUtilities):
def setUp(self):
""" Setup veth interface """
self.WriteNetworkFile('lldpd-veth.netdev', '''\
[NetDev]
Name=lldpd
Kind=veth
MACAddress=12:34:56:78:9a:bc
[Peer]
Name=lldpd-peer
MACAddress=12:34:56:78:9a:bd
''')
""" Receive LLDP packets via networkd """
self.WriteNetworkFile('lldp.network', '''\
[Match]
Name=lldpd
[Network]
DHCP=no
IPv6AcceptRA=false
LLDP=yes
EmitLLDP=yes
''')
""" Receive LLDP packets via networkd """
self.WriteNetworkFile('lldp-peer.network', '''\
[Match]
Name=lldpd-peer
''')
subprocess.check_output(['systemctl', 'restart', 'systemd-networkd'])
time.sleep(5)
def tearDown(self):
self.Stoplldpd()
subprocess.check_output(['ip', 'link', 'del', 'lldpd'])
def test_lldpd_received_lldp_packets_sent_by_systemd_networkd(self):
self.Startlldpd()
time.sleep(10)
''' Test whether lldpd receved LLDP packets from networkd '''
output=subprocess.check_output(['lldpctl']).rstrip().decode('utf-8')
self.assertRegex(output, "ifname lldpd")
self.assertRegex(output, socket.gethostname())
def test_systemd_networkd_received_lldp_packets(self):
self.Startlldpd()
time.sleep(10)
# lldpd 02:01:02:03:04:09 [hostname] 02:01:02:03:04:09 lldpd-peer
output=subprocess.check_output(['networkctl', 'lldp', '--no-legend', '--no-pager']).rstrip().decode('utf-8')
self.assertRegex(output, "lldpd")
self.assertRegex(output, "lldpd-peer")
self.assertRegex(output, "12:34:56:78:9a:bd")
self.assertRegex(output, socket.gethostname())
# Port ID and Chasiss id count should be 2
self.assertEqual(2, output.count("12:34:56:78:9a:bd"))
class lldpdTests(unittest.TestCase, lldpdUtilities):
def setUp(self):
""" Setup """
self.SetupVethInterface()
def tearDown(self):
self.Stoplldpd()
os.remove(LLDPD_TCP_DUMP_FILE)
def test_lldpd_trasmitted_lldp_attributes(self):
""" verify at the other end of veth received LLDP packets that contains attibutes (link address, hostname, TTL, system desc). tcpdump """
self.StartCaptureLLDPPackets()
self.Startlldpd()
""" capture for 10 seconds """
time.sleep(10)
self.StopCapturingPackets()
self.FindProtocolFieldsinTCPDump(Chassis='Subtype MAC address \(4\): 02:01:02:03:04:09',
Port='Subtype MAC address \(3\): 02:01:02:03:04:09',
PortDesc='lldpd-peer',
TTL='TTL.*120s',
HostName=socket.gethostname() ,
System_Description='lldpd-system-name',
ManagementAddress='192.168.50.6')
def test_lldpd_trasmitted_lldp_packets(self):
""" verify at the other end of veth ifname lldpd has received LLDP packets. tcpdump """
self.StartCaptureLLDPPackets()
self.Startlldpd()
""" capture for 10 seconds """
time.sleep(10)
self.StopCapturingPackets()
self.FindProtocolFieldsinTCPDump(MAC='02:01:02:03:04:09',
TTL='TTL 120s')
if __name__ == '__main__':
unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout,
verbosity=2))

View file

@ -0,0 +1,35 @@
#!/bin/bash
# SPDX-License-Identifier: LGPL-2.1+
# ~~~
# LLDPD integration test
# Description: Test for lldpd:implementation of IEEE 802.1ab (LLDP)
#
# Author: Susant Sahani <susant@redhat.com>
# Copyright (c) 2018 Red Hat, Inc.
#~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="lldpd"
LldpdPidFile="/var/run/lldpd.pid"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "cp lldpd-tests.py /usr/bin/"
rlPhaseEnd
rlPhaseStartTest
rlLog "lldpd tests"
rlRun "/usr/bin/python3 /usr/bin/lldpd-tests.py"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "rm /usr/bin/lldpd-tests.py"
rlLog "lldpd tests done"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd
rlGetTestState

14
tests/tests.yml Normal file
View file

@ -0,0 +1,14 @@
- hosts: localhost
roles:
- role: standard-test-beakerlib
tags:
- classic
tests:
- miscellaneous-tests
required_packages:
- lldpd
- python3
- tcpdump
- systemd
- systemd-networkd
- iproute