summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/Makefile.am13
-rw-r--r--src/test/Makefile.in32
-rw-r--r--src/test/dns.pcap.gzbin0 -> 4529 bytes
-rw-r--r--src/test/dns.pcap.xzbin0 -> 3216 bytes
-rwxr-xr-xsrc/test/test1.sh29
-rwxr-xr-xsrc/test/test2.sh2
-rwxr-xr-xsrc/test/test3.sh2
-rwxr-xr-xsrc/test/test4.sh2
-rwxr-xr-xsrc/test/test6.sh2
-rw-r--r--src/test/test_compressupport.lua8
10 files changed, 73 insertions, 17 deletions
diff --git a/src/test/Makefile.am b/src/test/Makefile.am
index 00531e4..a3f343f 100644
--- a/src/test/Makefile.am
+++ b/src/test/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright (c) 2018-2022, OARC, Inc.
+# Copyright (c) 2018-2024 OARC, Inc.
# All rights reserved.
#
# This file is part of dnsjit.
@@ -23,7 +23,8 @@ CLEANFILES = test*.log test*.trs test*.out \
TESTS = test1.sh test2.sh test3.sh test4.sh test6.sh test-ipsplit.sh \
test-trie.sh test-base64url.sh
-test1.sh: dns.pcap-dist dns.pcap.lz4-dist dns.pcap.zst-dist
+test1.sh: dns.pcap-dist dns.pcap.lz4-dist dns.pcap.zst-dist \
+ dns.pcap.xz-dist dns.pcap.gz-dist
test2.sh: dns.pcap-dist
@@ -46,7 +47,13 @@ test-trie.sh: pellets.pcap-dist dns.pcap-dist
.zst.zst-dist:
cp "$<" "$@"
+.xz.xz-dist:
+ cp "$<" "$@"
+
+.gz.gz-dist:
+ cp "$<" "$@"
+
EXTRA_DIST = $(TESTS) \
dns.pcap pellets.pcap test_ipsplit.lua test_trie.lua test_base64url.lua \
test1.gold test2.gold test3.gold test4.gold test_compressupport.lua \
- dns.pcap.lz4 dns.pcap.zst
+ dns.pcap.lz4 dns.pcap.zst dns.pcap.xz dns.pcap.gz
diff --git a/src/test/Makefile.in b/src/test/Makefile.in
index 38ce583..713d49a 100644
--- a/src/test/Makefile.in
+++ b/src/test/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,7 @@
@SET_MAKE@
-# Copyright (c) 2018-2022, OARC, Inc.
+# Copyright (c) 2018-2024 OARC, Inc.
# All rights reserved.
#
# This file is part of dnsjit.
@@ -329,6 +329,7 @@ am__set_TESTS_bases = \
bases='$(TEST_LOGS)'; \
bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
bases=`echo $$bases`
+AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
RECHECK_LOGS = $(TEST_LOGS)
AM_RECURSIVE_TARGETS = check recheck
TEST_SUITE_LOG = test-suite.log
@@ -367,6 +368,8 @@ CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPUEXT_FLAGS = @CPUEXT_FLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -377,6 +380,7 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
@@ -452,6 +456,8 @@ datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
+gnutls_CFLAGS = @gnutls_CFLAGS@
+gnutls_LIBS = @gnutls_LIBS@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -465,6 +471,10 @@ libdir = @libdir@
libexecdir = @libexecdir@
liblz4_CFLAGS = @liblz4_CFLAGS@
liblz4_LIBS = @liblz4_LIBS@
+liblzma_CFLAGS = @liblzma_CFLAGS@
+liblzma_LIBS = @liblzma_LIBS@
+libpcap_CFLAGS = @libpcap_CFLAGS@
+libpcap_LIBS = @libpcap_LIBS@
libzstd_CFLAGS = @libzstd_CFLAGS@
libzstd_LIBS = @libzstd_LIBS@
localedir = @localedir@
@@ -497,12 +507,12 @@ TESTS = test1.sh test2.sh test3.sh test4.sh test6.sh test-ipsplit.sh \
EXTRA_DIST = $(TESTS) \
dns.pcap pellets.pcap test_ipsplit.lua test_trie.lua test_base64url.lua \
test1.gold test2.gold test3.gold test4.gold test_compressupport.lua \
- dns.pcap.lz4 dns.pcap.zst
+ dns.pcap.lz4 dns.pcap.zst dns.pcap.xz dns.pcap.gz
all: all-am
.SUFFIXES:
-.SUFFIXES: .log .lz4 .lz4-dist .pcap .pcap-dist .test .test$(EXEEXT) .trs .zst .zst-dist
+.SUFFIXES: .gz .gz-dist .log .lz4 .lz4-dist .pcap .pcap-dist .test .test$(EXEEXT) .trs .xz .xz-dist .zst .zst-dist
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -653,7 +663,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
fi; \
echo "$${col}$$br$${std}"; \
- echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
+ echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \
echo "$${col}$$br$${std}"; \
create_testsuite_report --maybe-color; \
echo "$$col$$br$$std"; \
@@ -757,7 +767,6 @@ test-base64url.sh.log: test-base64url.sh
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
-
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
@@ -919,7 +928,8 @@ uninstall-am:
.PRECIOUS: Makefile
-test1.sh: dns.pcap-dist dns.pcap.lz4-dist dns.pcap.zst-dist
+test1.sh: dns.pcap-dist dns.pcap.lz4-dist dns.pcap.zst-dist \
+ dns.pcap.xz-dist dns.pcap.gz-dist
test2.sh: dns.pcap-dist
@@ -942,6 +952,12 @@ test-trie.sh: pellets.pcap-dist dns.pcap-dist
.zst.zst-dist:
cp "$<" "$@"
+.xz.xz-dist:
+ cp "$<" "$@"
+
+.gz.gz-dist:
+ cp "$<" "$@"
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/src/test/dns.pcap.gz b/src/test/dns.pcap.gz
new file mode 100644
index 0000000..5ad94b4
--- /dev/null
+++ b/src/test/dns.pcap.gz
Binary files differ
diff --git a/src/test/dns.pcap.xz b/src/test/dns.pcap.xz
new file mode 100644
index 0000000..064f4a5
--- /dev/null
+++ b/src/test/dns.pcap.xz
Binary files differ
diff --git a/src/test/test1.sh b/src/test/test1.sh
index 14d3f8f..400b92c 100755
--- a/src/test/test1.sh
+++ b/src/test/test1.sh
@@ -1,5 +1,5 @@
-#!/bin/sh -e
-# Copyright (c) 2018-2022, OARC, Inc.
+#!/bin/sh -ex
+# Copyright (c) 2018-2024 OARC, Inc.
# All rights reserved.
#
# This file is part of dnsjit.
@@ -29,3 +29,28 @@ if echo "$support"|grep -q zstd; then
../dnsjit "$srcdir/../../examples/dumpdns.lua" dns.pcap.zst-dist zstd >test1.out
diff "$srcdir/test1.gold" test1.out
fi
+if echo "$support"|grep -q lzma; then
+ ../dnsjit "$srcdir/../../examples/dumpdns.lua" dns.pcap.xz-dist xz >test1.out
+ diff "$srcdir/test1.gold" test1.out
+fi
+if echo "$support"|grep -q gzip; then
+ ../dnsjit "$srcdir/../../examples/dumpdns.lua" dns.pcap.gz-dist gz >test1.out
+ diff "$srcdir/test1.gold" test1.out
+fi
+
+if echo "$support"|grep -q lz4; then
+ ../dnsjit "$srcdir/../../examples/dumpdns.lua" dns.pcap.lz4-dist lz4 mmap >test1.out
+ diff "$srcdir/test1.gold" test1.out
+fi
+if echo "$support"|grep -q zstd; then
+ ../dnsjit "$srcdir/../../examples/dumpdns.lua" dns.pcap.zst-dist zstd mmap >test1.out
+ diff "$srcdir/test1.gold" test1.out
+fi
+if echo "$support"|grep -q lzma; then
+ ../dnsjit "$srcdir/../../examples/dumpdns.lua" dns.pcap.xz-dist xz mmap >test1.out
+ diff "$srcdir/test1.gold" test1.out
+fi
+if echo "$support"|grep -q gzip; then
+ ../dnsjit "$srcdir/../../examples/dumpdns.lua" dns.pcap.gz-dist gz mmap >test1.out
+ diff "$srcdir/test1.gold" test1.out
+fi
diff --git a/src/test/test2.sh b/src/test/test2.sh
index ff0ca28..40c0928 100755
--- a/src/test/test2.sh
+++ b/src/test/test2.sh
@@ -1,5 +1,5 @@
#!/bin/sh -e
-# Copyright (c) 2018-2022, OARC, Inc.
+# Copyright (c) 2018-2024 OARC, Inc.
# All rights reserved.
#
# This file is part of dnsjit.
diff --git a/src/test/test3.sh b/src/test/test3.sh
index f0b3581..e8e6a71 100755
--- a/src/test/test3.sh
+++ b/src/test/test3.sh
@@ -1,5 +1,5 @@
#!/bin/sh -e
-# Copyright (c) 2018-2022, OARC, Inc.
+# Copyright (c) 2018-2024 OARC, Inc.
# All rights reserved.
#
# This file is part of dnsjit.
diff --git a/src/test/test4.sh b/src/test/test4.sh
index f47bfdf..b72c781 100755
--- a/src/test/test4.sh
+++ b/src/test/test4.sh
@@ -1,5 +1,5 @@
#!/bin/sh -e
-# Copyright (c) 2018-2022, OARC, Inc.
+# Copyright (c) 2018-2024 OARC, Inc.
# All rights reserved.
#
# This file is part of dnsjit.
diff --git a/src/test/test6.sh b/src/test/test6.sh
index 686356d..23c3575 100755
--- a/src/test/test6.sh
+++ b/src/test/test6.sh
@@ -1,5 +1,5 @@
#!/bin/sh -e
-# Copyright (c) 2018-2022, OARC, Inc.
+# Copyright (c) 2018-2024 OARC, Inc.
# All rights reserved.
#
# This file is part of dnsjit.
diff --git a/src/test/test_compressupport.lua b/src/test/test_compressupport.lua
index 9d4502e..b7818d8 100644
--- a/src/test/test_compressupport.lua
+++ b/src/test/test_compressupport.lua
@@ -8,3 +8,11 @@ zpcap:zstd()
if zpcap:have_support() then
print("zstd")
end
+zpcap:lzma()
+if zpcap:have_support() then
+ print("lzma")
+end
+zpcap:gzip()
+if zpcap:have_support() then
+ print("gzip")
+end