Skip to content

Commit

Permalink
FIX: encoding test failure with partial kyber support
Browse files Browse the repository at this point in the history
When either kyber or kyber_90s was disabled at build time we caused a test failure.
  • Loading branch information
reneme committed May 31, 2022
1 parent 8692b5f commit da1d605
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/tests/test_kyber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,22 @@ class Kyber_Encoding_Test : public Text_Based_Test
}

public:
bool skip_this_test(const std::string &algo_name, const VarMap &) override
{
const auto mode = name_to_mode(algo_name);
#if !defined(BOTAN_HAS_KYBER)
if(!mode.is_90s())
return true;
#endif
#if !defined(BOTAN_HAS_KYBER_90S)
if(mode.is_90s())
return true;
#endif

BOTAN_UNUSED(algo_name, mode);
return false;
}

Test::Result run_one_test(const std::string& algo_name, const VarMap& vars) override
{
Test::Result result("kyber_encodings");
Expand Down

0 comments on commit da1d605

Please sign in to comment.