summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/nci
AgeCommit message (Collapse)AuthorFilesLines
2021-09-16selftests: nci: replace unsigned int with intXiang wangx1-1/+1
Should not use comparison of unsigned expressions < 0. Signed-off-by: Xiang wangx <wangxiang@cdjrlc.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-18selftests: nci: Add the NCI testcase reading T4T TagBongsu Jeon1-5/+287
Add the NCI testcase reading T4T Tag that has NFC TEST in plain text. the virtual device application acts as T4T Tag in this testcase. Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-18selftests: nci: Extract the start/stop discovery functionBongsu Jeon1-15/+38
To reuse the start/stop discovery code in other testcase, extract the code. Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-18selftests: nci: Add the flags parameter for the send_cmd_mt_nlaBongsu Jeon1-8/+8
To reuse the send_cmd_mt_nla for NLM_F_REQUEST and NLM_F_DUMP flag, add the flags parameter to the function. Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-18selftests: nci: Fix the wrong conditionBongsu Jeon1-1/+1
memcpy should be executed only in case nla_len's value is greater than 0. Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-18selftests: nci: Fix the code for next nlattr offsetBongsu Jeon1-2/+2
nlattr could have a padding for 4 bytes alignment. So next nla's offset should be calculated with a padding. Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-18selftests: nci: Fix the typoBongsu Jeon1-12/+12
Fix typo: rep_len -> resp_len Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-18selftests: nci: Remove the polling code to read a NCI frameBongsu Jeon1-22/+11
Because the virtual NCI device uses Wait Queue, the virtual device application doesn't need to poll the NCI frame. Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-05-20selftests: Add .gitignore for nci test suiteDavid Matlack1-0/+1
Building the nci test suite produces a binary, nci_dev, that git then tries to track. Add a .gitignore file to tell git to ignore this binary. Signed-off-by: David Matlack <dmatlack@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-01-30selftests: Add nci suiteBongsu Jeon3-0/+608
This is the NCI test suite. It tests the NFC/NCI module using virtual NCI device. Test cases consist of making the virtual NCI device on/off and controlling the device's polling for NCI1.0 and NCI2.0 version. Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>