Compare commits

..

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
4e7b88e7fc
!22 Remove unrecognized options: --disable-rpath
From: @zhangdaolong 
Reviewed-by: @seuzw 
Signed-off-by: @seuzw
2023-01-28 08:35:13 +00:00
zhangdaolong
b61d20a8b4 Remove unrecognized options: --disable-rpath for configure 2023-01-19 17:22:47 +08:00
openeuler-ci-bot
382a00ecc1
!19 add make as BuildRequires for rpmbuild
From: @XWwalker 
Reviewed-by: @seuzw 
Signed-off-by: @seuzw
2022-11-28 06:18:50 +00:00
xingwei
c64d959b51 add make as BuildRequires for rpmbuild 2022-11-28 03:19:08 +00:00
openeuler-ci-bot
06a7cf4354
!15 enable test
From: @eaglegai 
Reviewed-by: @seuzw 
Signed-off-by: @seuzw
2022-09-22 07:30:01 +00:00
eaglegai
65aada3429 enable test 2022-09-22 06:49:18 +00:00
openeuler-ci-bot
1504d8667d
!5 Upgrade version to 1.0.9
From: @YukariChiba 
Reviewed-by: @zengwefeng 
Signed-off-by: @zengwefeng
2022-08-08 02:19:34 +00:00
YukariChiba
e5494aea5d Upgrade version to 1.0.9 2022-08-07 17:21:10 +08:00
openeuler-ci-bot
49a5d048e5 !4 Add the compilation dependency of gcc.
From: @lijingyuan007
Reviewed-by: @zengwefeng
Signed-off-by: @zengwefeng
2021-05-27 21:29:55 +08:00
lijingyuan007
ae04f6cdea Add the compilation dependency of gcc. 2021-05-27 10:52:31 +08:00
4 changed files with 114 additions and 3 deletions

View File

@ -0,0 +1,73 @@
From e02ad202d6eec5ee012e24cb1901167f07511055 Mon Sep 17 00:00:00 2001
From: zhangwenhao <zhangwenhao8@huawei.com>
Date: Thu, 28 Jan 2021 22:41:36 +0800
Subject: [PATCH] enable make check tests
---
tests/Makefile.in | 7 +++++++
tests/ct_events_reliable.c | 4 +++-
tests/test_filter.c | 5 ++++-
3 files changed, 25 insertions(+), 2 deletions(-)
create mode 100644 tests/qa-connlabel.conf
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 7fb8924..4c600df 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -520,7 +520,13 @@ distdir: $(DISTFILES)
done
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
- $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+ $(MAKE) $(AM_MAKEFLAGS)
+ ./test_api
+ ./test_connlabel
+ ../utils/conntrack_flush
+ ./ct_stress 10000 & ./ct_events_reliable
+ ../utils/conntrack_flush
+
check: check-am
all-am: Makefile
installdirs:
diff --git a/tests/ct_events_reliable.c b/tests/ct_events_reliable.c
index b51d0e5..26ff8e9 100644
--- a/tests/ct_events_reliable.c
+++ b/tests/ct_events_reliable.c
@@ -20,9 +20,11 @@ static int event_cb(enum nf_conntrack_msg_type type,
else if (type == NFCT_T_DESTROY)
destroy++;
- if ((++events % 10000) == 0)
+ if ((++events % 3) == 0) {
printf("%d events received (%d new, %d update, %d destroy)\n",
events, new, update, destroy);
+ return NFCT_CB_STOP;
+ }
return NFCT_CB_CONTINUE;
}
diff --git a/tests/test_filter.c b/tests/test_filter.c
index 7877819..efc7c3b 100644
--- a/tests/test_filter.c
+++ b/tests/test_filter.c
@@ -20,7 +20,7 @@ static int event_cb(enum nf_conntrack_msg_type type,
nfct_snprintf(buf, sizeof(buf), ct, type, NFCT_O_PLAIN, NFCT_OF_TIME);
printf("%s\n", buf);
- if (++n == 10)
+ if (++n == 1)
return NFCT_CB_STOP;
return NFCT_CB_CONTINUE;
@@ -61,6 +61,9 @@ int main(void)
.addr = ntohl(inet_addr("127.0.0.1")) + i,
.mask = 0xffffffff,
};
+ nfct_filter_set_logic(filter,
+ NFCT_FILTER_SRC_IPV4,
+ NFCT_FILTER_LOGIC_NEGATIVE);
nfct_filter_add_attr(filter, NFCT_FILTER_SRC_IPV4, &fltr_ipv4);
};
--
2.23.0

Binary file not shown.

Binary file not shown.

View File

@ -1,13 +1,17 @@
#needsrootforbuild
Name: libnetfilter_conntrack
Version: 1.0.8
Release: 1
Version: 1.0.9
Release: 4
Summary: A userspace library providing a API
License: GPLv2+
URL: http://netfilter.org
Source0: http://netfilter.org/projects/libnetfilter_conntrack/files/%{name}-%{version}.tar.bz2
Patch0: enable-make-check-tests.patch
BuildRequires: pkgconfig kernel-headers
BuildRequires: libmnl-devel >= 1.0.3 libnfnetlink-devel >= 1.0.1
BuildRequires: make
%description
libnetfilter_conntrack is a userspace library providing a programming
@ -16,6 +20,7 @@ library is currently used by conntrack-tools among many other applications.
%package devel
Summary: The development files for libnetfilter_conntrack
BuildRequires: gcc
Requires: kernel-headers libnfnetlink-devel >= 1.0.1
Requires: %{name} = %{version}-%{release}
@ -27,13 +32,16 @@ This package contains development files.
%autosetup -p1
%build
%configure --disable-rpath
%configure
%make_build
%install
%make_install
%delete_la
%check
make check
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
@ -47,6 +55,36 @@ This package contains development files.
%{_libdir}/*.so
%changelog
* Thu Jan 19 2023 zhangdaolong <dlzhangak@isoftstone.com> - 1.0.9-4
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:Remove unrecognized options
* Mon Nov 28 2022 xingwei <xingwei14@h-partners.com> - 1.0.9-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add make as BuildRequires for rpmbuild
* Thu Sep 22 2022 gaihuiying <eaglegai@163.com> - 1.0.9-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:enable test
* Sun Jun 12 2022 YukariChiba <i@0x7f.cc> - 1.0.9-1
- Type:update
- ID:NA
- SUG:NA
- DESC:Upgrade version to 1.0.9
* Thu May 27 2021 lijingyuan <lijingyuan3@huawei.com> - 1.0.8-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:Add the compilation dependency of gcc.
* Wed Jul 22 2020 zhangxingliang <zhangxingliang3@huawei.com> - 1.0.8-1
- Type:update
- ID:NA