Skip to content

Commit

Permalink
test(debug): debug libcrypto load issue
Browse files Browse the repository at this point in the history
  • Loading branch information
parfeon committed Nov 20, 2024
1 parent 1663da6 commit 550ea81
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
#!/bin/bash
set -e

cat /usr/include/openssl/evp.h
if [ -d "/usr/lib/x86_64-linux-gnu/" ]; then
ls /usr/lib/x86_64-linux-gnu/libcrypto.*
echo "----"
nm -D /usr/lib/x86_64-linux-gnu/libcrypto.so
echo "----"
nm -D /usr/lib/x86_64-linux-gnu/libcrypto.so | grep EVP_DecryptFinal_ex
echo "----"
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
fi


echo "::group::Run unit tests ('$1' $CC / $CXX)"
cd "$GITHUB_WORKSPACE/core"
Expand Down
2 changes: 2 additions & 0 deletions core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ endif
pbcc_crypto_unittest: $(PROJECT_SOURCEFILES) $(CRYPTO_SOURCEFILES) pbcc_crypto_unit_tests.c
gcc -o pbcc_crypto_unit_test.so -shared $(CFLAGS) $(LDFLAGS) $(CRYPTO_INCLUDES) $(CRYPTO_LIBS) -D PUBNUB_CRYPTO_API=1 -Wall $(COVERAGE_FLAGS) -fPIC $(PROJECT_SOURCEFILES) $(CRYPTO_SOURCEFILES) test/pubnub_test_mocks.c pbcc_crypto_unit_tests.c -lcgreen -lm
# gcc -o pubnub_core_unit_testo $(CFLAGS) -Wall $(COVERAGE_FLAGS) $(PROJECT_SOURCEFILES) pbcc_crypto_unit_tests.c -lcgreen -lm
ldd pbcc_crypto_unit_test.so
$(CGREEN_RUNNER) ./pbcc_crypto_unit_test.so
#$(GCOVR) -r . --html --html-details -o coverage.html

Expand All @@ -126,6 +127,7 @@ SUBSCRIBE_V2_SOURCEFILES += pubnub_subscribe_v2.c pbcc_subscribe_v2.c
pubnub_crypto_unittest: $(PROJECT_SOURCEFILES) $(CRYPTO_SOURCEFILES) $(SUBSCRIBE_V2_SOURCEFILES) pubnub_crypto_unit_tests.c
gcc -o pubnub_crypto_unit_test.so -shared $(CFLAGS) $(LDFLAGS) $(CRYPTO_INCLUDES) $(CRYPTO_LIBS) -D PUBNUB_CRYPTO_API=1 -D PUBNUB_USE_SUBSCRIBE_V2=1 -Wall $(COVERAGE_FLAGS) -fPIC $(PROJECT_SOURCEFILES) $(CRYPTO_SOURCEFILES) $(SUBSCRIBE_V2_SOURCEFILES) test/pubnub_test_mocks.c pubnub_crypto_unit_tests.c -lcgreen -lm
# gcc -o pubnub_core_unit_testo $(CFLAGS) -Wall $(COVERAGE_FLAGS) $(PROJECT_SOURCEFILES) pubnub_crypto_unit_tests.c -lcgreen -lm
ldd pubnub_crypto_unit_test.so
$(CGREEN_RUNNER) ./pubnub_crypto_unit_test.so


Expand Down

0 comments on commit 550ea81

Please sign in to comment.