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

Add tests for pkcs#11 3.0 #475

Merged
merged 5 commits into from
Mar 28, 2023

Conversation

ZoltanFridrich
Copy link
Contributor

@ZoltanFridrich ZoltanFridrich commented Mar 21, 2023

Adds pkcs#11 3.0 tests into log, rpc and transport tests.

@coveralls
Copy link

coveralls commented Mar 21, 2023

Coverage Status

Coverage: 70.535% (+1.6%) from 68.922% when pulling 86daf3a on ZoltanFridrich:zfridric_devel5 into 47f2df8 on p11-glue:master.

#include <string.h>

static CK_FUNCTION_LIST_PTR
setup_mock_module (CK_SESSION_HANDLE *session)

Check notice

Code scanning / CodeQL

Unused static function

Static function setup_mock_module is unreachable
p11-kit/test-log3.c Fixed Show fixed Hide fixed
}

static void
teardown_mock_module (CK_FUNCTION_LIST_PTR module)

Check notice

Code scanning / CodeQL

Unused static function

Static function teardown_mock_module is unreachable
p11-kit/test-rpc3.c Fixed Show fixed Hide fixed
p11-kit/test-rpc3.c Fixed Show fixed Hide fixed
p11-kit/test-rpc3.c Fixed Show fixed Hide fixed
p11-kit/test-transport3.c Fixed Show fixed Hide fixed
p11-kit/test-transport3.c Fixed Show fixed Hide fixed
p11-kit/test-transport3.c Fixed Show fixed Hide fixed
p11-kit/test-transport3.c Fixed Show fixed Hide fixed
@ZoltanFridrich ZoltanFridrich self-assigned this Mar 21, 2023
p11-kit/test-rpc3.c Outdated Show resolved Hide resolved
p11-kit/test-rpc3.c Outdated Show resolved Hide resolved
p11-kit/test-rpc3.c Outdated Show resolved Hide resolved
p11-kit/test-log3.c Outdated Show resolved Hide resolved
}

/* Bring in all the mock module tests */
#include "test-mock.c"

Check notice

Code scanning / CodeQL

Include header files only

The #include pre-processor directive should only be used to include header files.
p11-kit/test-rpc3.c Fixed Show fixed Hide fixed
@ZoltanFridrich ZoltanFridrich force-pushed the zfridric_devel5 branch 5 times, most recently from 74c19aa to 15eaa58 Compare March 22, 2023 13:00
test_mechanism_value (void)
{
p11_buffer buffer;
CK_MECHANISM_TYPE *mechanisms;

Check notice

Code scanning / CodeQL

Local variable hides global variable

Local variable mechanisms hides a [global variable](1) with the same name.
p11_buffer_uninit (&buffer);
}

#include "test-mock.c"

Check notice

Code scanning / CodeQL

Include header files only

The #include pre-processor directive should only be used to include header files.
p11-kit/test-rpc-message.c Fixed Show fixed Hide fixed
p11-kit/test-rpc-message.c Fixed Show fixed Hide fixed
p11-kit/test-rpc-message.c Fixed Show fixed Hide fixed
p11-kit/test-rpc-message.c Fixed Show fixed Hide fixed
p11-kit/test-rpc-message.c Fixed Show fixed Hide fixed
p11-kit/test-rpc-message.c Fixed Show fixed Hide fixed
p11-kit/test-rpc-message.c Fixed Show fixed Hide fixed
p11-kit/test-rpc-message.c Fixed Show fixed Hide fixed
p11-kit/test-transport3.c Outdated Show resolved Hide resolved
p11-kit/test-transport3.c Fixed Show fixed Hide fixed

static const CK_VERSION test_version_three = {CRYPTOKI_VERSION_MAJOR, CRYPTOKI_VERSION_MINOR};

#include "test-transport-base.c"

Check notice

Code scanning / CodeQL

Include header files only

The #include pre-processor directive should only be used to include header files.
}

static void
teardown_mock_module (CK_FUNCTION_LIST *module)

Check notice

Code scanning / CodeQL

Unused static function

Static function teardown_mock_module is unreachable

return p11_test_run (argc, argv);
}
#include "test-transport-base.c"

Check notice

Code scanning / CodeQL

Include header files only

The #include pre-processor directive should only be used to include header files.
}

static CK_FUNCTION_LIST *
setup_mock_module (CK_SESSION_HANDLE *session)

Check notice

Code scanning / CodeQL

Unused static function

Static function setup_mock_module is unreachable

#endif /* OS_UNIX */

#include "test-mock.c"

Check notice

Code scanning / CodeQL

Include header files only

The #include pre-processor directive should only be used to include header files.
@ZoltanFridrich ZoltanFridrich merged commit 66e8c9e into p11-glue:master Mar 28, 2023
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.

3 participants