source: test/Makefile @ 68d3308

4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivelibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change on this file since 68d3308 was 262a093, checked in by Richard Sanger <rsangerarj@…>, 7 years ago

Adds tests for the Live Linux formats, int: ring: and pcapint:

Launch from test/do-live-tests.sh (needs root)
Alternatively test/netns-env <command>, bash can be used here useful for debugging etc.

This runs tests in separate network namespace with two virtual adapters, this is isolated from the kernels influence so that the only traffic is that which we create.

  • test-live.c - Tests sending and receiving 100 packets from one format to another between to virtual ports
    • Tests read/write, wirelength, capturelength, packet order/integrity, timestamps, ability to set direction/snap lengths and trace statistics
  • test-live-snaplen.c Tests that snap length works correctly via trace_config(), does basic checks on the wire and capture lengths returned

Limitations

  • Doesn't support BSD yet
  • DPDK included but probably not working in master
  • Doesn't test BPF filters
  • Requires root to run

Found some existing issues :(, fixes to which will be in the following commits.

  • Property mode set to 100644
File size: 940 bytes
Line 
1
2RM=rm
3PREFIX=../
4CC=gcc
5
6INCLUDE = -I$(PREFIX)/lib -I$(PREFIX)/libpacketdump
7CFLAGS = -Wall -Wimplicit -Wformat -W -pedantic -pipe -g -O2 \
8                -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
9CFLAGS += $(INCLUDE)
10libdir = $(PREFIX)/lib/.libs:$(PREFIX)/libpacketdump/.libs
11LDLIBS = -L$(PREFIX)/lib/.libs -L$(PREFIX)/libpacketdump/.libs -ltrace -lpacketdump
12
13BINS = test-pcap-bpf test-event test-time test-dir test-wireless test-errors \
14        test-plen test-autodetect test-ports test-fragment test-live test-live-snaplen
15
16.PHONY: all clean distclean install depend test
17
18all: $(BINS) test-drops test-format test-decode test-decode2 test-write test-convert test-convert2
19
20clean:
21        $(RM) $(BINS) $(OBJS) test-format  test-decode test-convert \
22        test-decode2 test-write test-drops test-convert2
23
24distclean:
25        $(RM) $(BINS) $(OBJS) test-format test-decode test-convert test-drops test-convert2
26
27install:
28        @true
29
30# vim: noet ts=8 sw=8
Note: See TracBrowser for help on using the repository browser.