lkml.org 
[lkml]   [2022]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] crypto: tcrypt - fix return value for multiple subtests
From
On 9/30/2022 2:40 PM, Robert Elliott wrote:
> When a test mode invokes multiple tests (e.g., mode 0 invokes modes
> 1 through 199, and mode 3 tests three block cipher modes with des),
> don't keep accumulating the return values with ret += tcrypt_test(),
> which results in a bogus value if more than one report a nonzero
> value (e.g., two reporting -2 (-ENOENT) end up reporting -4 (-EINTR)).
> Instead, keep track of the minimum return value reported by any
> subtest.

I am assuming this is for the case when fips_enabled is true?

I agree that returning the cumulative sum or errors isn't particularly
useful, but how is returning the minimum error value useful? Wouldn't it
be more useful to return the first error return?

Ani

\
 
 \ /
  Last update: 2022-10-01 00:10    [W:0.088 / U:2.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site