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.in17
-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, 62 insertions, 13 deletions
diff --git a/src/test/Makefile.am b/src/test/Makefile.am
index 42189ca..a3f343f 100644
--- a/src/test/Makefile.am
+++ b/src/test/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright (c) 2018-2023, 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 77f7f4d..713d49a 100644
--- a/src/test/Makefile.in
+++ b/src/test/Makefile.in
@@ -14,7 +14,7 @@
@SET_MAKE@
-# Copyright (c) 2018-2023, OARC, Inc.
+# Copyright (c) 2018-2024 OARC, Inc.
# All rights reserved.
#
# This file is part of dnsjit.
@@ -471,6 +471,8 @@ 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@
@@ -505,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 \
@@ -926,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
@@ -949,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 4b403d5..400b92c 100755
--- a/src/test/test1.sh
+++ b/src/test/test1.sh
@@ -1,5 +1,5 @@
-#!/bin/sh -e
-# Copyright (c) 2018-2023, 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 bc5e502..40c0928 100755
--- a/src/test/test2.sh
+++ b/src/test/test2.sh
@@ -1,5 +1,5 @@
#!/bin/sh -e
-# Copyright (c) 2018-2023, 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 5a0af46..e8e6a71 100755
--- a/src/test/test3.sh
+++ b/src/test/test3.sh
@@ -1,5 +1,5 @@
#!/bin/sh -e
-# Copyright (c) 2018-2023, 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 2c21a75..b72c781 100755
--- a/src/test/test4.sh
+++ b/src/test/test4.sh
@@ -1,5 +1,5 @@
#!/bin/sh -e
-# Copyright (c) 2018-2023, 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 b83b193..23c3575 100755
--- a/src/test/test6.sh
+++ b/src/test/test6.sh
@@ -1,5 +1,5 @@
#!/bin/sh -e
-# Copyright (c) 2018-2023, 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