unit/zap: add MT_MATCH_CASE mixed-case test#18638
Conversation
a85e716 to
e996a60
Compare
|
These are my tests for (Incidentally, this was the reason I started putting all this test stuff together - I started looking at #7633 and traced it into the ZAP guts, and had no confidence about changing anything without breaking something else). @chrislongros similar question to #18639 - do you want to go first and I'll follow, or combine them, or something else? |
The mock functions you introduce are the right direction! Go ahead and I'll follow. |
|
@chrislongros thank you! #18654 posted. |
|
@chrislongros the path is clear! |
New case-normalization test to cover the exact-case path. On a TOUPPER ZAP, MT_NORMALIZE | MT_MATCH_CASE matches only the stored casing, while an MT_NORMALIZE lookup matches any case. Signed-off-by: Christos Longros <chris.longros@gmail.com>
e996a60 to
7e7a278
Compare
robn
left a comment
There was a problem hiding this comment.
This looks great, thanks.
Turns out that U8_TEXTPREP_TOUPPER is actually valid for the Unicode normalization forms too, and MT_MATCH_CASE also defangs that. I don't think its worth adding that here unless you especially wanted to; it's already kind of unclear what any of this means for ZFS proper (vs u8_textprep itself). I'll be down that way soon, I think.
behlendorf
left a comment
There was a problem hiding this comment.
Looks good. Sorry about the delay in taking another look at this.
Motivation and Context
Adds
MT_MATCH_CASEcoverage forMT_NORMALIZElookups that miss from #18654Description
Adds
test_norm_match_case, run against a normalizing microzap and fatzap.MT_NORMALIZE: a differently-cased name matches.MT_NORMALIZE | MT_MATCH_CASE: only the stored casing matches; differently-cased name does not.How Has This Been Tested?
Built
tests/unit/test_zapand ran the suite:Types of changes
Checklist:
Signed-off-by.