SMB Map Error

1 Minor Suggestions

1.1 [PATCH 1/2] cifs: Label SMB2 statuses with errors

Hi David,

Did you use a script to update these macros? If so, could you put it in the commit message? I’m concerned that manual edits might introduce typos.

Just like the shell commands I used in this patch: [PATCH 06/30] smb/client: add parentheses to NT error code definitions containing bitwise OR operator

Of course, your changes would require a more complex script.

1.2 [PATCH 2/2] cifs: Autogenerate SMB2 error mapping table

Hi David,

STATUS_SUCCESS and STATUS_WAIT_0 are both zero, and since zero indicates success, they are not needed.

The following status codes have duplicate values. We should update the status strings to make the log messages more explicit, as done in my patch: [PATCH v4 09/10] smb/client: update some SMB2 status strings.

2 Patches to Be Tested

David Howells’s patches;

ChenXiaoSong’s patches;

3 KUnit Test Results

Build the kernel with CONFIG_SMB_KUNIT_TESTS enabled.

After running modprobe cifs, test results are as follows:

[   18.929796] Key type cifs.spnego registered
[   18.931004] Key type cifs.idmap registered
[   18.932162] KTAP version 1
[   18.932963] 1..1
[   18.933845]     KTAP version 1
[   18.934734]     # Subtest: smb2_maperror
[   18.935817]     # module: cifs
[   18.935819]     1..2
[   18.937479]     ok 1 maperror_test_check_sort
[   18.937951]     ok 2 maperror_test_check_search
[   18.939158] # smb2_maperror: pass:2 fail:0 skip:0 total:2
[   18.940408] # Totals: pass:2 fail:0 skip:0 total:2
[   18.941897] ok 1 smb2_maperror

All KUnit test cases passed!