Commit graph

311 commits

Author SHA1 Message Date
Gilles Peskine
ed942f84e6 MBEDTLS_NO_INT64_DIVISION -> MBEDTLS_NO_UDBL_DIVISION
Changed the option to disable the use of 64-bit division, to an option
to disable the use of double-width division, whether that's 64 or 128-bit.
2017-07-27 15:08:01 +01:00
Andres Amaya Garcia
84e6ce899f Add all.sh test to force 32-bit compilation 2017-07-27 15:08:01 +01:00
Simon Butcher
51aaa99473 Fixes test for MBEDTLS_NO_UDBL_DIVISION
The test for MBEDTLS_NO_UDBL_DIVISION wasn't preserving it's own config.h
for the next test.

Also added comments to ARM Compiler 6 tests to better explain them.
2017-07-23 13:42:36 +02:00
Andres Amaya Garcia
c327aa1542 Remove MBEDTLS_TYPE_UDBL tests from all.sh 2017-07-22 11:53:56 +02:00
Andres Amaya Garcia
6fb65864a2 Fix no 64-bit division test in all.sh 2017-07-22 11:53:56 +02:00
Andres Amaya Garcia
33264d7a96 Add tests for 64 and 32-bit int types compilation 2017-07-22 11:53:56 +02:00
Gilles Peskine
9a9adcd6aa MBEDTLS_NO_INT64_DIVISION -> MBEDTLS_NO_UDBL_DIVISION
Changed the option to disable the use of 64-bit division, to an option
to disable the use of double-width division, whether that's 64 or 128-bit.
2017-07-22 11:53:56 +02:00
Andres Amaya Garcia
dd29c2f2c3 Add all.sh test to force 32-bit compilation 2017-07-22 11:53:56 +02:00
Hanno Becker
83ebf78404 Add test for AES_ROM_TABLES and AES_FEWER_TABLES to all.sh 2017-07-07 12:29:15 +01:00
Gilles Peskine
2a458daa11 all.sh: test with SHA-1 enabled
Enabling SHA-1 for certificates is deprecated but we still want it to work.

Thanks to @andresag01
2017-06-06 18:44:14 +02:00
Andres AG
9839360a10 Fix all.sh check_tools function to handle paths 2017-01-31 17:04:45 +00:00
Simon Butcher
cb587009d6 Fix all.sh test builds with recent glibc and clang
Fixes strict C99 builds in all.sh with glibc version >2.19 where platform support
wasn't being compiled in automatically.

Also fixes C99 syntax with armclang.
2017-01-06 16:14:44 +00:00
Simon Butcher
105e856143 Merge branch 'gcc-compiler-warnings' 2017-01-05 18:26:40 +00:00
Simon Butcher
49f00bd81d Clarify use of armcc in all.sh 2017-01-05 16:20:56 +00:00
Andres AG
a5cd973047 Add -march argument to armc6 build tests 2017-01-05 10:15:00 +00:00
Andres AG
31f9b5bdd8 Modify output_env.sh to make it extensible 2017-01-05 10:14:51 +00:00
Andres AG
87bb577cfb Add ARM Compiler 6 build tests to all.sh 2017-01-03 10:12:11 +00:00
Simon Butcher
710dd4fdd6 Merge branch 'speedup_tests'
Pull Request #533 - Use MAKEFLAGS to pass args to make in all.sh

Modify the script at tests/scripts/all.sh to export the variable
MAKEFLAGS with -j if it was not set before. This should decrease the
total runtime of tests/scripts/all.sh by letting make run multiple jobs
in parallel. Also, add a check at the top of the script to cause a
failure if the environment is not Linux.w
2016-12-30 19:09:40 +00:00
Simon Butcher
002bc6262b Make mingw test build a requirement of all.sh
Changed the mingw test build to be a required test of the all.sh script.
2016-11-17 09:27:45 +00:00
Simon Butcher
91aef33832 Fix mingw test build to avoid executing the tests
Changed the mingw build target to avoid building mingw test suites and
then attempting to run them which was failing on Linux.
2016-11-17 09:22:47 +00:00
Simon Butcher
f95c1764fa Make the test builds much stricter for warnings
Tighten up the test options in all.sh, test-ref-configs.pl and curves.pl
to ensure the builds are strict for all warnings, warnings are treated
as errors, and that wherever possible builds are strict to the C99
standard. (Note that builds that use the Unix sockets API cannot be).
2016-11-17 09:22:46 +00:00
Andres AG
7770ea82d5 Add seed cmdline arg to test scripts 2016-10-12 00:32:17 +01:00
Andres AG
b2fdd04f6a Fix scripts to support multiple openssl and gnutls 2016-09-27 16:04:44 +01:00
Andres AG
788aa4a812 Rename net.{c,h} to net_sockets.{c,h}
The library/net.c and its corresponding include/mbedtls/net.h file are
renamed to library/net_sockets.c and include/mbedtls/net_sockets.h
respectively. This is to avoid naming collisions in projects which also
have files with the common name 'net'.
2016-09-26 23:23:52 +01:00
Andres AG
38495a3824 Use MAKEFLAGS to pass args to make in all.sh
Modify the script at tests/scripts/all.sh to export the variable
MAKEFLAGS with -j if it was not set before. This should decrease the
total runtime of tests/scripts/all.sh by letting make run multiple jobs
in parallel. Also, add a check at the top of the script to cause a
failure if the environment is not Linux.
2016-09-22 17:01:13 +01:00
Simon Butcher
41eeccf76b Fix merge of OpenSSL/GNUTLS version options in all.sh 2016-09-15 20:45:53 +01:00
Andres AG
f07314e787 Allow cmake 'out-of-source' builds
Allow mbed TLS to be build in a subdirectory. Also add a test in
all.sh
2016-09-15 20:45:53 +01:00
Andres AG
d9eba4ba3d Allow alternate openssl and gnutls in all.sh
Allow the user to specify alternative openssl, gnutls-cli and
gnutls-serv binaries to execute legacy tests in all.sh.
2016-09-15 20:45:53 +01:00
Simon Butcher
8e3afc7332 Removes duplicated selftests from all.sh
All selftests are now called from the test suites so don't need to be executed
explicitly in tests/scripts/all.sh
2016-09-15 17:13:08 +01:00
Andres AG
dc192215f4 Allow cmake 'out-of-source' builds
Allow mbed TLS to be build in a subdirectory. Also add a test in
all.sh
2016-09-06 20:38:40 +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
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
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
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
35d48cb338 Fix missing cleanup in all.sh 2016-04-22 14:45:00 +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
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
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
Simon Butcher
9a3ee57c84 Merge branch 'fixes' into development 2016-01-13 02:08:02 +00:00
Manuel Pégourié-Gonnard
259b08a5d2 Add -s (short) option to all.sh
On my machine, that reduces running time from about 30 minutes to less than 10
minutes, while maintaining a good probability of catching the most likely
issues in practice.
2016-01-08 16:49:17 +01:00
Manuel Pégourié-Gonnard
1d552e7583 Add test script for doxygen warnings 2016-01-08 16:49:17 +01:00
Manuel Pégourié-Gonnard
3551901cd1 Make ar invocation more portable
armar doesn't understand the syntax without dash. OTOH, the syntax with dash
is the only one specified by POSIX, and it's accepted by GNU ar, BSD ar (as
bundled with OS X) and armar, so it looks like the most portable syntax.

fixes #386
2016-01-07 13:55:05 +01:00
Manuel Pégourié-Gonnard
503a5efef1 Add key-exchanges.pl to test list 2015-10-23 09:04:45 +02:00
Manuel Pégourié-Gonnard
e33316c607 Add test build of shared libs for windows 2015-08-07 13:22:37 +02:00
Manuel Pégourié-Gonnard
77d56bb6c2 Add yotta test builds to all.sh 2015-08-06 09:57:53 +02:00
Manuel Pégourié-Gonnard
9afdc83d77 Fix bashisms in test scripts 2015-08-04 17:15:13 +02:00
Manuel Pégourié-Gonnard
3d404b4763 Simplify some scripts
ssl-opt.sh and compat.sh can now be run from root too
2015-07-08 21:59:16 +01:00
Manuel Pégourié-Gonnard
6dc2651f02 Cosmetics 2015-06-25 10:59:57 +02:00
Manuel Pégourié-Gonnard
9b06abe1d1 Add a shared build with make on Linux to all.sh 2015-06-25 10:59:57 +02:00
Manuel Pégourié-Gonnard
e058ea2ed8 More consistent toolchains in all.sh 2015-06-25 10:59:57 +02:00
Manuel Pégourié-Gonnard
52fa38a214 Better cleanup in all.sh 2015-06-23 18:44:10 +02:00
Manuel Pégourié-Gonnard
bcf13bab5d Fix issue with MemSan and entropy
Due to the recent change about entropy sources strength, it is no longer
acceptable to just disable the platform source. So, instead "fix" it so that
it is clear to MemSan that memory is initialized.

I tried __attribute__((no_sanitize_memory)) and MemSan's blacklist file, but
couldn't seem to get them to work.
2015-06-22 18:25:41 +02:00
Manuel Pégourié-Gonnard
bbc60db221 Adjustments for armcc in all.sh
- no HAVE_TIME -> no HAVE_TIME_DATE
- check if --help works, so that the test is cleanly skipped if license server
  cannot be reached
2015-06-22 14:41:37 +02:00
Manuel Pégourié-Gonnard
3d4755bec4 Merge branch 'mbedtls-1.3' into development
* mbedtls-1.3:
  Fix all.sh for recent config.pl change

Conflicts:
	tests/scripts/all.sh
2015-06-03 14:03:17 +01:00
Manuel Pégourié-Gonnard
721e6bbf71 Fix all.sh for recent config.pl change 2015-06-03 13:38:20 +01:00
Manuel Pégourié-Gonnard
7ee5ddd798 Merge branch 'mbedtls-1.3' into development
* mbedtls-1.3:
  Fix compile errors with NO_STD_FUNCTIONS
  Expand config.pl's notion of "full"
  Ack external bugfix in Changelog
  FIx misplaced Changelog entry (oops)
  Fix compile bug: incompatible declaration of polarssl_exit in platform.c
  Fix contributor's name in Changelog
2015-06-03 10:33:55 +01:00
Manuel Pégourié-Gonnard
dccb80b7e5 Fix compile errors with NO_STD_FUNCTIONS 2015-06-03 10:20:33 +01:00
Manuel Pégourié-Gonnard
718593681e Use -std=c99 only for library 2015-06-02 16:39:22 +01:00
Manuel Pégourié-Gonnard
f78e4de6f4 Fix warnings from -pedantic 2015-05-29 10:52:14 +02:00
Manuel Pégourié-Gonnard
009a2640f6 Add test build with -std=c99 2015-05-29 10:31:13 +02:00
Manuel Pégourié-Gonnard
66b8e956bb Add test build with all except ssl_cli/srv.c 2015-05-20 11:14:58 +02:00
Manuel Pégourié-Gonnard
5a8d56d3a3 Rm hard dependency of DTLS on TIMING_C 2015-05-13 10:10:00 +02:00
Manuel Pégourié-Gonnard
d09a6b53b5 Move test scripts to tests/scripts 2015-04-10 11:34:22 +02:00
Manuel Pégourié-Gonnard
a687baf195 Add check-names.sh to all.sh 2015-04-09 13:52:55 +02:00
Manuel Pégourié-Gonnard
2cf5a7c98e The Great Renaming
A simple execution of tmp/invoke-rename.pl
2015-04-08 13:25:31 +02:00
Manuel Pégourié-Gonnard
8a89fcd13f Rm references to removed config options
POLARSSL_MEMORY_C POLARSSL_PBKDF2_C DISABLE_RENEGO
2015-04-03 18:46:55 +02:00
Manuel Pégourié-Gonnard
ba2e72c007 Merge branch 'mbedtls-1.3' into development
* mbedtls-1.3:
  Fix issue with armcc test in all.sh
2015-03-25 18:09:21 +01:00
Manuel Pégourié-Gonnard
f1002f8582 Fix issue with armcc test in all.sh 2015-03-25 17:09:16 +01:00
Manuel Pégourié-Gonnard
ea0920f079 Adjust test scripts to new RC4 defaults 2015-03-24 10:14:23 +01:00
Manuel Pégourié-Gonnard
29c28f961d Merge branch 'mbedtls-1.3' into development
* mbedtls-1.3:
  Fix gcc detection in check_config.h
2015-03-23 15:27:25 +01:00
Manuel Pégourié-Gonnard
757ca00396 Fix gcc detection in check_config.h 2015-03-23 15:24:07 +01:00
Manuel Pégourié-Gonnard
b295e4fdc4 Fix duplication in all.sh 2015-03-19 13:40:37 +00:00
Manuel Pégourié-Gonnard
cc0d084820 Merge branch 'mbedtls-1.3' into development
* mbedtls-1.3:
  Actually use armcc for the armcc test ^^'
  Add more -O level variety in all.sh
  Document recent make changes
  build: Makefile: cleanup CFLAGS
  build: Makefile: cleanup LDFLAGS
  build: Makefile: simplify root Makefile
  build: Makefile: remove bashism

Conflicts:
	programs/Makefile
2015-03-13 16:32:40 +00:00
Manuel Pégourié-Gonnard
129e41322b Actually use armcc for the armcc test ^^' 2015-03-13 17:29:18 +01:00
Manuel Pégourié-Gonnard
61fe8b0290 Add more -O level variety in all.sh 2015-03-13 14:33:16 +00:00
Manuel Pégourié-Gonnard
7f8099773e Rename include directory to mbedtls 2015-03-10 11:23:56 +00:00
Manuel Pégourié-Gonnard
b251a20a7e Merge branch 'development' into dtls
* development:
  Fix missing/misplaced #include's
2015-02-17 15:48:15 +00:00
Manuel Pégourié-Gonnard
981732bb8e Fix missing/misplaced #include's 2015-02-17 15:47:31 +00:00
Manuel Pégourié-Gonnard
01bb5f9a00 Update dependencies in all.sh 2015-02-17 09:36:15 +00:00
Manuel Pégourié-Gonnard
6448bceeb6 Add mingw cross-compile test to all.sh 2015-02-16 17:18:36 +01:00
Manuel Pégourié-Gonnard
6ca4076468 Update all.sh for new dependency 2015-02-13 15:57:35 +00:00
Manuel Pégourié-Gonnard
b3b8e43a12 New test script for generated files 2015-02-13 14:53:53 +00:00
Manuel Pégourié-Gonnard
a71780e475 Add test for no platform.c in all.sh 2015-02-13 13:56:55 +00:00
Manuel Pégourié-Gonnard
c5c5939577 Add armcc to all.sh if available 2015-02-10 17:38:54 +01:00
Manuel Pégourié-Gonnard
edb2dc93c6 Add some cross-compile runs to all.sh 2015-02-10 14:36:31 +00:00
Manuel Pégourié-Gonnard
392d3dde0b Adapt all.sh for OS X (no MemSan) 2015-01-26 16:44:38 +00:00
Manuel Pégourié-Gonnard
1e77a96683 Fix memsan false positive on Linux >= 3.17 2015-01-26 16:44:37 +00:00
Manuel Pégourié-Gonnard
e4f6edcda1 Rename to mbed TLS in tests/ 2015-01-22 16:43:54 +00:00
Paul Bakker
d7e2483bfc Merge miscellaneous fixes into development 2015-01-13 16:04:38 +01:00
Manuel Pégourié-Gonnard
76c99a01a1 Fix Gnu-ism in script 2014-12-11 10:33:43 +01:00
Manuel Pégourié-Gonnard
ea29d152c7 Add recursion.pl to all.sh 2014-11-20 17:32:33 +01:00
Manuel Pégourié-Gonnard
89d69b398c Fix 3DES -> DES in all.sh (+ time estimates) 2014-11-20 16:36:08 +01:00
Manuel Pégourié-Gonnard
246978d97d Add curves.pl to all.sh 2014-11-20 16:36:08 +01:00
Manuel Pégourié-Gonnard
9bda9b3b92 Rework all.sh to use MSan instead of valgrind 2014-11-20 16:36:08 +01:00
Manuel Pégourié-Gonnard
61bc57af99 Optimize all.sh for new build options 2014-08-14 18:33:00 +02:00
Manuel Pégourié-Gonnard
e73b26391d Add config-full to all.sh 2014-08-14 11:34:34 +02:00
Paul Bakker
fe0984d727 Let all.sh work without shell expansion 2014-06-13 00:13:45 +02:00
Manuel Pégourié-Gonnard
57255b147d Tweak test ordering in all.sh 2014-06-09 11:22:25 +02:00
Manuel Pégourié-Gonnard
4a9dc2a474 Test memory a bit more often in all.sh 2014-05-22 13:52:53 +02:00
Manuel Pégourié-Gonnard
2be0b5225e Add selftest program to the list of tests 2014-04-04 16:33:01 +02:00
Manuel Pégourié-Gonnard
3895f5a344 all.sh: directly go for ASan build 2014-03-27 21:10:56 +01:00
Manuel Pégourié-Gonnard
897a595406 Make all.sh more robust in some use cases 2014-03-26 12:58:47 +01:00
Manuel Pégourié-Gonnard
80955ee075 all.sh: one test script to run them all 2014-03-20 09:38:39 +01:00