memtest.sh 870 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env bash
  2. # Run this script from the wolfSSL root as `./scripts/memtest.sh`.
  3. ./autogen.sh
  4. ./configure --enable-debug --disable-shared --enable-memtest \
  5. --enable-opensslextra --enable-des3 --enable-dh --enable-ecc --enable-aesgcm --enable-aesccm \
  6. --enable-sniffer --enable-psk --enable-camellia --enable-sha512 --enable-crl --enable-ocsp --enable-savesession \
  7. --enable-savecert --enable-atomicuser --enable-pkcallbacks --enable-scep;
  8. #DTLS has issue with trapping client/server failure disconnect since its stateless. Need to find way to communicate failure through file system.
  9. #--enable-dtls
  10. make
  11. for i in {1..1000}
  12. do
  13. echo -e "Trying ${i}...\n"
  14. ./tests/unit.test > ./scripts/memtest.txt 2>&1
  15. RESULT=$?
  16. [ $RESULT -eq 139 ] && echo "Mem Seg Fault" && exit 1
  17. done
  18. echo "Loop SUCCESS"