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

2.4.2: test suite fails in 12% units #381

Open
kloczek opened this issue Jan 21, 2024 · 7 comments
Open

2.4.2: test suite fails in 12% units #381

kloczek opened this issue Jan 21, 2024 · 7 comments

Comments

@kloczek
Copy link

kloczek commented Jan 21, 2024

cmake settings
-- Cache values
BASH_PROGRAM:FILEPATH=/usr/bin/bash
BUILD_ONLY_LIB:BOOL=OFF
CMAKE_BUILD_TYPE:STRING=RelWithDebInfo
CMAKE_INSTALL_PREFIX:PATH=/usr
ENABLE_ASYMMETRIC_AUTH:BOOL=ON
ENABLE_COVERAGE:BOOL=OFF
ENABLE_YKHSM_AUTH:BOOL=ON
GENGETOPT_EXECUTABLE:FILEPATH=/usr/bin/gengetopt
HELP2MAN_LOCATION:FILEPATH=/usr/bin/help2man
SUPRESS_MSVC_WARNINGS:BOOL=ON
YUBIHSM_INSTALL_BIN_DIR:PATH=/usr/bin
YUBIHSM_INSTALL_INC_DIR:PATH=/usr/include
YUBIHSM_INSTALL_LIB_DIR:PATH=/usr/lib64
YUBIHSM_INSTALL_MAN_DIR:PATH=/usr/share/man
YUBIHSM_INSTALL_PKGCONFIG_DIR:PATH=/usr/share/pkgconfig

And ..

test suite fails with
+ cd yubihsm-shell-2.4.2
+ /usr/bin/ctest --test-dir x86_64-redhat-linux-gnu --output-on-failure --force-new-ctest-process -j48 ' ' -E '^(bash_tests|pkcs11test|wrapped_tests)'
Internal ctest changing into directory: /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/x86_64-redhat-linux-gnu
Test project /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/x86_64-redhat-linux-gnu
      Start  1: parsing
      Start  2: pbkdf2
      Start  3: attest
      Start  4: generate_ec
      Start  5: generate_hmac
      Start  6: import_authkey
      Start  7: import_rsa
      Start  8: info
      Start  9: wrap
      Start 10: wrap_data
      Start 11: yubico_otp
      Start 12: echo
      Start 13: asym_auth
      Start 14: import_ec
      Start 15: generate_rsa
      Start 16: logs
      Start 17: ssh
      Start 18: decrypt_rsa
      Start 19: decrypt_ec
      Start 20: import_ed
      Start 21: change_authkey
      Start 22: encrypt_aes
      Start 23: engine_tests
      Start 24: aes_encrypt_test
      Start 25: ecdh_derive_test
      Start 26: rsa_enc_test
 1/26 Test  #1: parsing ..........................   Passed    0.04 sec
 2/26 Test  #2: pbkdf2 ...........................   Passed    0.04 sec
 3/26 Test #19: decrypt_ec .......................Subprocess aborted***Exception:   0.01 sec
decrypt_ec: /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/examples/decrypt_ec.c:58: main: Assertion `yrc == YHR_SUCCESS' failed.

 4/26 Test #20: import_ed ........................Subprocess aborted***Exception:   0.01 sec
import_ed: /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/examples/import_ed.c:68: main: Assertion `yrc == YHR_SUCCESS' failed.

 5/26 Test #21: change_authkey ...................Subprocess aborted***Exception:   0.01 sec
change_authkey: /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/examples/change_authkey.c:55: main: Assertion `yrc == YHR_SUCCESS' failed.

 6/26 Test #22: encrypt_aes ......................Subprocess aborted***Exception:   0.01 sec
encrypt_aes: /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/examples/encrypt_aes.c:49: main: Assertion `yrc == YHR_SUCCESS' failed.

 7/26 Test #23: engine_tests .....................   Passed    0.01 sec
 8/26 Test #24: aes_encrypt_test .................Subprocess aborted***Exception:   0.01 sec
