[v5] test/bpf_convert: do not require DNS lookup

Message ID 20211115232956.118682-1-stephen@networkplumber.org (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series [v5] test/bpf_convert: do not require DNS lookup |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/github-robot: build success github build: passed
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-intel-Functional success Functional Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS

Commit Message

Stephen Hemminger Nov. 15, 2021, 11:29 p.m. UTC
  These tests were using strings with hostname (dpdk.org) and this makes
test code do a DNS lookup. In container environment used for OpenSuse
build, DNS is unavailable. Replace dpdk.org with an IPv4 address
reserved for documentation (RFC5737) and use IPv6 in one example
(RFC3849).  Actual addresses don't matter for this test which is
validating that code generated in classic BPF can be successfully
converted to eBPF.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 app/test/test_bpf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

David Marchand Nov. 16, 2021, 1:31 p.m. UTC | #1
On Tue, Nov 16, 2021 at 12:30 AM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> These tests were using strings with hostname (dpdk.org) and this makes
> test code do a DNS lookup. In container environment used for OpenSuse
> build, DNS is unavailable. Replace dpdk.org with an IPv4 address
> reserved for documentation (RFC5737) and use IPv6 in one example
> (RFC3849).  Actual addresses don't matter for this test which is
> validating that code generated in classic BPF can be successfully
> converted to eBPF.

Fixes: 2eccf6afbea9 ("bpf: add function to convert classic BPF to DPDK BPF")

>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> Acked-by: Luca Boccassi <bluca@debian.org>

Applied, thanks.
  

Patch

diff --git a/app/test/test_bpf.c b/app/test/test_bpf.c
index ef861d05e755..785f3e689e10 100644
--- a/app/test/test_bpf.c
+++ b/app/test/test_bpf.c
@@ -3359,8 +3359,8 @@  static const char * const sample_filters[] = {
 	"dst net 192.168.0.0/24",
 	"dst net 192.168.0.0 mask 255.255.255.0",
 	"port 53",
-	"host dpdk.org and not (port 80 or port 25)",
-	"host dpdk.org and not port 80 and not port 25",
+	"host 192.0.2.1 and not (port 80 or port 25)",
+	"host 2001:4b98:db0::8  and not port 80 and not port 25",
 	"port not 53 and not arp",
 	"(tcp[0:2] > 1500 and tcp[0:2] < 1550) or (tcp[2:2] > 1500 and tcp[2:2] < 1550)",
 	"ether proto 0x888e",