Skip to content

added config validation and config tests#6

Merged
lucagiac81 merged 3 commits into
mainfrom
config_valdation
Mar 21, 2025
Merged

added config validation and config tests#6
lucagiac81 merged 3 commits into
mainfrom
config_valdation

Conversation

@akankshakoul-dev
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread config/config.h Outdated
Comment thread config/config_reader.cpp Outdated
using namespace std;

bool ConfigReader::GetValue(std::string tag, int& value) {
bool ConfigReader::GetValue(std::string tag, int& value, int maxValue,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style comment. In the rest of the code, variables and parameters are snake-case (max_value). Also applies to min_value and ret_val.

Comment thread config/config_reader.cpp Outdated
Comment thread tests/zlib_accel_test.cpp
Comment thread tests/zlib_accel_test.cpp
@lucagiac81 lucagiac81 merged commit 89c17f7 into main Mar 21, 2025
@lucagiac81
Copy link
Copy Markdown
Contributor

All tests pass with recently released QATzip v1.3.0

@lucagiac81 lucagiac81 deleted the config_valdation branch March 21, 2025 22:05
asonje added a commit to asonje/zlib-accel that referenced this pull request May 4, 2026
Add IAAFallbackIGZIPTest with three tests exercising the fallback
path for both deflate and inflate:

  - DeflateUsesIGZIPWhenIAAFailsAndFallbackEnabled: configures
    USE_IAA_COMPRESS+USE_IGZIP_COMPRESS+IAA_FALLBACK_IGZIP=1 and
    asserts the stream lands on IGZIP (or IAA if hardware present).

  - DeflateDoesNotUseIGZIPWhenFallbackDisabled: same IAA+IGZIP config
    but IAA_FALLBACK_IGZIP=0; asserts IGZIP is never selected.

  - InflateUsesIGZIPWhenIAAFailsAndFallbackEnabled: data compressed
    with IGZIP, decompressed via USE_IAA_UNCOMPRESS+IAA_FALLBACK_IGZIP=1;
    asserts round-trip correctness and IGZIP (or IAA) execution path.

On machines without IAA hardware the QPL init fails (non-zero return),
which naturally exercises the fallback branch without mocking. On
machines that do have IAA hardware and succeed, the assertions accept
either IAA or IGZIP so the tests remain valid in both environments.

Tests are guarded by #ifdef USE_IAA and #ifdef USE_IGZIP (both are
in scope here via the outer USE_IGZIP guard around the regression
block).

Addresses should-fix intel#6 from PR intel#54 review (matt-welch).

Signed-off-by: Olasoji <olasoji.denloye@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants