Bug 466854 - 2.3.5: test suite is failing in `Hashing` unit
Summary: 2.3.5: test suite is failing in `Hashing` unit
Status: RESOLVED WORKSFORME
Alias: None
Product: qca
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 2.3.5
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-04 22:30 UTC by kloczek
Modified: 2023-04-07 03:45 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kloczek 2023-03-04 22:30:39 UTC
SOFTWARE/OS VERSIONS
Linux: x86/64 
Qt Version: 5.14.8

Looks lie test suite is failing in  `Hashing` unit

+ cd qca-2.3.5
+ /usr/bin/ctest --test-dir x86_64-redhat-linux-gnu --output-on-failure --force-new-ctest-process -j48
Internal ctest changing into directory: /home/tkloczko/rpmbuild/BUILD/qca-2.3.5/x86_64-redhat-linux-gnu
Test project /home/tkloczko/rpmbuild/BUILD/qca-2.3.5/x86_64-redhat-linux-gnu
      Start  1: Base64
      Start  2: BigInteger
      Start  3: Certificate
      Start  4: SymmetricCipher
      Start  5: ClientSidePlugin
      Start  6: DigitalSignatureAlgorithm
      Start  7: FileWatch
      Start  8: Hashing
      Start  9: HexadecimalConversion
      Start 10: KeyDerivationFunction
      Start 11: KeyBundle
      Start 12: KeyGeneration
      Start 13: KeyLength
      Start 14: KeyStore
      Start 15: Logger
      Start 16: MessageAuthenticationCode
      Start 17: MetaTypeUnittest
      Start 18: PGP
      Start 19: PublicKeyInfrastructure
      Start 20: RSA
      Start 21: SecureArray
      Start 22: StaticFunctions
      Start 23: SymmetricKey
      Start 24: TransportLayerSecurity
      Start 25: CryptographicMessageSyntax
 1/25 Test  #1: Base64 ...........................   Passed    0.04 sec
 2/25 Test  #3: Certificate ......................   Passed    0.04 sec
 3/25 Test  #4: SymmetricCipher ..................   Passed    0.04 sec
 4/25 Test  #5: ClientSidePlugin .................   Passed    0.04 sec
 5/25 Test  #6: DigitalSignatureAlgorithm ........   Passed    0.03 sec
 6/25 Test  #9: HexadecimalConversion ............   Passed    0.03 sec
 7/25 Test #10: KeyDerivationFunction ............   Passed    0.03 sec
 8/25 Test #11: KeyBundle ........................   Passed    0.03 sec
 9/25 Test #12: KeyGeneration ....................   Passed    0.03 sec
10/25 Test #13: KeyLength ........................   Passed    0.02 sec
11/25 Test #14: KeyStore .........................   Passed    0.02 sec
12/25 Test #15: Logger ...........................   Passed    0.02 sec
13/25 Test #16: MessageAuthenticationCode ........   Passed    0.02 sec
14/25 Test #17: MetaTypeUnittest .................   Passed    0.02 sec
15/25 Test #18: PGP ..............................   Passed    0.02 sec
16/25 Test #19: PublicKeyInfrastructure ..........   Passed    0.02 sec
17/25 Test #20: RSA ..............................   Passed    0.01 sec
18/25 Test #21: SecureArray ......................   Passed    0.01 sec
19/25 Test #22: StaticFunctions ..................   Passed    0.01 sec
20/25 Test #23: SymmetricKey .....................   Passed    0.01 sec
21/25 Test #24: TransportLayerSecurity ...........   Passed    0.01 sec
22/25 Test #25: CryptographicMessageSyntax .......   Passed    0.01 sec
23/25 Test  #8: Hashing ..........................Subprocess aborted***Exception:   0.11 sec
********* Start testing of HashUnitTest *********
Config: Using QtTest library 5.15.8, Qt 5.15.8 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 13.0.1 20230221 (Red Hat 13.0.1-0)), fedora 39
PASS   : HashUnitTest::initTestCase()
QWARN  : HashUnitTest::md2test(md2()) NONE of the providers supports MD2: ("default")
PASS   : HashUnitTest::md2test(md2())
QWARN  : HashUnitTest::md2test(md2(a)) NONE of the providers supports MD2: ("default")
PASS   : HashUnitTest::md2test(md2(a))
QWARN  : HashUnitTest::md2test(md2(abc)) NONE of the providers supports MD2: ("default")
PASS   : HashUnitTest::md2test(md2(abc))
QWARN  : HashUnitTest::md2test(md2(messageDigest)) NONE of the providers supports MD2: ("default")
PASS   : HashUnitTest::md2test(md2(messageDigest))
QWARN  : HashUnitTest::md2test(md2([a-z])) NONE of the providers supports MD2: ("default")
PASS   : HashUnitTest::md2test(md2([a-z]))
QWARN  : HashUnitTest::md2test(md2([A-z,0-9])) NONE of the providers supports MD2: ("default")
PASS   : HashUnitTest::md2test(md2([A-z,0-9]))
QWARN  : HashUnitTest::md2test(md2(nums)) NONE of the providers supports MD2: ("default")
PASS   : HashUnitTest::md2test(md2(nums))
QWARN  : HashUnitTest::md4test(md4()) NONE of the providers supports MD4: ("default")
PASS   : HashUnitTest::md4test(md4())
QWARN  : HashUnitTest::md4test(md4(a)) NONE of the providers supports MD4: ("default")
PASS   : HashUnitTest::md4test(md4(a))
QWARN  : HashUnitTest::md4test(md4(abc)) NONE of the providers supports MD4: ("default")
PASS   : HashUnitTest::md4test(md4(abc))
QWARN  : HashUnitTest::md4test(md4(messageDigest)) NONE of the providers supports MD4: ("default")
PASS   : HashUnitTest::md4test(md4(messageDigest))
QWARN  : HashUnitTest::md4test(md4([a-z])) NONE of the providers supports MD4: ("default")
PASS   : HashUnitTest::md4test(md4([a-z]))
QWARN  : HashUnitTest::md4test(md4([A-z,0-9])) NONE of the providers supports MD4: ("default")
PASS   : HashUnitTest::md4test(md4([A-z,0-9]))
QWARN  : HashUnitTest::md4test(md4(nums)) NONE of the providers supports MD4: ("default")
PASS   : HashUnitTest::md4test(md4(nums))
PASS   : HashUnitTest::md5test(md5())
PASS   : HashUnitTest::md5test(md5(a))
PASS   : HashUnitTest::md5test(md5(abc))
PASS   : HashUnitTest::md5test(md5(messageDigest))
PASS   : HashUnitTest::md5test(md5([a-z]))
PASS   : HashUnitTest::md5test(md5([A-z,0-9]))
PASS   : HashUnitTest::md5test(md5(nums))
PASS   : HashUnitTest::md5filetest()
QWARN  : HashUnitTest::sha0test(sha0(abc)) NONE of the providers supports SHA0: ("default")
PASS   : HashUnitTest::sha0test(sha0(abc))
QWARN  : HashUnitTest::sha0test(sha0(abc)) NONE of the providers supports SHA0: ("default")
PASS   : HashUnitTest::sha0test(sha0(abc))
PASS   : HashUnitTest::sha0longtest()
PASS   : HashUnitTest::sha1test(sha1(abc))
PASS   : HashUnitTest::sha1test(sha1(a-q))
PASS   : HashUnitTest::sha1test(sha1())
PASS   : HashUnitTest::sha1test(sha1(a))
PASS   : HashUnitTest::sha1test(sha1(a-z))
PASS   : HashUnitTest::sha1longtest()
QWARN  : HashUnitTest::sha224test(sha224(abc)) NONE of the providers supports SHA224: ("default")
PASS   : HashUnitTest::sha224test(sha224(abc))
QWARN  : HashUnitTest::sha224test(sha224(aq)) NONE of the providers supports SHA224: ("default")
PASS   : HashUnitTest::sha224test(sha224(aq))
PASS   : HashUnitTest::sha224longtest()
QWARN  : HashUnitTest::sha256test(sha256(abc)) NONE of the providers supports SHA256: ("default")
PASS   : HashUnitTest::sha256test(sha256(abc))
QWARN  : HashUnitTest::sha256test(sha256(abc)) NONE of the providers supports SHA256: ("default")
PASS   : HashUnitTest::sha256test(sha256(abc))
PASS   : HashUnitTest::sha256longtest()
QWARN  : HashUnitTest::sha384test(sha384(abc)) NONE of the providers supports SHA384: ("default")
PASS   : HashUnitTest::sha384test(sha384(abc))
QWARN  : HashUnitTest::sha384test(sha384(a-u)) NONE of the providers supports SHA384: ("default")
PASS   : HashUnitTest::sha384test(sha384(a-u))
QWARN  : HashUnitTest::sha384test(sha384(a-q)) NONE of the providers supports SHA384: ("default")
PASS   : HashUnitTest::sha384test(sha384(a-q))

=== Received signal at function time: 0ms, total time: 5ms, dumping stack ===
=== End of stack trace ===
QFATAL : HashUnitTest::sha384longtest() Received signal 11
         Function time: 0ms Total time: 5ms
FAIL!  : HashUnitTest::sha384longtest() Received a fatal error.
   Loc: [Unknown file(0)]
Totals: 41 passed, 1 failed, 0 skipped, 0 blacklisted, 7ms
********* Finished testing of HashUnitTest *********

24/25 Test  #2: BigInteger .......................   Passed    0.12 sec
25/25 Test  #7: FileWatch ........................   Passed    8.22 sec

96% tests passed, 1 tests failed out of 25

Total Test time (real) =   8.23 sec

The following tests FAILED:
          8 - Hashing (Subprocess aborted)
Errors while running CTest
Comment 1 Brad Hards 2023-03-05 04:26:25 UTC
Do you expect that your providers actually do support those hashing algorithms? Which provider(s) are you testing, and what configuration were the backends built with?
Comment 2 kloczek 2023-03-05 09:11:07 UTC
(In reply to Brad Hards from comment #1)
> Do you expect that your providers actually do support those hashing
> algorithms? Which provider(s) are you testing, and what configuration were
> the backends built with?

I'm only reporting issue. I have no idea what is behind that issue.
If you want me to diagnose something or you need more details please let me know what you need.
Comment 3 Brad Hards 2023-03-06 06:48:55 UTC
I'm sorry if you misinterpreted my comments. Please understand that you aren't really describing your situation, configuration or test environment in detail, and we need to understand those in order to work out if there is a problem, and if so, what the problem is.

I really do want to know what providers (the backend implementations that QCA uses, and is testing in that test) you are using / have compiled. The capabilities of QCA depend on the functionality in the library that is wrapped by the provider.  Please tell me what library is.

It looks like this is some redhat variant - I'm not familiar with the crypto policies on any of those. Is it possible that your libraries (say OpenSSL) are built without any support for the failing hash algorithms? Can you test if those specific algorithms work with the libraries independent of QCA (e.g. using openssl command line tools)?
Comment 4 kloczek 2023-03-06 09:22:21 UTC
I'm building qca with qt 5.15.8 (if it is what you've been asking for)

%cmake \
        -D BUILD_TESTS=ON \
        -D QCA_INSTALL_IN_QT_PREFIX=ON \
        -D QCA_MAN_INSTALL_DIR=%{_mandir} \
        -D WITH_botan_PLUGIN=ON \
        %{nil}

List od build requires installed in build env

BuildRequires:  cmake(Qt5Core)  >= 5.14
BuildRequires:  cmake(Qt5Test)  >= 5.14
BuildRequires:  gcc-c++
BuildRequires:  libgcrypt-devel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(botan-2)
BuildRequires:  pkgconfig(libcrypto)
BuildRequires:  pkgconfig(libpkcs11-helper-1)
BuildRequires:  pkgconfig(libsasl2)
BuildRequires:  pkgconfig(libssl)
Comment 5 Brad Hards 2023-03-06 09:35:23 UTC
OK, so for each of those providers (botan, openssl, gcrypt), does the build configuration on your machine support the hash algorithms that are being tested?
Comment 6 kloczek 2023-03-08 05:22:50 UTC
How can I check tat?
Comment 7 Brad Hards 2023-03-08 05:39:24 UTC
You can check how these modules are built on your system - it is system dependent, and you haven't described your configuration, so its hard to be specific.

Possibly you can write code against the specific library (i.e. not using the QCA abstraction), or use the installed version of compatible command line tools. For example, on openssl, you can use something like `openssl list -digest-algorithms`. However be very careful that the version you are testing matches the version you are building QCA against (i.e. not the system version).

If that doesn't make sense, maybe we need to go back a stage, and you can describe why you are trying to rebuild QCA (not how you are trying to do it, but instead what the high level goal is). At this stage, I think the most likely problem is a configuration issue (i.e. something is inconsistent) rather than a bug in QCA itself. However we can't see your screen, so you need to provide a lot more detail than is currently disclosed.
Comment 8 Bug Janitor Service 2023-03-23 03:45:41 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 9 Bug Janitor Service 2023-04-07 03:45:38 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!