Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add jobcount variable for testing hangs in CI #2791

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions .ci/docker.run
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

set -eo pipefail

JOBCOUNT=1

source $DOCKER_BUILD_DIR/.ci/docker-prelude.sh

export CONFIGURE_OPTIONS=
Expand Down Expand Up @@ -40,7 +42,7 @@ if [ "$GEN_FUZZ" == "1" ]; then
./configure --with-fuzzing=libfuzzer --enable-tcti-fuzzing \
--disable-tcti-device --disable-tcti-mssim --disable-tcti-swtpm \
--disable-shared --with-crypto="$WITH_CRYPTO"
make -j$(nproc) check
make -j ${JOBCOUNT} check
exit 0
fi

Expand All @@ -57,7 +59,7 @@ echo "PWD: $(pwd)"
echo "ls -la ../ $(ls -la ../)"

../configure --with-crypto=$WITH_CRYPTO $CONFIGURE_OPTIONS
make -j$(nproc)
make -j ${JOBCOUNT}
popd

if [ "$WITH_CRYPTO" == "none" ]; then
Expand Down Expand Up @@ -92,11 +94,11 @@ else
fi

if [ "$SCANBUILD" == "yes" ]; then
scan-build --status-bugs make -j
scan-build --status-bugs make -j ${JOBCOUNT}
elif [ "$CC" == "clang" ]; then
make -j distcheck
make -j ${JOBCOUNT} distcheck
else
make -j check
make -j ${JOBCOUNT} check
fi

popd
Expand All @@ -111,31 +113,31 @@ if [ "$CC" == "gcc" ]; then
# only device TCTI
echo "========================== START TEST - device TCTI =========================="
mkdir -p ./dev/tpm0 && ../configure --disable-doxygen-doc --enable-unit --enable-self-generated-certificate --enable-integration --disable-tcti-swtpm --disable-tcti-mssim --enable-tcti-device --with-device=./dev/tpm0
make -j check TESTS="test/unit/tcti-device" && rm -rf ./dev
make -j ${JOBCOUNT} check TESTS="test/unit/tcti-device" && rm -rf ./dev
# only mssim TCTI
echo "========================== START TEST - mssim TCTI =========================="
../configure --disable-doxygen-doc --enable-unit --enable-self-generated-certificate --enable-integration --disable-tcti-swtpm --enable-tcti-mssim --disable-tcti-device
make -j check TESTS="test/unit/tcti-mssim"
make -j ${JOBCOUNT} check TESTS="test/unit/tcti-mssim"
# device and mssim TCTIs
echo "========================== START TEST - mssim & device TCTI =========================="
../configure --disable-doxygen-doc --enable-unit --enable-self-generated-certificate --enable-integration --disable-tcti-swtpm --enable-tcti-mssim --enable-tcti-device
make -j check TESTS="test/unit/tcti-device test/unit/tcti-mssim"
make -j ${JOBCOUNT} check TESTS="test/unit/tcti-device test/unit/tcti-mssim"
# only swtmp TCTI
echo "========================== START TEST - swtpm TCTI =========================="
../configure --disable-doxygen-doc --enable-unit --enable-self-generated-certificate --enable-integration --enable-tcti-swtpm --disable-tcti-mssim --disable-tcti-device
make -j check TESTS="test/unit/tcti-swtpm"
make -j ${JOBCOUNT} check TESTS="test/unit/tcti-swtpm"
# swtmp and device TCTIs
echo "========================== START TEST - swtpm & device TCTI =========================="
../configure --disable-doxygen-doc --enable-unit --enable-self-generated-certificate --enable-integration --enable-tcti-swtpm --disable-tcti-mssim --enable-tcti-device
make -j check TESTS="test/unit/tcti-swtpm test/unit/tcti-device"
make -j ${JOBCOUNT} check TESTS="test/unit/tcti-swtpm test/unit/tcti-device"
# swtmp and mssim TCTIs
echo "========================== START TEST - swtpm & mssim TCTI =========================="
../configure --disable-doxygen-doc --enable-unit --enable-self-generated-certificate --enable-integration --enable-tcti-swtpm --enable-tcti-mssim --disable-tcti-device
make -j check TESTS="test/unit/tcti-swtpm test/unit/tcti-mssim"
make -j ${JOBCOUNT} check TESTS="test/unit/tcti-swtpm test/unit/tcti-mssim"
# all TCTIs
echo "========================== START TEST - swtpm & mssim & device TCTI =========================="
../configure --disable-doxygen-doc --enable-unit --enable-self-generated-certificate --enable-integration --enable-tcti-swtpm --enable-tcti-mssim --enable-tcti-device
make -j check TESTS="test/unit/tcti-swtpm test/unit/tcti-mssim test/unit/tcti-device"
make -j ${JOBCOUNT} check TESTS="test/unit/tcti-swtpm test/unit/tcti-mssim test/unit/tcti-device"
fi # CC == gcc
popd
fi # TEST_TCTI_CONFIG
Expand Down
3 changes: 0 additions & 3 deletions src/tss2-fapi/ifapi_policy_json_serialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,6 @@ ifapi_json_TPMS_POLICYAUTHORIZE_serialize(const TPMS_POLICYAUTHORIZE *in,

TSS2_RC r;
json_object *jso2;
size_t cond_cnt = 0; /**< counter for conditional fields */

if (*jso == NULL)
*jso = json_object_new_object();
Expand Down Expand Up @@ -748,7 +747,6 @@ ifapi_json_TPMS_POLICYAUTHORIZE_serialize(const TPMS_POLICYAUTHORIZE *in,
jso2 = NULL;

if (in->keyPath) {
cond_cnt++;
r = ifapi_json_char_serialize(in->keyPath, &jso2);
return_if_error(r, "Serialize char");

Expand All @@ -758,7 +756,6 @@ ifapi_json_TPMS_POLICYAUTHORIZE_serialize(const TPMS_POLICYAUTHORIZE *in,
}
if (in->keyPublic.type != 0) {
jso2 = NULL;
cond_cnt++;
r = ifapi_json_TPMT_PUBLIC_serialize(&in->keyPublic, &jso2);
return_if_error(r, "Serialize TPMT_PUBLIC");

Expand Down
Loading