From e0f464424edbb2921afab36ba6af754cd6f5cda7 Mon Sep 17 00:00:00 2001 From: Hangbin Liu Date: Tue, 14 Nov 2023 14:05:09 +0800 Subject: [PATCH 1/8] spec: update license to SPDX format Signed-off-by: Hangbin Liu --- dropwatch.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dropwatch.spec b/dropwatch.spec index 6e04b76..0bbd167 100644 --- a/dropwatch.spec +++ b/dropwatch.spec @@ -1,9 +1,9 @@ Name: dropwatch Version: 1.5.4 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Kernel dropped packet monitor -License: GPLv2+ +License: GPL-2.0-or-later URL: https://github.com/nhorman/dropwatch Source0: https://github.com/nhorman/dropwatch/archive/v%{version}/%{name}-%{version}.tar.gz @@ -46,6 +46,9 @@ network packets. %license COPYING %changelog +* Tue Nov 14 2023 Hangbin Liu - 1.5.4-5 +- Update License to SPDX format + * Wed Jul 19 2023 Fedora Release Engineering - 1.5.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From beb90bd4f9d5aaabbfd03ce2c29b155823621a9f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 17:34:25 +0000 Subject: [PATCH 2/8] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- dropwatch.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dropwatch.spec b/dropwatch.spec index 0bbd167..71000e4 100644 --- a/dropwatch.spec +++ b/dropwatch.spec @@ -1,6 +1,6 @@ Name: dropwatch Version: 1.5.4 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Kernel dropped packet monitor License: GPL-2.0-or-later @@ -46,6 +46,9 @@ network packets. %license COPYING %changelog +* Fri Jan 19 2024 Fedora Release Engineering - 1.5.4-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Tue Nov 14 2023 Hangbin Liu - 1.5.4-5 - Update License to SPDX format From 7b46e6148db0abb78be8ddad03a860f34f403556 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jan 2024 09:51:10 +0000 Subject: [PATCH 3/8] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- dropwatch.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dropwatch.spec b/dropwatch.spec index 71000e4..57ceae2 100644 --- a/dropwatch.spec +++ b/dropwatch.spec @@ -1,6 +1,6 @@ Name: dropwatch Version: 1.5.4 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Kernel dropped packet monitor License: GPL-2.0-or-later @@ -46,6 +46,9 @@ network packets. %license COPYING %changelog +* Wed Jan 24 2024 Fedora Release Engineering - 1.5.4-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 19 2024 Fedora Release Engineering - 1.5.4-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 6af13c8c8eb9a8ea16de89dfe93d3f10bddfa78d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 21:24:38 +0000 Subject: [PATCH 4/8] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- dropwatch.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dropwatch.spec b/dropwatch.spec index 57ceae2..ebb4c42 100644 --- a/dropwatch.spec +++ b/dropwatch.spec @@ -1,6 +1,6 @@ Name: dropwatch Version: 1.5.4 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Kernel dropped packet monitor License: GPL-2.0-or-later @@ -46,6 +46,9 @@ network packets. %license COPYING %changelog +* Wed Jul 17 2024 Fedora Release Engineering - 1.5.4-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Wed Jan 24 2024 Fedora Release Engineering - 1.5.4-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From e81c726cb862026d2c12bc2fb8dfb2afcaee98f5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 16:15:23 +0000 Subject: [PATCH 5/8] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- dropwatch.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dropwatch.spec b/dropwatch.spec index ebb4c42..f63d181 100644 --- a/dropwatch.spec +++ b/dropwatch.spec @@ -1,6 +1,6 @@ Name: dropwatch Version: 1.5.4 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Kernel dropped packet monitor License: GPL-2.0-or-later @@ -46,6 +46,9 @@ network packets. %license COPYING %changelog +* Thu Jan 16 2025 Fedora Release Engineering - 1.5.4-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Wed Jul 17 2024 Fedora Release Engineering - 1.5.4-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 3d952b57a6f870980adf9941289faf163a1a0b55 Mon Sep 17 00:00:00 2001 From: Hangbin Liu Date: Wed, 30 Apr 2025 02:29:22 +0000 Subject: [PATCH 6/8] 1.5.5-1 Update to 1.5.5 Signed-off-by: Hangbin Liu --- .gitignore | 1 + dropwatch.spec | 10 ++++++++-- sources | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 53969bf..e8a6050 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ dropwatch-1.2.tbz2 /dropwatch-1.5.tar.gz /dropwatch-1.5.3.tar.gz /dropwatch-1.5.4.tar.gz +/dropwatch-1.5.5.tar.gz diff --git a/dropwatch.spec b/dropwatch.spec index f63d181..18efa3e 100644 --- a/dropwatch.spec +++ b/dropwatch.spec @@ -1,6 +1,6 @@ Name: dropwatch -Version: 1.5.4 -Release: 9%{?dist} +Version: 1.5.5 +Release: 1%{?dist} Summary: Kernel dropped packet monitor License: GPL-2.0-or-later @@ -46,6 +46,12 @@ network packets. %license COPYING %changelog +* Wed Apr 30 2025 Hangbin Liu - 1.5.5-1 +- Update to version 1.5.5 +- kas is the default symbol lookup method now +- Fix building without libtool installed +- Misc fixes for kas lookup logic + * Thu Jan 16 2025 Fedora Release Engineering - 1.5.4-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/sources b/sources index cb66d7b..e954bb7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (dropwatch-1.5.4.tar.gz) = 4af06c05c694d4a044a5e92ba9869a865730bb2caa28cddc33160481f490ed77a7300ef57c9f76722d7bc8d4ac47cdfd5f13daf4f764500f3c90a72b5ee58d61 +SHA512 (dropwatch-1.5.5.tar.gz) = b85de34d9b7c1f8232720dd8d4d843cb251ef96d2d9bd592e001d889bd55c2c6821cb8fb3af061bd8e5e2488f9f3aef4c45d1a0c41de3e626bc7c3794c1a4405 From 27a66461c59353b8bfb9b2f57d22f882aa28c81f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 19:32:03 +0000 Subject: [PATCH 7/8] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- dropwatch.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dropwatch.spec b/dropwatch.spec index 18efa3e..568b88e 100644 --- a/dropwatch.spec +++ b/dropwatch.spec @@ -1,6 +1,6 @@ Name: dropwatch Version: 1.5.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Kernel dropped packet monitor License: GPL-2.0-or-later @@ -46,6 +46,9 @@ network packets. %license COPYING %changelog +* Wed Jul 23 2025 Fedora Release Engineering - 1.5.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Wed Apr 30 2025 Hangbin Liu - 1.5.5-1 - Update to version 1.5.5 - kas is the default symbol lookup method now From 14117825e6d6be7bd19829ba5cb42f42bb83be7c Mon Sep 17 00:00:00 2001 From: Hangbin Liu Date: Tue, 29 Jul 2025 08:37:58 +0000 Subject: [PATCH 8/8] Convert test to tmt Resolves: rhbz#2382892 Signed-off-by: Hangbin Liu --- .fmf/version | 1 + plans.fmf | 9 +++++ tests/README | 2 -- tests/inventory | 3 -- tests/main.fmf | 2 ++ tests/run_tests.sh | 15 ++++++++ tests/selftest/Makefile | 64 --------------------------------- tests/selftest/PURPOSE | 4 --- tests/selftest/runtest.sh | 74 --------------------------------------- tests/tests.yml | 21 ----------- 10 files changed, 27 insertions(+), 168 deletions(-) create mode 100644 .fmf/version create mode 100644 plans.fmf delete mode 100644 tests/README delete mode 100755 tests/inventory create mode 100644 tests/main.fmf create mode 100755 tests/run_tests.sh delete mode 100644 tests/selftest/Makefile delete mode 100644 tests/selftest/PURPOSE delete mode 100755 tests/selftest/runtest.sh delete mode 100644 tests/tests.yml diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plans.fmf b/plans.fmf new file mode 100644 index 0000000..20f21fd --- /dev/null +++ b/plans.fmf @@ -0,0 +1,9 @@ +summary: Run dropwatch selftest +discover: + how: fmf +prepare: + how: install + # install psmisc for killall + package: [dropwatch, psmisc] +execute: + how: tmt diff --git a/tests/README b/tests/README deleted file mode 100644 index 44fb438..0000000 --- a/tests/README +++ /dev/null @@ -1,2 +0,0 @@ -initial tests: -run make check, which runs any selftests in the upstream source tarball diff --git a/tests/inventory b/tests/inventory deleted file mode 100755 index 6238138..0000000 --- a/tests/inventory +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -export TEST_DOCKER_EXTRA_ARGS="--security-opt seccomp:unconfined" -exec merge-standard-inventory "$@" diff --git a/tests/main.fmf b/tests/main.fmf new file mode 100644 index 0000000..6189cf3 --- /dev/null +++ b/tests/main.fmf @@ -0,0 +1,2 @@ +summary: Smoke test +test: ./run_tests.sh diff --git a/tests/run_tests.sh b/tests/run_tests.sh new file mode 100755 index 0000000..6777d3c --- /dev/null +++ b/tests/run_tests.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +abort_dropwatch() { + sleep 5 + killall -SIGINT dropwatch +} + +abort_dropwatch & +echo -e "set alertlimit 1\nstart\nstop\nexit" | dropwatch -l kas &> "$TMT_TEST_DATA"/dropwatch.log + +# shellcheck disable=SC2181 +[ $? -eq 0 ] && exit 0 +# If the platform doesn't support NET_DM, skip this test +# Usually we got this issue in container as no privilege permission +grep -q NET_DM "$TMT_TEST_DATA"/dropwatch.log && exit 0 || exit 1 diff --git a/tests/selftest/Makefile b/tests/selftest/Makefile deleted file mode 100644 index 7b452de..0000000 --- a/tests/selftest/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/patch/Sanity/selftest -# Description: Executes upstream test suite -# Author: Miroslav Vadkerti -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2010 Red Hat, Inc. All rights reserved. -# -# This copyrighted material is made available to anyone wishing -# to use, modify, copy, or redistribute it subject to the terms -# and conditions of the GNU General Public License version 2. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/rng-tools/Sanity/selftest -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Miroslav Vadkerti " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Executes upstream test suite" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 30m" >> $(METADATA) - @echo "RunFor: patch" >> $(METADATA) - @echo "Requires: patch gcc rpm-build automake libselinux-devel ed libattr-devel" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: -RHEL3 -RHEL4 -RHELServer5 -RHELClient5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/selftest/PURPOSE b/tests/selftest/PURPOSE deleted file mode 100644 index 971cc3f..0000000 --- a/tests/selftest/PURPOSE +++ /dev/null @@ -1,4 +0,0 @@ -PURPOSE of /CoreOS/dropwatch/Sanity/selftest -Description: Executes rngtest to validate integrity of dropwatch -Author: Neil Horman - diff --git a/tests/selftest/runtest.sh b/tests/selftest/runtest.sh deleted file mode 100755 index a9f6055..0000000 --- a/tests/selftest/runtest.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash -# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/rng-tools/Sanity/selftest -# Description: Executes the upstream test suite comming with the package -# Author: Miroslav Vadkerti -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2010 Red Hat, Inc. All rights reserved. -# -# This copyrighted material is made available to anyone wishing -# to use, modify, copy, or redistribute it subject to the terms -# and conditions of the GNU General Public License version 2. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include rhts environment -. /usr/bin/rhts-environment.sh || exit 1 -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="dropwatch" -PACKAGES="dropwatch automake autoconf libtool kernel-headers readline-devel binutils-devel libnl3-devel pkgconf-pkg-config" -UPSTREAMPKG="dropwatch-*" -BUILDLOG=`mktemp` -TESTLOG=`mktemp` -TARGET=$(echo `uname -m` | egrep ppc) -if [[ $TARGET != "" ]]; then TARGET="--target `uname -m`"; fi -TOPDIR=`mktemp -d` -SPEC="$TOPDIR/SPECS/$PACKAGE*.spec" -TESTDIR="$TOPDIR/BUILD/$UPSTREAMPKG/" - -rlJournalStart - rlPhaseStartSetup - for PKG in $PACKAGES; do - rlAssertRpm $PKG - done - rlPhaseEnd - rlPhaseStartTest - rlFetchSrcForInstalled $PACKAGE - rlRun "rpm -ivh --define '_topdir $TOPDIR' $PACKAGE*.src.rpm" 0 "Installing $PACKAGE src rpm" - echo "+ Building $PACKAGE (Log: $BUILDLOG)" - echo "+ Build command: rpmbuild -bc $SPEC $TARGET" - rlRun "rpmbuild --define '_topdir $TOPDIR' -bc $SPEC $TARGET &> $BUILDLOG" - echo "+ Buildlog:" - tail -n 100 $BUILDLOG - rlRun "pushd ." - rlRun "cd $TESTDIR" - rlRun "make check &> $TESTLOG" - if [ $? -eq 0 ] - then - rlPass "Selftest Passed" - else - rlFail "Selftest Failed" - fi - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "popd" - rlRun "rm -rf $PACKAGE*.src.rpm" 0 "Removing source rpm" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index a4aef7b..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -# This first play always runs on the local staging system -- hosts: localhost - roles: - - role: standard-test-beakerlib - tags: - - classic - tests: - - selftest - required_packages: - - autoconf - - automake - - libtool - - kernel-headers - - readline-devel - - binutils-devel - - libnl3-devel - - pkgconf-pkg-config - - libnl3-devel - - wget - - rpm-build