Janos Follath
d2e7ff746d
Fix test message for entropy safety switch.
2016-06-09 14:12:02 +01:00
Janos Follath
06c54000f3
Add test for the entropy safety switch feature.
2016-06-09 13:57:40 +01:00
Janos Follath
c4191e475b
Make basic-build-test.sh clean up after itself.
2016-06-07 14:52:35 +01:00
Janos Follath
04b591ee79
Merge branch 'development' for weekly test report.
2016-05-31 10:18:41 +01:00
Simon Butcher
9c22e7311c
Merge branch 'development'
2016-05-24 13:25:46 +01:00
Simon Butcher
65b1fa6b07
Fixes warnings found by Clang static analyser
...
Also removes annotations in the code to avoid warnings which don't appear to
be needed.
2016-05-23 23:18:26 +01:00
Simon Butcher
3c0d7b8bdc
Adds check for valgrind to ssl-opt.sh ( #488 )
...
Provides graceful exit rather than fail silently if valgrind isn't installed.
2016-05-23 14:29:33 +01:00
Simon Butcher
58eddef8b2
Updates copyright and attribution in comment header in ssl-opt.sh
2016-05-23 14:29:32 +01:00
Simon Butcher
cbb9075c54
Adds parallel builds to basic-build-test.sh
...
To speed up test time, added parallel builds
2016-05-23 14:29:32 +01:00
Simon Butcher
a410af537a
Fixes RC4 config dependencies in tests in ssl-opt.h
...
Adds dependencies on MBEDTLS_REMOVE_ARC4_CIPHERSUITES for tests that
require RC4 to be disabled (the default config).
2016-05-23 14:29:32 +01:00
Paul Bakker
362689d5a7
Split test into valgrind and no-valgrind version
...
Running valgrind on: "DTLS client reconnect from same port: reconnect,
nbio" results in timeouts.
New version added that runs only under valgrind. Original only runs when
valgrind is not used
2016-05-23 14:29:32 +01:00
Paul Bakker
1f65092d28
Add fix to ignore valgrind messages related to compressed debug symbols
...
The glibc package recently enabled compressed debug symbols but valgrind doesn't
support them yet.
Results in messages like:
--14923-- WARNING: Serious error when reading debug info
--14923-- When reading debug info from /lib/x86_64-linux-gnu/ld-2.21.so:
--14923-- Ignoring non-Dwarf2/3/4 block in .debug_info
First line has 'error' in it which triggers some of the ssl-opt tests
2016-05-23 14:29:32 +01:00
Paul Bakker
774180e14e
Fix memory-leak in verbose test framework in case of unexpected input
2016-05-23 14:29:31 +01:00
Paul Bakker
26b60bf7d1
Fox verbose test framework not to duplicate strings if not verbose
2016-05-23 14:29:31 +01:00
Paul Bakker
a30a72f80f
Fix verbose test framework mote to use unmet_dep_count for index
2016-05-23 14:29:31 +01:00
Simon Butcher
ae79124905
Disables backtrace config from basic-build-test.sh
...
The configuration MBEDTLS_MEMORY_BACKTRACE is intended for debug and
is not necessary for test coverage. Because it causes timing problems
in some tests the configuration has been removed as it's not present in
equivalent tests in the all.sh test script.
2016-05-23 14:29:30 +01:00
Simon Butcher
a557cfb9ad
Widens test bounds on memory alloc tests
2016-05-23 14:29:30 +01:00
Paul Bakker
acaac8510e
Add option to preserve all logs in ssl-opt.sh
...
Useful to also allow saving of correct logs in order to compare
differences with failed logs
2016-05-23 14:29:30 +01:00
Paul Bakker
e20310a9fc
Add option to print test numbers in ssl-opt.sh output
...
Allows for easy selection of tests based on numbers for use with the
'-n' option
2016-05-23 14:29:30 +01:00
Paul Bakker
b7584a5e37
Add ability to only run select numbered tests in ssl-opt.sh
...
In order to reduce debugging time, allows you to only run interesting
tests (by number) from the commandline.
e.g. the command 'tests/ssl-opt.sh -n 246,258' will only run test 246
and 258 (as per the number in the log file names)
2016-05-23 14:29:30 +01:00
Simon Butcher
4ec1e8193e
Widens test parameters in memory alloc tests
2016-05-23 14:29:30 +01:00
SimonB
214f5c0af2
Additional tests to test stack buffer allocator
...
Adds additional tests to the test suite for
memory_buffer_alloc.c
2016-05-23 14:29:29 +01:00
SimonB
4a3b023172
Adds line numbering in errors for test helpers
...
Adds to the 'generate_code.pl' tool, support to insert line numbers
before test suite helper code.
2016-05-23 14:29:29 +01:00
SimonB
20273ddc4c
Adds reporting of file/line no. in failed tests
...
Tests in tests/suites will now report the file and line number of
failed test assertions.
2016-05-23 14:29:29 +01:00
SimonB
525b792823
Fixes off by 1 error reported in line number errors
2016-05-23 14:29:29 +01:00
SimonB
ab07135165
Adds line number substitution in test cases
...
Expanded generate_code.pl to substitute !LINE_NO! in test cases.
2016-05-23 14:29:29 +01:00
Nicholas Wilson
b19bac4d82
Allow test suites to be run on Windows
...
For a start, they don't even compile with Visual Studio due to strcasecmp
being missing. Secondly, on Windows Perl scripts aren't executable and have
to be run using the Perl interpreter directly; thankfully CMake is able to
find cygwin Perl straight away without problems.
2016-05-23 14:29:28 +01:00
Simon Butcher
94bafdf834
Merge branch 'development'
2016-05-18 18:40:46 +01:00
Simon Butcher
edb7fd9d76
Fixes stdlib.h dependencies in test suites
...
Moved stdlib.h in test suites, so platforms that don't support
MBEDTLS_PLATFORM_C would build.
2016-05-17 13:35:51 +01:00
Simon Butcher
c21bec8af4
Merge branch 'development'
2016-05-16 16:15:20 +01:00
Paul Bakker
b8c8018343
Split test into valgrind and no-valgrind version
...
Running valgrind on: "DTLS client reconnect from same port: reconnect,
nbio" results in timeouts.
New version added that runs only under valgrind. Original only runs when
valgrind is not used
2016-05-13 10:33:25 +01:00
Paul Bakker
629c1ad398
Add fix to ignore valgrind messages related to compressed debug symbols
...
The glibc package recently enabled compressed debug symbols but valgrind doesn't
support them yet.
Results in messages like:
--14923-- WARNING: Serious error when reading debug info
--14923-- When reading debug info from /lib/x86_64-linux-gnu/ld-2.21.so:
--14923-- Ignoring non-Dwarf2/3/4 block in .debug_info
First line has 'error' in it which triggers some of the ssl-opt tests
2016-05-13 10:30:46 +01:00
Paul Bakker
53f01199e2
Fix memory-leak in verbose test framework in case of unexpected input
2016-05-12 15:59:48 +01:00
Paul Bakker
2a259c63e3
Fox verbose test framework not to duplicate strings if not verbose
2016-05-12 15:55:37 +01:00
Paul Bakker
6e51915187
Fix verbose test framework mote to use unmet_dep_count for index
2016-05-12 15:52:48 +01:00
Paul Bakker
324258fdc8
Merge pull request #353 from NWilson/win-tests
...
Allow test suites to be run on Windows
2016-05-11 20:09:13 +02:00
Simon Butcher
bc4d9c1faa
Disables backtrace config from basic-build-test.sh
...
The configuration MBEDTLS_MEMORY_BACKTRACE is intended for debug and
is not necessary for test coverage. Because it causes timing problems
in some tests the configuration has been removed as it's not present in
equivalent tests in the all.sh test script.
2016-05-10 21:20:32 +01:00
Simon Butcher
699d7193a1
Disables backtrace config from basic-build-test.sh
...
The configuration MBEDTLS_MEMORY_BACKTRACE is intended for debug and
is not necessary for test coverage. Because it causes timing problems
in some tests the configuration has been removed as it's not present in
equivalent tests in the all.sh test script.
2016-05-10 21:16:54 +01:00
Simon Butcher
938f65c452
Merge 'development' into development
2016-05-10 20:58:54 +01:00
Simon Butcher
e9f25c8a60
Widens test bounds on memory alloc tests
2016-05-10 20:57:03 +01:00
Janos Follath
00efff7469
Add a test for SSLv3 with extensions, server side
...
This test verifies if the server parses or sends extensions when
the protocol is SSLv3.
2016-05-06 13:57:19 +01:00
Simon Butcher
d96924de9c
Widens test parameters in memory alloc tests
2016-05-06 00:22:18 +01:00
SimonB
a0ed709f05
Additional tests to test stack buffer allocator
...
Adds additional tests to the test suite for
memory_buffer_alloc.c
2016-05-05 14:25:03 +01:00
SimonB
37f2620db6
Adds line numbering in errors for test helpers
...
Adds to the 'generate_code.pl' tool, support to insert line numbers
before test suite helper code.
2016-05-05 14:25:03 +01:00
SimonB
31a6c49139
Adds reporting of file/line no. in failed tests
...
Tests in tests/suites will now report the file and line number of
failed test assertions.
2016-05-05 14:25:03 +01:00
SimonB
43dba3d94e
Fixes off by 1 error reported in line number errors
2016-05-05 14:25:03 +01:00
SimonB
c1d2eb3fd6
Adds line number substitution in test cases
...
Expanded generate_code.pl to substitute !LINE_NO! in test cases.
2016-05-05 14:25:03 +01:00
Simon Butcher
e4a46f696f
Merge branch 'development'
2016-04-27 18:44:37 +01:00
Simon Butcher
b2d5dd105d
Fixes X509 sample app and SSL test suite
...
Fixes the X.509 cert_app and the SSL test suite for the non-default
configs which don't build with if MBEDTLS_PLATFORM_C isn't defined.
2016-04-27 13:35:37 +01:00
SimonB
1594210a49
Adds better support to debug generated code
...
The commit adds to the generate_code.pl script support to add #line directives
to generated code to allow build breaks to be more easily found from the
generated code.
2016-04-26 14:46:56 +01:00
Janos Follath
35d48cb338
Fix missing cleanup in all.sh
2016-04-22 14:45:00 +01:00
Simon Butcher
956420d6e6
Merge branch 'development'
2016-04-19 19:29:09 +01:00
Janos Follath
55abc21521
Fix ci break in builds without platform.h
2016-04-19 15:15:53 +01:00
Simon Butcher
2300776816
Merge branch 'development'
2016-04-19 10:39:36 +01:00
Janos Follath
f5e254a9ff
Remove unused code from PKCS1v15 test suite
2016-04-18 10:00:55 +01:00
SimonB
8ca7bc42d0
Adds verbose mode to the test suites
...
Added a verbose option to the generated test suites which can list the
dependencies not met for skipped test cases.
Also clarifies internal interfaces between the main_test.function and test code,
and fixed a bug on calculating available tests in run-test-suites.pl.
2016-04-17 23:24:50 +01:00
SimonB
098a3b5025
Makes basic-build-test.sh test the full config
...
Previously the test worked on the default configuration which missed deprecated
or legacy features. This change tests the full configuration and all available
tests.
2016-04-16 21:56:59 +01:00
SimonB
2e23c82753
Adds check to avoid overwriting files
...
Adds check to avoid accidental overwriting of config.h or the yotta module, as
well as a force option to override any changes.
2016-04-16 21:54:39 +01:00
Simon Butcher
3f5c875654
Adds test for odd bit length RSA key size
...
Also tidy up ChangeLog following review.
2016-04-15 19:06:59 +01:00
Simon Butcher
0914ac47d2
Add missing config dependencies to PKCS1 V15 tests
2016-04-13 14:49:25 +01:00
Simon Butcher
f8758b8bdc
Adds test_suite_pkcs1_v15 to tests/Makefile
2016-04-12 11:31:00 +01:00
Janos Follath
e6aef9fa70
Add tests to cover PKCS1 v1.5 signature functions.
...
The reported memory leak should have been spotted by
make memcheck
But it wasn't. Keeping the tests for better coverage.
2016-04-11 23:32:26 +01:00
Simon Butcher
58ec0a6af3
Merge branch 'development-restricted'
2016-04-10 15:43:15 +01:00
Simon Butcher
1cabdd573d
Merge branch 'development'
2016-04-10 15:41:58 +01:00
Simon Butcher
6eaf3659ea
Fixes Travis post-mortem script dump following review
...
Changes made:
* Added copyright and project statement
* Limited size of each file to dump to 1Mbyte
* Changed name of script
2016-04-10 15:11:27 +01:00
Simon Butcher
371a9e0ae9
Merge branch 'iotssl-683-travis-failing-intermittently'
2016-04-10 14:24:31 +01:00
Simon Butcher
bbe2ee9bf3
Resolves conflicts in basic-build-test.sh
2016-04-05 14:09:12 +01:00
Simon Butcher
d9106f3538
Makes basic-build-test.sh tests more consistent
...
This contains two fixes:
* CFLAGS symbol wasn't being exported so wasn't being used in the build
* Absence of a clean build meant the build could be made with existing
object code that may not have code coverage instrumentation
2016-04-05 13:59:00 +01:00
Janos Follath
4c5dccf419
Fix the broken pkcs1 v1.5 test.
...
The random buffer handed over to the test function was too small
and the remaining bytes were generated by the default (platform
dependant) function.
2016-03-30 00:53:44 +01:00
Simon Butcher
b14de92404
Merge branch 'development'
2016-03-30 00:46:41 +01:00
Simon Butcher
c2b0efcebe
Fix the basic test build script to always build
...
The test script, 'basic-build-test.sh', wasn't consistently building with
symbols and coverage data, nor doing a forced rebuild.
2016-03-21 22:40:13 +00:00
Janos Follath
831a65ffa7
Make Travis more chatty.
...
Include the logs in the report after failing.
2016-03-21 14:52:25 +00:00
Simon Butcher
184990c1d4
Merge development into development-restricted
2016-03-16 13:56:00 +00:00
Simon Butcher
f1547632dc
Fixes to style following review
...
Made code spacing consistent with guidelines, and corrected the misnamed test
steps in basic-build-test.sh
2016-03-14 23:12:32 +00:00
Simon Butcher
ab0c51d782
Fix minor issues with basic test script
...
Following fixes:
* In the test script, 'basic-build-test.sh', the total number of functions had
a broken RE, and was picking up the number of tested functions.
* Titles of tests was misleading
* The 'run-test-suites.pl' script was mistaking dSYM directories as test
suites to be executed.
2016-03-14 23:12:31 +00:00
SimonB
21ab9d7b8b
Add a script to execute the basic tests
...
basic-build-test.sh executes the most obvious and common test suites and creates
a test report including coverage data.
2016-03-14 23:12:30 +00:00
SimonB
75f3caa408
Fix unit test script to ignore coverage data
...
The script run-test-suite.pl was mistaking .gcda code coverage data files as
test suites. The files are now ignored.
2016-03-14 23:12:30 +00:00
SimonB
ad8fbc066c
Add test result breakdown to test suites script
...
Added a --verbose switch to 'run-test-suite.pl' to summarise the pass/fail/skip
results of each test suite, and summary for all executed tests.
2016-03-14 23:12:30 +00:00
Simon Butcher
f413b6fffe
Fix to stop all.sh corrupting config.h
...
The test script all.sh was persisting the SSL3 configuration in config.h
through more tests than intended and not restoring the config the end.
2016-03-14 22:32:42 +00:00
Simon Butcher
4b852db299
Merge branch 'iotssl-629-der-trailing-bytes'
...
Fixes bug in mbedtls_x509_crt_parse that caused trailing extra data in the
buffer following DER certificates to be included in the raw representation.
2016-03-12 23:28:26 +00:00
Janos Follath
8a49a019b0
Add tests for the bug IOTSSL-619.
...
The main goal with these tests is to test the bug in question and
they are not meant to test the entire PKCS#1 v1.5 behaviour. To
achieve full test coverage, further test cases are needed.
2016-03-09 21:06:19 +00:00
Simon Butcher
3ea7f52fdf
Update interop tests to default configuration
...
Removed SSLv3 from the default tests in compat.sh, and adapted the test
cases in all.sh to include an additional SSLv3 regression test suite.
2016-03-09 19:32:11 +00:00
Simon Butcher
bc6a486b2f
Fix the 'all tests' script for baremetal builds
...
Fixes the test script test/scripts/all.sh which was failing at the
baremetal ARM builds due to the entropy platform check introduced in
7ff4b77
.
2016-03-09 19:32:11 +00:00
Janos Follath
e2681a448b
Update default configuration
...
Change the default settings for SSL and modify the tests accordingly.
2016-03-09 19:32:11 +00:00
Simon Butcher
3000f78b0b
Add copright, and better documentation to curves.pl
...
The purpose and use of the test script, curves.pl was not obvious without
reading the source code, plus the file was missing a copyright statement.
2016-03-09 19:32:11 +00:00
Simon Butcher
fbe85fe4fa
Add missing dependencies to X509 Parse test suite for P-384 curve
...
The test script curves.pl was failing on testing dependencies for the P-384
curve on the new test cases introduced by ede75f0
and 884b4fc
.
2016-03-09 19:32:10 +00:00
Simon Butcher
f59e66ba24
Remove redundant test certificates and clarify ChangeLog
2016-03-09 19:32:10 +00:00
Janos Follath
df4bca2029
X509: Future CA among trusted: add more tests
2016-03-09 19:32:10 +00:00
Janos Follath
12c868c5d6
X509: Future CA among trusted: add unit tests
2016-03-09 19:32:10 +00:00
Simon Butcher
64d60da4f6
Fix typos and add copyright statement to generate_code.pl
2016-03-09 19:32:10 +00:00
SimonB
0269dad5e5
Refactored test suite template code
...
Restructed test suite helper and main code to support tests suite helper
functions, changed C++ comments to C-style, and made the generated
source code more navigable.
2016-03-09 19:32:10 +00:00
SimonB
152ea18037
Added support for per test suite helper functions
...
Added to generate_code.pl:
- support for per test suite helper functions
- description of the structure of the files the script uses to construct
the test suite file
- delimiters through the source code to make the machine generated code
easier to understand
2016-03-09 19:32:10 +00:00
SimonB
3ddf35526a
Clarified purpose and usage of generate_code.pl
...
Added comments to explain purpose and usage of generate_code.pl
2016-03-09 19:32:09 +00:00
Simon Butcher
ef50c0da6e
Added script to split the test case data files
...
Script generate-afl-tests.sh will split the test suite data files into
individual test case files, suitable for fuzzing.
2016-03-09 19:32:09 +00:00
Simon Butcher
aad787f1c7
Parameterised the test suite applications
...
All test suites can now take an arbitrary test file.
2016-03-09 19:32:09 +00:00
Janos Follath
e154f95e03
x509: trailing bytes in DER: correct a unit test
...
One of the unit test was failing, because it was testing behavior
that was part of the bug. Updated the return value to the correct one
2016-02-17 14:24:28 +00:00
Janos Follath
0b2423403c
x509: trailing bytes in DER: add integration tests
2016-02-17 10:11:21 +00:00
Simon Butcher
9a3ee57c84
Merge branch 'fixes' into development
2016-01-13 02:08:02 +00:00
Manuel Pégourié-Gonnard
d091ed1911
Add scripts/apidoc_full.sh
...
This re-introduces the apidoc with full config.h, but hopefully with the race
conditions and other issues that the previous implementation had.
Adapt doxygen test script to use that new script, and also check for errors
in addition to warnings while at it.
2016-01-12 14:48:03 +00:00
Manuel Pégourié-Gonnard
de7ae7b2e9
Exclude some warnings from the doxygen test
...
Apparently travis has an old version of doxygen that doesn't know all tags in
our config. That's not something we care about, we only want to know about
warnings in our doxygen content
2016-01-08 17:01:59 +01:00