aes_encrypt_test: /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/pkcs11/tests/common.c:71: open_session: Assertion `rv == CKR_OK' failed.

 9/26 Test #25: ecdh_derive_test .................Subprocess aborted***Exception:   0.01 sec
ecdh_derive_test: /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/pkcs11/tests/common.c:71: open_session: Assertion `rv == CKR_OK' failed.

10/26 Test #26: rsa_enc_test .....................Subprocess aborted***Exception:   0.01 sec
rsa_enc_test: /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/pkcs11/tests/common.c:71: open_session: Assertion `rv == CKR_OK' failed.

11/26 Test  #3: attest ...........................Subprocess aborted***Exception:   0.23 sec
attest: /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/examples/attest.c:124: main: Assertion `yrc == YHR_SUCCESS' failed.

12/26 Test  #6: import_authkey ...................Subprocess aborted***Exception:   0.23 sec
import_authkey: /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/examples/import_authkey.c:54: main: Assertion `yrc == YHR_SUCCESS' failed.

13/26 Test  #4: generate_ec ......................Subprocess aborted***Exception:   0.24 sec
generate_ec: /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/examples/generate_ec.c:60: main: Assertion `yrc == YHR_SUCCESS' failed.

14/26 Test  #5: generate_hmac ....................Subprocess aborted***Exception:   0.24 sec
generate_hmac: /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/examples/generate_hmac.c:54: main: Assertion `yrc == YHR_SUCCESS' failed.

15/26 Test  #8: info .............................Subprocess aborted***Exception:   0.24 sec
info: /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/examples/info.c:47: main: Assertion `yrc == YHR_SUCCESS' failed.

16/26 Test  #7: import_rsa .......................Subprocess aborted***Exception:   0.24 sec
import_rsa: /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/examples/import_rsa.c:60: main: Assertion `yrc == YHR_SUCCESS' failed.

17/26 Test #14: import_ec ........................Subprocess aborted***Exception:   0.26 sec
import_ec: /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/examples/import_ec.c:61: main: Assertion `yrc == YHR_SUCCESS' failed.

18/26 Test #15: generate_rsa .....................Subprocess aborted***Exception:   0.26 sec
generate_rsa: /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/examples/generate_rsa.c:59: main: Assertion `yrc == YHR_SUCCESS' failed.

19/26 Test #17: ssh ..............................Subprocess aborted***Exception:   0.26 sec
ssh: /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/examples/ssh.c:177: main: Assertion `yrc == YHR_SUCCESS' failed.

20/26 Test #18: decrypt_rsa ......................Subprocess aborted***Exception:   0.26 sec
decrypt_rsa: /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/examples/decrypt_rsa.c:65: main: Assertion `yrc == YHR_SUCCESS' failed.

21/26 Test #13: asym_auth ........................Subprocess aborted***Exception:   0.27 sec
asym_auth: /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/examples/asym_auth.c:53: main: Assertion `yrc == YHR_SUCCESS' failed.

22/26 Test  #9: wrap .............................Subprocess aborted***Exception:   0.27 sec
wrap: /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/examples/wrap.c:60: main: Assertion `yrc == YHR_SUCCESS' failed.

23/26 Test #10: wrap_data ........................Subprocess aborted***Exception:   0.27 sec
wrap_data: /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/examples/wrap_data.c:54: main: Assertion `yrc == YHR_SUCCESS' failed.

24/26 Test #12: echo .............................Subprocess aborted***Exception:   0.27 sec
echo: /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/examples/echo.c:51: main: Assertion `yrc == YHR_SUCCESS' failed.

25/26 Test #11: yubico_otp .......................Subprocess aborted***Exception:   0.27 sec
yubico_otp: /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/examples/yubico_otp.c:105: main: Assertion `yrc == YHR_SUCCESS' failed.

