Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
49b8ea1b
Commit
49b8ea1b
authored
Oct 31, 2013
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: Add failmalloc tests
parent
b0f76773
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
94 additions
and
216 deletions
+94
-216
configure.ac
configure.ac
+9
-0
tests/Makefile.am
tests/Makefile.am
+15
-7
tests/failmalloc_test.c
tests/failmalloc_test.c
+70
-209
No files found.
configure.ac
View file @
49b8ea1b
...
...
@@ -63,6 +63,11 @@ AC_ARG_ENABLE([examples],
[Build example programs])],
[request_examples=$enableval], [request_examples=yes])
AC_ARG_ENABLE([failmalloc],
[AS_HELP_STRING([--enable-failmalloc],
[Build failmalloc test program])],
[request_failmalloc=$enableval], [request_failmalloc=no])
AC_ARG_WITH([libxml2],
[AS_HELP_STRING([--without-libxml2],
[disable support for libxml2])],
...
...
@@ -241,6 +246,9 @@ fi
AM_CONDITIONAL([ENABLE_HDTEST], [ test "x${enable_hdtest}" = "xyes" ])
# failmalloc tests
AM_CONDITIONAL([ENABLE_FAILMALLOC], [ test "x${enable_failmalloc}" = "xyes" ])
# Checks for header files.
AC_CHECK_HEADERS([ \
arpa/inet.h \
...
...
@@ -344,4 +352,5 @@ AC_MSG_NOTICE([summary of build options:
Src: ${enable_src}
Examples: ${enable_examples}
Hdtest: ${enable_hdtest}
Failmalloc: ${request_failmalloc}
])
tests/Makefile.am
View file @
49b8ea1b
...
...
@@ -25,7 +25,10 @@ SUBDIRS = testdata
if
HAVE_CUNIT
check_PROGRAMS
=
main
# failmalloc
if
ENABLE_FAILMALLOC
check_PROGRAMS
+=
failmalloc
endif
# ENABLE_FAILMALLOC
OBJECTS
=
main.c nghttp2_pq_test.c nghttp2_map_test.c nghttp2_queue_test.c
\
nghttp2_buffer_test.c
\
...
...
@@ -49,17 +52,22 @@ main_SOURCES = $(HFILES) $(OBJECTS)
main_LDADD
=
${top_builddir}
/lib/libnghttp2.la
main_LDFLAGS
=
-static
@CUNIT_LIBS@ @TESTS_LIBS@
# failmalloc_SOURCES = failmalloc.c failmalloc_test.c failmalloc_test.h \
# malloc_wrapper.c malloc_wrapper.h \
# nghttp2_test_helper.c nghttp2_test_helper.h
# failmalloc_LDADD = $(main_LDADD)
# failmalloc_LDFLAGS = $(main_LDFLAGS)
if
ENABLE_FAILMALLOC
failmalloc_SOURCES
=
failmalloc.c failmalloc_test.c failmalloc_test.h
\
malloc_wrapper.c malloc_wrapper.h
\
nghttp2_test_helper.c nghttp2_test_helper.h
failmalloc_LDADD
=
$(main_LDADD)
failmalloc_LDFLAGS
=
$(main_LDFLAGS)
endif
# ENABLE_FAILMALLOC
AM_CFLAGS
=
-Wall
-I
${top_srcdir}
/lib
-I
${top_srcdir}
/lib/includes
-I
${top_builddir}
/lib/includes
\
@CUNIT_CFLAGS@ @DEFS@
TESTS
=
main
# failmalloc
if
ENABLE_FAILMALLOC
TESTS
+=
failmalloc
endif
# ENABLE_FAILMALLOC
if
ENABLE_SRC
...
...
tests/failmalloc_test.c
View file @
49b8ea1b
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment