| # This file is part of mbed TLS (https://tls.mbed.org) |
| # Copyright (c) 2017, ARM Limited, All Rights Reserved |
| # Run a test using the debugger to check that the mbedtls_zeroize() function in |
| # utils.h is not being optimized out by the compiler. To do so, the script |
| # loads the test program at programs/test/zeroize.c and sets a breakpoint at |
| # the last return statement in the main(). When the breakpoint is hit, the |
| # debugger manually checks the contents to be zeroized and checks that it is |
| # Note: This test requires that the test program is compiled with -g3. |
| file ./programs/test/zeroize |
| set args ./programs/test/zeroize.c |
| echo The program did not terminate correctly\n |
| echo The buffer at was not zeroized\n |
| echo The buffer was correctly zeroized\n |