testing/drivers/hash: Add unaligned buffer size test#3517
Conversation
1bad704
|
Fixed "may be used uninitialized" warning/error from Xtensa compiler by force-initializing huge_block to NULL even though all code paths for huge_block assign it before reference. Pushed squashed commit. |
|
FYI: I restarted the CI Build to fix the Docker Image |
|
@pbarada Could you check this error? Thanks :-) |
I'd love to "fix" it, but how can huge_block be uninitialized? The compiler notes at line 913 that huge_block is forcibly initialized during declaration to NULL which makes any code path that gets to line 1081 have an initialized value for huge_block. |
Add hash testing of unaligned buffer sizes via multiple call to ioctl(CIOCCRYPT) in a single session with buffer sizes incrementally increasing from zero size to 255 (with monotoncially increasing byte value data) to force all sizes to be handled by cryptodev implementations. Signed-off-by: Peter Barada <peter.barada@gmail.com>
Fixed.
|
Add hash testing of unaligned buffer sizes via multiple call to ioctl(CIOCCRYPT) in a single session with buffer sizes incrementally increasing from zero size to 255 (with monotoncially increasing byte value data) to force all sizes to be handled by cryptodev implementations.
Summary
The Crypto API is silent on buffer size alignment and there is no testing that provides unaligned buffer sizes to ioctl(CIOCRYPT) in one session. This patch extends hash test utility (and adds Kconfig option to enable/disable) that starets with a zero-sized buffer passed to ioctl(CIOCCRYPT), then a one-byte buffer, then a two byt buffer and so on to stress the underlying cryptodev device's handling of unaligned buffers/sizes. The test continually increments the size of the buffer passed to ioctl(CIOCCRYPT) until its 255 bytes in length (causing underlying cryptodev to hash 32640 bytes of data). The data provided through all thes incrementally size increasing buffers is monotonically increassing bytes starting at 0x00.
Impact
Testing
Build Host:
Target:
Testing performed:
Runtime testing:
From target console: