mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-01 13:10:43 +00:00
add C89 and bigendian tests for L2, be for MIP
This commit is contained in:
1 parent
8e7f5ab00e
commit
5bf953cb4a
4 files changed
+118
-9
No files matched your search
+20
-2
@@ -29,7 +29,7 @@ COMMON_CFLAGS ?= $(C_WARN) $(WARN) $(INCS) $(DEFS) -DMG_ENABLE_IPV6=$(IPV6) $(TF
|
||||
CFLAGS ?= $(OPTS) $(ASAN) $(COMMON_CFLAGS)
|
||||
VALGRIND_CFLAGS ?= $(OPTS) $(COMMON_CFLAGS)
|
||||
VALGRIND_RUN ?= valgrind --tool=memcheck --gen-suppressions=all --leak-check=full --show-leak-kinds=all --leak-resolution=high --track-origins=yes --error-exitcode=1 --exit-on-first-error=yes --fair-sched=yes
|
||||
.PHONY: clean_tutorials tutorials mip_test eth_test ppp_test test valgrind
|
||||
.PHONY: tutorials mip_test eth_test ppp_test eth_vc98 ppp_vc98 eth_s390 ppp_s390 test valgrind
|
||||
|
||||
ifeq "$(findstring ++,$(CC))" ""
|
||||
# $(CC) does not end with ++, i.e. we're using C. Apply C flags
|
||||
@@ -81,7 +81,7 @@ endif
|
||||
all:
|
||||
$(MAKE) -C ../tutorials/http/http-server
|
||||
|
||||
tall: mg_prefix unamalgamated test valgrind fuzz fuzz_tls vc98 vc17 vc22 mingw mingw++ arm armhf riscv s390 tutorials tutorials_win tutorials_embedded mip_test eth_test ppp_test mip_vc98
|
||||
tall: mg_prefix unamalgamated test valgrind fuzz fuzz_tls vc98 vc17 vc22 mingw mingw++ arm armhf riscv s390 tutorials tutorials_win tutorials_embedded mip_test eth_test ppp_test mip_vc98 eth_vc98 ppp_vc98 eth_s390 ppp_s390
|
||||
|
||||
mip_test: mip_test.c mongoose.c mongoose.h packed_fs.c Makefile
|
||||
$(CC) mip_test.c packed_fs.c $(CFLAGS) $(LDFLAGS) -o $@
|
||||
@@ -112,6 +112,14 @@ mip_vc98: mip_test.c mongoose.c mongoose.h packed_fs.c Makefile
|
||||
$(DOCKER) mdashnet/vc98 wine cl mip_test.c packed_fs.c $(VCFLAGS) $(DEFS) $(TFLAGS) /Fe$@.exe
|
||||
$(DOCKER) -e WINEPREFIX=/tmp/wineprefix mdashnet/vc98 wine $@.exe
|
||||
|
||||
eth_vc98: eth_test.c mongoose.c mongoose.h Makefile
|
||||
$(DOCKER) mdashnet/vc98 wine cl eth_test.c $(VCFLAGS) $(DEFS) $(TFLAGS) /Fe$@.exe
|
||||
$(DOCKER) -e WINEPREFIX=/tmp/wineprefix mdashnet/vc98 wine $@.exe
|
||||
|
||||
ppp_vc98: ppp_test.c driver_mock.c mongoose.c mongoose.h Makefile
|
||||
$(DOCKER) mdashnet/vc98 wine cl ppp_test.c $(VCFLAGS) $(DEFS) $(TFLAGS) /Fe$@.exe
|
||||
$(DOCKER) -e WINEPREFIX=/tmp/wineprefix mdashnet/vc98 wine $@.exe
|
||||
|
||||
packed_fs.c: Makefile data/ssi.h fuzz.c data/a.txt data/ca.pem certs/ca.crt certs/server.crt certs/server.key
|
||||
$(CC) $(CFLAGS) pack.c -o pack
|
||||
$(RUN) ./pack Makefile data/ssi.h fuzz.c data/a.txt data/range.txt data/ca.pem certs/ca.crt certs/server.crt certs/server.key certs/client.key certs/client.crt > $@
|
||||
@@ -205,6 +213,16 @@ mip_s390: CC = $(DOCKER) mdashnet/s390 cc
|
||||
mip_s390: RUN = $(DOCKER) --init mdashnet/s390
|
||||
mip_s390: mip_test
|
||||
|
||||
eth_s390: ASAN=
|
||||
eth_s390: CC = $(DOCKER) mdashnet/s390 cc
|
||||
eth_s390: RUN = $(DOCKER) --init mdashnet/s390
|
||||
eth_s390: eth_test
|
||||
|
||||
ppp_s390: ASAN=
|
||||
ppp_s390: CC = $(DOCKER) mdashnet/s390 cc
|
||||
ppp_s390: RUN = $(DOCKER) --init mdashnet/s390
|
||||
ppp_s390: ppp_test
|
||||
|
||||
mip_port_s390: ASAN=
|
||||
mip_port_s390: IPV6=0
|
||||
# This test requires curl, not present in this image
|
||||
|
||||
+2
-2
@@ -158,7 +158,7 @@ static void frag_send_fn(struct mg_connection *c, int ev, void *ev_data) {
|
||||
}
|
||||
} else if (ev == MG_EV_WRITE) {
|
||||
// Checking TCP segment sizes (ev_data points to the TCP payload length)
|
||||
ASSERT(*(int *) ev_data == s_seg_sizes[s_seg_sent++]);
|
||||
ASSERT(*(long *) ev_data == s_seg_sizes[s_seg_sent++]);
|
||||
}
|
||||
(void) c, (void) ev_data;
|
||||
}
|
||||
@@ -298,7 +298,7 @@ static void init_tests(struct mg_mgr *mgr, struct eth *e, struct ipp *ipp,
|
||||
mif->ip = mg_htonl(0x1000000);
|
||||
mif->gw = mg_htonl(0x1000000);
|
||||
mif->gw_ready = true;
|
||||
mif->mask = 255; // use router, to avoid firing an ARP request
|
||||
mif->mask = mg_htonl(0xff000000); // use router, avoid firing ARP request
|
||||
mif->state = MG_TCPIP_STATE_READY; // so mg_send() works and DHCP stops
|
||||
}
|
||||
mg_tcpip_init(mgr, mif);
|
||||
|
||||
Reference in new issue
Block a user