Commit graph

1307 commits

Author SHA1 Message Date
Paul Bakker ec5ceb65d6 Test invalid bit value in mbedtls_mpi_set_bit() 2016-08-25 15:42:28 +01:00
Paul Bakker c7d6bd4b5f Add mbedtls_asn1_write_len() support for 3 and 4 byte lengths
As a consequence also adds coverage for reading 3 and 4 byte lengths
(which were not covered before)
2016-08-25 15:42:27 +01:00
Paul Bakker 5e8b77cd8c Test result of mbedtls_asn1_write_len() through mbedtls_asn1_get_len() 2016-08-25 15:42:27 +01:00
Paul Bakker 58bfb83bb0 Add buffer length tests for mbedtls_asn1_write_len() 2016-08-25 15:42:27 +01:00
Paul Bakker e325db9055 Add explicit test coverage for mbedtls_asn1_write_len() 2016-08-25 15:42:27 +01:00
Paul Bakker 97c53c2867 Add coverage testing of mbedtls_md_clone() (and wraps)
+13 functions, +57 lines
2016-08-25 15:42:27 +01:00
Paul Bakker e35afa28f7 Update *_multi tests in test_suite_md to do more than 1 step 2016-08-25 15:42:27 +01:00
Simon Butcher 4df5eaf2b0 Fixes build configuration for armcc test build in all.sh
In the test script tests/scripts/all.sh the armcc build is a baremetal build
and doesn't use MBEDTLS_HAVE_TIME therefore the test configuration
MBEDTLS_PLATFORM_TIME_ALT which is dependent on it must be unset.
2016-08-24 22:58:31 +03:00
Simon Butcher a4ed19c7c0 Fixes test script all.sh to output errors from armcc
The test script tests/scripts/all.sh exits on first error, although it also
attempted to redirect error output from armcc and then output it after armcc
had completed. This never occurred because as soon as armcc failed the script
would end and the redirected output wouldn't be displayed.

This change removes that redirection.
2016-08-24 22:37:43 +03:00
Janos Follath b72c67804a Add script to print build environment info. (#539)
* Add script to print build environment info.

The new script is also included in:
- all.sh
- basic-build-test.sh

* Tidy up environment reporting script.

Changes include:
- making the echo calls portable
- removing unnecessary brackets
- using more efficient checks for the existance of commands
- correcting typos and copyright year

* Update references to output_env.sh
2016-07-19 14:54:17 +01:00
Simon Butcher b92834324f Fixes all.sh for full config
MBEDTLS_PLATFORM_TIME_ALT was accidentally left in the full config test
leading to linker problems.
2016-07-13 14:47:07 +01:00
Simon Butcher 905cef6c2c Changed library version number to 2.3.0 2016-06-27 19:36:45 +01:00
Simon Butcher 1c71965d46 Fixes armcc builds in all.sh
MBEDTLS_NV_SEED needs to be disabled in builds without filesystem IO.
2016-06-27 19:02:12 +01:00
Simon Butcher eebf1b9380 Various fixes for NV SEED feature in all.sh 2016-06-27 01:42:39 +01:00
Simon Butcher 284b4c9927 Fixes all.sh script for filesystem IO test build
MBEDTLS_ENTROPY_NV_SEED is dependent on platform code unless an
alternative implementation is provided,  therefore needs to be disabled
in the disabled filesystem IO build.
2016-06-26 15:44:34 +01:00
Simon Butcher ab069c6b46 Merge branch 'development' into development-restricted 2016-06-23 21:42:26 +01:00
Simon Butcher 71ebc58932 Changes to check-names.sh script to accept yotta constants 2016-06-23 20:02:07 +01:00
Simon Butcher 02c4a38013 Corrects missing dependency for MBEDTLS_CIPHER_MODE_CBC in some tests 2016-06-23 02:41:31 +01:00
Janos Follath 15ab7ed0f3 Merge branch 'development' into development-restricted
Conflicts:
	programs/pkey/rsa_decrypt.c
	programs/pkey/rsa_encrypt.c
	programs/test/selftest.c
2016-06-14 09:20:46 +01:00
Simon Butcher ab5df40054 Rename the 'no entropy' feature to MBEDTLS_TEST_NULL_ENTROPY
Following review and for clarity, changed the name of the feature to 'null
entropy'.
2016-06-11 02:31:21 +01:00
Paul Bakker bd43f6c009 Fix dependency on MBEDTLS_ENTROPY_SHA512_ACCUMULATOR in test suite 2016-06-10 19:42:15 +01:00
Paul Bakker 5a0392a5c0 Fix dependency guard for test 2016-06-10 19:42:15 +01:00
Paul Bakker b3dc822846 Properly gate NV_SEED additions in test suite 2016-06-10 19:42:15 +01:00
Paul Bakker 1779026037 Add test cases for NV seed functionality
A standard 'test' that writes a seed file is added so that regular tests
still can succeed. This is in lieu of a 'SUITE_PRE_CODE' kind of
arrangement where a suite can run code before (and after) all other code
runs.

A test is added that checks if we can read and write the standard NV
seed file

A test is added that actually checks if the entropy and seed file values
that are the result of just using the NV seed are the same as the manual
calculation.
2016-06-10 19:42:15 +01:00
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