26/26 Test #16: logs .............................Subprocess aborted***Exception:   0.27 sec
logs: /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/examples/logs.c:58: main: Assertion `yrc == YHR_SUCCESS' failed.


12% tests passed, 23 tests failed out of 26

Total Test time (real) =   0.30 sec

The following tests FAILED:
          3 - attest (Subprocess aborted)
          4 - generate_ec (Subprocess aborted)
          5 - generate_hmac (Subprocess aborted)
          6 - import_authkey (Subprocess aborted)
          7 - import_rsa (Subprocess aborted)
          8 - info (Subprocess aborted)
          9 - wrap (Subprocess aborted)
         10 - wrap_data (Subprocess aborted)
         11 - yubico_otp (Subprocess aborted)
         12 - echo (Subprocess aborted)
         13 - asym_auth (Subprocess aborted)
         14 - import_ec (Subprocess aborted)
         15 - generate_rsa (Subprocess aborted)
         16 - logs (Subprocess aborted)
         17 - ssh (Subprocess aborted)
         18 - decrypt_rsa (Subprocess aborted)
         19 - decrypt_ec (Subprocess aborted)
         20 - import_ed (Subprocess aborted)
         21 - change_authkey (Subprocess aborted)
         22 - encrypt_aes (Subprocess aborted)
         24 - aes_encrypt_test (Subprocess aborted)
         25 - ecdh_derive_test (Subprocess aborted)
         26 - rsa_enc_test (Subprocess aborted)
Errors while running CTest
@kloczek
Copy link
Author

kloczek commented Jan 21, 2024

After add all those units to exclude list another two pops out:

+ cd yubihsm-shell-2.4.2
+ /usr/bin/ctest --test-dir x86_64-redhat-linux-gnu --output-on-failure --force-new-ctest-process -j48 ' ' -E '^(attest|generate_ec|generate_hmac|import_authkey|import_rsa|info|wrap|wrap_data|yubico_otp|echo|asym_auth|import_ec|generate_rsa|logs|ssh|decrypt_rsa|decrypt_ec|import_ed|change_authkey|encrypt_aes|aes_encrypt_test|ecdh_derive_test|rsa_enc_test)'
Internal ctest changing into directory: /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/x86_64-redhat-linux-gnu
Test project /home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/x86_64-redhat-linux-gnu
    Start 1: parsing
    Start 2: pbkdf2
    Start 3: engine_tests
    Start 4: pkcs11test
    Start 5: bash_tests
1/5 Test #1: parsing ..........................   Passed    0.01 sec
2/5 Test #3: engine_tests .....................   Passed    0.01 sec
3/5 Test #2: pbkdf2 ...........................   Passed    0.01 sec
4/5 Test #4: pkcs11test .......................***Failed    0.01 sec
SHELL=/bin/bash
RPM_SOURCE_DIR=/home/tkloczko/rpmbuild/SOURCES
HISTCONTROL=ignoreboth
CTEST_INTERACTIVE_DEBUG_MODE=1
PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig
HOSTNAME=pers-jacek
HISTSIZE=10000
YUBIHSM_PKCS11_CONF=/tmp/yubihsmtest.E6bBs2/p11.conf
RPM_SPECPARTS_DIR=/home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/SPECPARTS
PWD=/home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/x86_64-redhat-linux-gnu/pkcs11/tests
LOGNAME=tkloczko
XDG_SESSION_TYPE=tty
MC_TMPDIR=/var/tmp/mc-tkloczko
RPM_ARCH=x86_64
MOTD_SHOWN=pam
MC_SID=2792914
HOME=/home/tkloczko
LANG=C.UTF-8
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;37;41:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.crdownload=00;90:*.dpkg-dist=00;90:*.dpkg-new=00;90:*.dpkg-old=00;90:*.dpkg-tmp=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:*.swp=00;90:*.tmp=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:
RPM_LD_FLAGS=
BINDIR=/home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/x86_64-redhat-linux-gnu
SKIPPED_TESTS=Slot.NoInit:PKCS11Test.EnumerateMechanisms:ReadOnlySessionTest.GenerateRandom:ReadOnlySessionTest.GenerateRandomNone:ReadOnlySessionTest.UserLoginWrongPIN:ReadOnlySessionTest.SOLoginFail:ReadOnlySessionTest.CreateKeyPairObjects:ReadOnlySessionTest.CreateSecretKeyAttributes:ReadOnlySessionTest.SecretKeyTestVectors:ReadOnlySessionTest.SignVerifyRecover:ReadOnlySessionTest.GenerateKeyInvalid:ReadOnlySessionTest.GenerateKeyPairInvalid:ReadOnlySessionTest.WrapUnwrap:ReadOnlySessionTest.WrapInvalid:ReadOnlySessionTest.UnwrapInvalid:ReadWriteSessionTest.CreateCopyDestroyObject:ReadWriteSessionTest.SetLatchingAttribute:ReadWriteSessionTest.FindObjectSubset:ReadWriteSessionTest.ReadOnlySessionSOLoginFail:ReadWriteSessionTest.SOLogin:ReadWriteSessionTest.TookanAttackA1:ReadWriteSessionTest.TookanAttackA3:ReadWriteSessionTest.TookanAttackA4:ReadWriteSessionTest.TookanAttackA5a:ReadWriteSessionTest.TookanAttackA5b:ReadWriteSessionTest.PublicExponent4Bytes:ReadWriteSessionTest.ExtractKeys:ReadWriteSessionTest.AsymmetricTokenKeyPair:RWUserSessionTest.SOLoginFail:DataObjectTest.CopyDestroyObjectInvalid:DataObjectTest.GetMultipleAttributes:DataObjectTest.GetSetAttributeInvalid:RWSOSessionTest.SOSessionFail:RWSOSessionTest.UserLoginFail:RWEitherSessionTest.TookanAttackA2:KeyPairTest.EncryptDecrypt:Ciphers/SecretKeyTest.EncryptDecrypt/0:Ciphers/SecretKeyTest.EncryptDecrypt/1:Ciphers/SecretKeyTest.EncryptDecrypt/2:Ciphers/SecretKeyTest.EncryptDecrypt/3:Ciphers/SecretKeyTest.EncryptDecrypt/4:Ciphers/SecretKeyTest.EncryptDecrypt/5:Ciphers/SecretKeyTest.EncryptFailDecrypt/0:Ciphers/SecretKeyTest.EncryptFailDecrypt/1:Ciphers/SecretKeyTest.EncryptFailDecrypt/2:Ciphers/SecretKeyTest.EncryptFailDecrypt/3:Ciphers/SecretKeyTest.EncryptFailDecrypt/4:Ciphers/SecretKeyTest.EncryptFailDecrypt/5:Ciphers/SecretKeyTest.EncryptDecryptGetSpace/0:Ciphers/SecretKeyTest.EncryptDecryptGetSpace/1:Ciphers/SecretKeyTest.EncryptDecryptGetSpace/2:Ciphers/SecretKeyTest.EncryptDecryptGetSpace/3:Ciphers/SecretKeyTest.EncryptDecryptGetSpace/4:Ciphers/SecretKeyTest.EncryptDecryptGetSpace/5:Ciphers/SecretKeyTest.EncryptDecryptParts/0:Ciphers/SecretKeyTest.EncryptDecryptParts/1:Ciphers/SecretKeyTest.EncryptDecryptParts/2:Ciphers/SecretKeyTest.EncryptDecryptParts/3:Ciphers/SecretKeyTest.EncryptDecryptParts/4:Ciphers/SecretKeyTest.EncryptDecryptParts/5:Ciphers/SecretKeyTest.EncryptDecryptInitInvalid/0:Ciphers/SecretKeyTest.EncryptDecryptInitInvalid/1:Ciphers/SecretKeyTest.EncryptDecryptInitInvalid/2:Ciphers/SecretKeyTest.EncryptDecryptInitInvalid/3:Ciphers/SecretKeyTest.EncryptDecryptInitInvalid/4:Ciphers/SecretKeyTest.EncryptDecryptInitInvalid/5:Ciphers/SecretKeyTest.EncryptErrors/0:Ciphers/SecretKeyTest.EncryptErrors/1:Ciphers/SecretKeyTest.EncryptErrors/2:Ciphers/SecretKeyTest.EncryptErrors/3:Ciphers/SecretKeyTest.EncryptErrors/4:Ciphers/SecretKeyTest.EncryptErrors/5:Ciphers/SecretKeyTest.DecryptErrors/0:Ciphers/SecretKeyTest.DecryptErrors/1:Ciphers/SecretKeyTest.DecryptErrors/2:Ciphers/SecretKeyTest.DecryptErrors/3:Ciphers/SecretKeyTest.DecryptErrors/4:Ciphers/SecretKeyTest.DecryptErrors/5:Ciphers/SecretKeyTest.EncryptUpdateErrors/0:Ciphers/SecretKeyTest.EncryptUpdateErrors/1:Ciphers/SecretKeyTest.EncryptUpdateErrors/2:Ciphers/SecretKeyTest.EncryptUpdateErrors/3:Ciphers/SecretKeyTest.EncryptUpdateErrors/4:Ciphers/SecretKeyTest.EncryptUpdateErrors/5:Ciphers/SecretKeyTest.EncryptModePolicing1/0:Ciphers/SecretKeyTest.EncryptModePolicing1/1:Ciphers/SecretKeyTest.EncryptModePolicing1/2:Ciphers/SecretKeyTest.EncryptModePolicing1/3:Ciphers/SecretKeyTest.EncryptModePolicing1/4:Ciphers/SecretKeyTest.EncryptModePolicing1/5:Ciphers/SecretKeyTest.EncryptModePolicing2/0:Ciphers/SecretKeyTest.EncryptModePolicing2/1:Ciphers/SecretKeyTest.EncryptModePolicing2/2:Ciphers/SecretKeyTest.EncryptModePolicing2/3:Ciphers/SecretKeyTest.EncryptModePolicing2/4:Ciphers/SecretKeyTest.EncryptModePolicing2/5:Ciphers/SecretKeyTest.EncryptInvalidIV/0:Ciphers/SecretKeyTest.EncryptInvalidIV/1:Ciphers/SecretKeyTest.EncryptInvalidIV/2:Ciphers/SecretKeyTest.EncryptInvalidIV/3:Ciphers/SecretKeyTest.EncryptInvalidIV/4:Ciphers/SecretKeyTest.EncryptInvalidIV/5:Ciphers/SecretKeyTest.DecryptInvalidIV/0:Ciphers/SecretKeyTest.DecryptInvalidIV/1:Ciphers/SecretKeyTest.DecryptInvalidIV/2:Ciphers/SecretKeyTest.DecryptInvalidIV/3:Ciphers/SecretKeyTest.DecryptInvalidIV/4:Ciphers/SecretKeyTest.DecryptInvalidIV/3:Ciphers/SecretKeyTest.DecryptInvalidIV/4:Ciphers/SecretKeyTest.DecryptInvalidIV/5:Ciphers/SecretKeyTest.DecryptUpdateErrors/0:Ciphers/SecretKeyTest.DecryptUpdateErrors/1:Ciphers/SecretKeyTest.DecryptUpdateErrors/2:Ciphers/SecretKeyTest.DecryptUpdateErrors/3:Ciphers/SecretKeyTest.DecryptUpdateErrors/4:Ciphers/SecretKeyTest.DecryptUpdateErrors/5:Ciphers/SecretKeyTest.EncryptFinalImmediate/0:Ciphers/SecretKeyTest.EncryptFinalImmediate/1:Ciphers/SecretKeyTest.EncryptFinalImmediate/2:Ciphers/SecretKeyTest.EncryptFinalImmediate/3:Ciphers/SecretKeyTest.EncryptFinalImmediate/4:Ciphers/SecretKeyTest.EncryptFinalImmediate/5:Ciphers/SecretKeyTest.EncryptFinalErrors1/0:Ciphers/SecretKeyTest.EncryptFinalErrors1/1:Ciphers/SecretKeyTest.EncryptFinalErrors1/2:Ciphers/SecretKeyTest.EncryptFinalErrors1/3:Ciphers/SecretKeyTest.EncryptFinalErrors1/4:Ciphers/SecretKeyTest.EncryptFinalErrors1/5:Ciphers/SecretKeyTest.EncryptFinalErrors2/0:Ciphers/SecretKeyTest.EncryptFinalErrors2/1:Ciphers/SecretKeyTest.EncryptFinalErrors2/2:Ciphers/SecretKeyTest.EncryptFinalErrors2/3:Ciphers/SecretKeyTest.EncryptFinalErrors2/4:Ciphers/SecretKeyTest.EncryptFinalErrors2/5:Ciphers/SecretKeyTest.DecryptFinalErrors1/0:Ciphers/SecretKeyTest.DecryptFinalErrors1/1:Ciphers/SecretKeyTest.DecryptFinalErrors1/2:Ciphers/SecretKeyTest.DecryptFinalErrors1/3:Ciphers/SecretKeyTest.DecryptFinalErrors1/4:Ciphers/SecretKeyTest.DecryptFinalErrors1/5:Ciphers/SecretKeyTest.DecryptFinalErrors2/0:Ciphers/SecretKeyTest.DecryptFinalErrors2/1:Ciphers/SecretKeyTest.DecryptFinalErrors2/2:Ciphers/SecretKeyTest.DecryptFinalErrors2/3:Ciphers/SecretKeyTest.DecryptFinalErrors2/4:Ciphers/SecretKeyTest.DecryptFinalErrors2/5:Digests/DigestTest.DigestKey/0:Digests/DigestTest.DigestKey/1:Digests/DigestTest.DigestKey/2:Digests/DigestTest.DigestKey/3:Digests/DigestTest.DigestKey/4:Digests/DigestTest.DigestKeyInvalid/0:Digests/DigestTest.DigestKeyInvalid/1:Digests/DigestTest.DigestKeyInvalid/2:Digests/DigestTest.DigestKeyInvalid/3:Digests/DigestTest.DigestKeyInvalid/4:Signatures/SignTest.SignVerify/0:Signatures/SignTest.SignFailVerifyWrong/0:Signatures/SignTest.SignFailVerifyShort/0:Duals/DualSecretKeyTest.DigestEncrypt/0:Duals/DualSecretKeyTest.DigestEncrypt/1:Duals/DualSecretKeyTest.DigestEncrypt/2:Duals/DualSecretKeyTest.DigestEncrypt/3:Duals/DualSecretKeyTest.DigestEncrypt/4:Duals/DualSecretKeyTest.DigestEncrypt/5:Init.InitArgsBadReserved
RPM_PACKAGE_RELEASE=2.fc35
SSH_CONNECTION=10.0.3.1 37542 10.0.3.87 22
RPM_OS=linux
XDG_SESSION_CLASS=user
TERM=xterm-256color
LESSOPEN=||/usr/bin/lesspipe.sh %s
USER=tkloczko
SHLVL=4
RPM_BUILD_DIR=/home/tkloczko/rpmbuild/BUILD
LIBEXT=so
RPM_OPT_FLAGS=-m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
XDG_SESSION_ID=82
RPM_DOC_DIR=/usr/share/doc
XDG_RUNTIME_DIR=/run/user/1000
SSH_CLIENT=10.0.3.1 37542 22
RPM_PACKAGE_VERSION=2.4.2
which_declare=declare -f
CONFIG_SITE=NONE
PATH=/usr/bin:/usr/sbin:/usr/local/sbin
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
MAIL=/var/spool/mail/tkloczko
SSH_TTY=/dev/pts/9
RPM_BUILD_NCPUS=48
RPM_PACKAGE_NAME=yubihsm-shell
RPM_BUILD_ROOT=/home/tkloczko/rpmbuild/BUILDROOT/yubihsm-shell-2.4.2-2.fc35.x86_64
OLDPWD=/home/tkloczko/rpmbuild/BUILD
BASH_FUNC_which%%=() {  ( alias;
 eval ${which_declare} ) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot $@
}
_=/usr/bin/env
/home/tkloczko/rpmbuild/BUILD/yubihsm-shell-2.4.2/pkcs11/tests/pkcs11test.sh: line 42: pkcs11test: command not found

5/5 Test #5: bash_tests .......................***Failed    0.02 sec
++ mktemp -d
+ TMPDIR=/tmp/tmp.17myi3IDw3
+ DATA=/tmp/tmp.17myi3IDw3/data
+ SIG=/tmp/tmp.17myi3IDw3/sig
+ BIN_SIG=/tmp/tmp.17myi3IDw3/bin_sig
+ PUBLIC_KEY=/tmp/tmp.17myi3IDw3/public
+ '[' -z ']'
+ DEFAULT_CONNECTOR_URL=http://localhost:12345
+ PROG='../yubihsm-shell --connector=http://localhost:12345'
++ uname
+ '[' xLinux = xFreeBSD ']'
+ DECODE='base64 --decode'
+ echo 'Hello World!'
++ ../yubihsm-shell --connector=http://localhost:12345 -a generate-asymmetric -A ecp256 -csign-ecdsa -p password
+ OUTPUT='Failed connecting '\''http://localhost:12345'\'': Unable to find a suitable connector
Not connected
Failed to open session'


60% tests passed, 2 tests failed out of 5

Total Test time (real) =   0.03 sec

The following tests FAILED:
          4 - pkcs11test (Failed)
          5 - bash_tests (Failed)
Errors while running CTest

@qpernil
Copy link
Contributor

qpernil commented Jan 22, 2024

It looks like you run this without a YubiHSM. The tests assume you have a YubiHSM connected and the yubihsm-connector running. Beware that the tests will create some keys on your device.

@kloczek
Copy link
Author

kloczek commented Jan 22, 2024

It looks like you run this without a YubiHSM. The tests assume you have a YubiHSM connected and the yubihsm-connector running. Beware that the tests will create some keys on your device.

Yes that is the case because it is production build system.
Is it any way to emulate that in software? 🤔

If some process needs to be running during test suite execution it should started as ctest session process (ctest will kill it automatically after finishing last unit execution).

@qpernil
Copy link
Contributor

qpernil commented Mar 8, 2024

Currently we don't have a publicly available emulator. The best advice right now might be to have a YubiHSM and the yubihsm-connector running on a machine reachable from the build environment, i.e. configured to accept incoming connections from other machines.

@kloczek
Copy link
Author

kloczek commented Mar 8, 2024

Could you provide more details about what needs to be done before start test suite to be able use those tools? 🤔

@qpernil
Copy link
Contributor

qpernil commented Mar 12, 2024

I would suggest having a yubihsm-connector with a yubihsm running in your local intranet, accessible from the Internet through a reverse proxy requiring https with client certificate. The curl backend supports supplying https certificate and key through yh_set_connector_option. With that setup all you need is to provide the certificate and key in your CI even if that is running outside your premises. It would also be possible to do this over a VPN.

@kloczek
Copy link
Author

kloczek commented Mar 12, 2024

Can all tat be accessible over localhost?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants