Skip to content

Commit

Permalink
ci(refactor): remove Valgrind checks from omnibus and generalBatch (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
boquan-fang authored Dec 3, 2024
1 parent 7ff8545 commit 91d6f1f
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 277 deletions.
10 changes: 0 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@ bin: libs
integrationv2: bin
$(MAKE) -C tests integrationv2

.PHONY : valgrind
valgrind: bin
$(MAKE) -C tests valgrind

# https://github.com/aws/s2n-tls/issues/3758
# Run valgrind in pedantic mode (--errors-for-leak-kinds=all)
.PHONY : pedantic_valgrind
pedantic_valgrind: bin
$(MAKE) -C tests pedantic_valgrind

.PHONY : coverage
coverage: run-lcov run-genhtml

Expand Down
18 changes: 0 additions & 18 deletions codebuild/bin/s2n_codebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,6 @@ make clean;
echo "Using $JOBS jobs for make..";
echo "running with libcrypto: ${S2N_LIBCRYPTO}, gcc_version: ${GCC_VERSION}"

if [[ "$OS_NAME" == "linux" && "$TESTS" == "valgrind" ]]; then
# For linux make a build with debug symbols and run valgrind
# We have to output something every 9 minutes, as some test may run longer than 10 minutes
# and will not produce any output
while sleep 9m; do echo "=====[ $SECONDS seconds still running ]====="; done &

if [[ "$S2N_LIBCRYPTO" == "openssl-1.1.1" ]]; then
# https://github.com/aws/s2n-tls/issues/3758
# Run valgrind in pedantic mode (--errors-for-leak-kinds=all)
echo "running task pedantic_valgrind"
S2N_DEBUG=true make -j $JOBS pedantic_valgrind
else
S2N_DEBUG=true make -j $JOBS valgrind
fi

kill %1
fi

test_linked_libcrypto() {
s2n_executable="$1"
so_path="${LIBCRYPTO_ROOT}/lib/libcrypto.so"
Expand Down
66 changes: 0 additions & 66 deletions codebuild/spec/buildspec_generalbatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,72 +53,6 @@ batch:
BUILD_S2N: 'true'
TESTS: exec_leak
identifier: s2nExecLeak
- buildspec: codebuild/spec/buildspec_ubuntu.yml
env:
compute-type: BUILD_GENERAL1_LARGE
image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu18codebuild
privileged-mode: true
variables:
BUILD_S2N: true
GCC_VERSION: 6
S2N_LIBCRYPTO: openssl-1.0.2-fips
TESTS: valgrind
identifier: s2nValgrindOpenSSL102Gcc6Fips
- identifier: s2nValgrindOpenSSL3
buildspec: codebuild/spec/buildspec_ubuntu.yml
env:
privileged-mode: true
compute-type: BUILD_GENERAL1_LARGE
image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu18codebuild
variables:
TESTS: valgrind
GCC_VERSION: 9
S2N_LIBCRYPTO: openssl-3.0
BUILD_S2N: true
- buildspec: codebuild/spec/buildspec_ubuntu.yml
env:
compute-type: BUILD_GENERAL1_LARGE
image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu18codebuild
privileged-mode: true
variables:
BUILD_S2N: true
GCC_VERSION: 9
S2N_LIBCRYPTO: openssl-1.1.1
TESTS: valgrind
identifier: s2nValgrindOpenSSL111Gcc9
- buildspec: codebuild/spec/buildspec_ubuntu.yml
env:
compute-type: BUILD_GENERAL1_LARGE
image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu18codebuild
privileged-mode: true
variables:
BUILD_S2N: 'true'
GCC_VERSION: '6'
S2N_LIBCRYPTO: 'openssl-1.0.2'
TESTS: valgrind
identifier: s2nValgrindOpenssl102
- buildspec: codebuild/spec/buildspec_ubuntu.yml
env:
compute-type: BUILD_GENERAL1_LARGE
image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu18codebuild
privileged-mode: true
variables:
BUILD_S2N: 'true'
GCC_VERSION: '6'
S2N_LIBCRYPTO: 'awslc'
TESTS: valgrind
identifier: s2nValgrindAwslc
- buildspec: codebuild/spec/buildspec_ubuntu.yml
env:
compute-type: BUILD_GENERAL1_LARGE
image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu18codebuild
privileged-mode: true
variables:
BUILD_S2N: 'true'
GCC_VERSION: '6'
S2N_LIBCRYPTO: 'awslc-fips'
TESTS: valgrind
identifier: s2nValgrindAwslcFips
- identifier: s2nAsanOpenSSL111Coverage
buildspec: codebuild/spec/buildspec_ubuntu.yml
env:
Expand Down
175 changes: 48 additions & 127 deletions codebuild/spec/buildspec_omnibus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,78 +48,6 @@ batch:
variables:
TESTS: sidetrail

- identifier: s2nValgrindOpenSSL3
buildspec: codebuild/spec/buildspec_ubuntu.yml
env:
privileged-mode: true
compute-type: BUILD_GENERAL1_LARGE
image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu18codebuild
variables:
TESTS: valgrind
GCC_VERSION: 9
S2N_LIBCRYPTO: openssl-3.0
BUILD_S2N: true

- identifier: s2nValgrindOpenSSL102Gcc6Fips
buildspec: codebuild/spec/buildspec_ubuntu.yml
env:
privileged-mode: true
compute-type: BUILD_GENERAL1_LARGE
image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu18codebuild
variables:
TESTS: valgrind
GCC_VERSION: 6
S2N_LIBCRYPTO: openssl-1.0.2-fips
BUILD_S2N: true

- identifier: s2nValgrindOpenSSL111Gcc9
buildspec: codebuild/spec/buildspec_ubuntu.yml
env:
privileged-mode: true
compute-type: BUILD_GENERAL1_LARGE
image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu18codebuild
variables:
TESTS: valgrind
GCC_VERSION: 9
S2N_LIBCRYPTO: openssl-1.1.1
BUILD_S2N: true

- identifier: s2nValgrindOpenssl102
buildspec: codebuild/spec/buildspec_ubuntu.yml
env:
privileged-mode: true
compute-type: BUILD_GENERAL1_LARGE
image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu18codebuild
variables:
TESTS: valgrind
GCC_VERSION: '6'
S2N_LIBCRYPTO: 'openssl-1.0.2'
BUILD_S2N: 'true'

- identifier: s2nValgrindAwslc
buildspec: codebuild/spec/buildspec_ubuntu.yml
env:
privileged-mode: true
compute-type: BUILD_GENERAL1_LARGE
image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu18codebuild
variables:
TESTS: valgrind
GCC_VERSION: '6'
S2N_LIBCRYPTO: 'awslc'
BUILD_S2N: 'true'

- identifier: s2nValgrindAwslcFips
buildspec: codebuild/spec/buildspec_ubuntu.yml
env:
privileged-mode: true
compute-type: BUILD_GENERAL1_LARGE
image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu18codebuild
variables:
TESTS: valgrind
GCC_VERSION: '6'
S2N_LIBCRYPTO: 'awslc-fips'
BUILD_S2N: 'true'

- identifier: s2nAsanOpenSSL111Coverage
buildspec: codebuild/spec/buildspec_ubuntu.yml
env:
Expand All @@ -133,18 +61,6 @@ batch:
BUILD_S2N: 'true'
S2N_COVERAGE: 'true'

- identifier: s2nAsanOpenssl3
buildspec: codebuild/spec/buildspec_ubuntu.yml
env:
privileged-mode: true
compute-type: BUILD_GENERAL1_LARGE
image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu18codebuild
variables:
TESTS: asan
GCC_VERSION: '6'
S2N_LIBCRYPTO: 'openssl-3.0'
BUILD_S2N: 'true'

- identifier: s2nAsanOpenssl102
buildspec: codebuild/spec/buildspec_ubuntu.yml
env:
Expand All @@ -157,7 +73,7 @@ batch:
S2N_LIBCRYPTO: 'openssl-1.0.2'
BUILD_S2N: 'true'

- identifier: s2nUnitOpenssl111Gcc9
- identifier: s2nUnitNoPQ
buildspec: codebuild/spec/buildspec_ubuntu.yml
env:
privileged-mode: true
Expand All @@ -169,8 +85,21 @@ batch:
S2N_LIBCRYPTO: 'openssl-1.1.1'
BUILD_S2N: 'true'

- identifier: s2nUnitOpenSSL3GCC9
buildspec: codebuild/spec/buildspec_ubuntu.yml
env:
compute-type: BUILD_GENERAL1_LARGE
image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu18codebuild
privileged-mode: true
variables:
BUILD_S2N: true
GCC_VERSION: 9
S2N_COVERAGE: true
S2N_LIBCRYPTO: openssl-3.0
TESTS: unit

- identifier: s2nUnitAl2Arm
buildspec: codebuild/spec/buildspec_amazonlinux2.yml
buildspec: codebuild/spec/buildspec_amazonlinux.yml
env:
type: ARM_CONTAINER
compute-type: BUILD_GENERAL1_LARGE
Expand All @@ -180,7 +109,7 @@ batch:
TESTS: unit

- identifier: s2nUnitAl2
buildspec: codebuild/spec/buildspec_amazonlinux2.yml
buildspec: codebuild/spec/buildspec_amazonlinux.yml
env:
image: aws/codebuild/amazonlinux2-x86_64-standard:3.0
privileged-mode: true
Expand Down Expand Up @@ -209,16 +138,6 @@ batch:
BUILD_S2N: 'true'
S2N_LIBCRYPTO: awslc

- identifier: s2nExecLeak
buildspec: codebuild/spec/buildspec_ubuntu.yml
env:
privileged-mode: true
compute-type: BUILD_GENERAL1_LARGE
image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu18codebuild
variables:
TESTS: exec_leak
BUILD_S2N: 'true'

- identifier: s2nUnitCRT
buildspec: codebuild/spec/buildspec_ubuntu.yml
env:
Expand All @@ -239,7 +158,18 @@ batch:
TESTS: sharedandstatic
# must use the libcrypto that's actually installed on the system
S2N_LIBCRYPTO: openssl-1.1.1


- identifier: s2nDynamicLoad
buildspec: codebuild/spec/buildspec_ubuntu.yml
env:
compute-type: BUILD_GENERAL1_SMALL
image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu18codebuild
privileged-mode: true
variables:
TESTS: dynamicload
GCC_VERSION: '9'
S2N_LIBCRYPTO: openssl-1.1.1

- buildspec: codebuild/spec/buildspec_ubuntu.yml
env:
compute-type: BUILD_GENERAL1_LARGE
Expand All @@ -252,22 +182,6 @@ batch:
TESTS: unit
identifier: s2nUnitOpenSSL111Gcc6

- identifier: s2nUnitCoverage
buildspec: codebuild/spec/buildspec_unit_coverage.yml
env:
privileged-mode: true
compute-type: BUILD_GENERAL1_LARGE
image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu22codebuild
variables:
S2N_LIBCRYPTO: openssl-1.1.1

- identifier: 32BitBuildAndUnit
buildspec: codebuild/spec/buildspec_32bit_cross_compile.yml
env:
privileged-mode: true
compute-type: BUILD_GENERAL1_LARGE
image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu22codebuild

- buildspec: codebuild/spec/buildspec_ubuntu.yml
env:
compute-type: BUILD_GENERAL1_SMALL
Expand All @@ -283,7 +197,7 @@ batch:
- buildspec: codebuild/spec/buildspec_ubuntu.yml
env:
compute-type: BUILD_GENERAL1_SMALL
image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu22codebuild
image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu18codebuild
privileged-mode: true
variables:
BUILD_S2N: 'true'
Expand All @@ -292,29 +206,36 @@ batch:
TESTS: unit
identifier: s2nUnitBoringssl

# Fuzz tests
- identifier: s2nFuzzerOpenSSL111Coverage
buildspec: codebuild/spec/buildspec_ubuntu_fuzz_artifacts.yml
- identifier: s2nFuzzerAWSLC
buildspec: codebuild/spec/buildspec_fuzz.yml
env:
privileged-mode: true
compute-type: BUILD_GENERAL1_LARGE
image: aws/codebuild/standard:5.0
compute-type: BUILD_GENERAL1_XLARGE
image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu22codebuild
variables:
S2N_LIBCRYPTO: awslc
COMPILER: clang
FUZZ_TIMEOUT_SEC: 60

- identifier: s2nFuzzerOpenSSL111
buildspec: codebuild/spec/buildspec_fuzz.yml
env:
privileged-mode: true
compute-type: BUILD_GENERAL1_XLARGE
image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu22codebuild
variables:
S2N_LIBCRYPTO: openssl-1.1.1
LATEST_CLANG: true
TESTS: fuzz
COMPILER: clang
FUZZ_TIMEOUT_SEC: 60
FUZZ_COVERAGE: true

- identifier: s2nFuzzerOpenSSL102FIPS
buildspec: codebuild/spec/buildspec_ubuntu_fuzz_artifacts.yml
buildspec: codebuild/spec/buildspec_fuzz.yml
env:
privileged-mode: true
compute-type: BUILD_GENERAL1_LARGE
compute-type: BUILD_GENERAL1_XLARGE
image: 024603541914.dkr.ecr.us-west-2.amazonaws.com/docker:ubuntu22codebuild
variables:
S2N_LIBCRYPTO: openssl-1.0.2-fips
LATEST_CLANG: true
TESTS: fuzz
COMPILER: clang
FUZZ_TIMEOUT_SEC: 60

9 changes: 0 additions & 9 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,6 @@ all: libs viz
${MAKE} -C unit
@echo "\033[1m ${COMPILE_INFO} \033[0;39m"

.PHONY : valgrind
valgrind: libs
${MAKE} -C unit valgrind

# https://github.com/aws/s2n-tls/issues/3758
# Run valgrind in pedantic mode (--errors-for-leak-kinds=all)
pedantic_valgrind: libs
${MAKE} -C unit pedantic_valgrind

.PHONY : libs
libs:
${MAKE} -C testlib
Expand Down
Loading

0 comments on commit 91d6f1f

Please sign in to comment.