summaryrefslogtreecommitdiff
path: root/test-str.c
AgeCommit message (Collapse)Author
2021-03-22Make 'make test' work on gcc 4.8.5Peter Jones
2021-03-15Nerf an unnecessary string test on arm.Peter Jones
Steve McIntyre reports: <Sledge> yay, arm64 string test fail <Sledge> testing gnuefi_signed_strncmp <Sledge> test_strncmp:713:got 128, expected < 0 <Sledge> test_strncmp:713:Assertion `(gnuefi_signed_strncmp("sbat\314\234\014,", "sbat\314\034\014,", 9)) >= 0' failed. <Sledge> gnuefi_signed_strncmp failed <Sledge> looking at that code, this is a test to check how broken the gnuefi strncmp is, yes? <Sledge> and we're not actually using this implementation in shim AFAICS? That is a correct understanding, and as such this patch just removes that test from running on Arm platforms, where it is still too broken to even do this much. Signed-off-by: Peter Jones <pjones@redhat.com>
2021-03-10Add more string test cases.Peter Jones
This adds test cases for the rest of our ASCII string functions. While doing so, it fixes two minor bugs: - strcasecmp() now handles utf8 correctly - strncpy() no longer does the stpncpy() behavior of clearing leftover buffer Signed-off-by: Peter Jones <pjones@redhat.com>
2021-03-10Test our strncmp vs known failing ones as wellPeter Jones
Signed-off-by: Peter Jones <pjones@redhat.com>
2021-03-10Add some test cases, and make "make test" actually work.Peter Jones
Note the one test case I'm not 100% sure about. Someone let me know. Signed-off-by: Peter Jones <pjones@redhat.com>
2021-02-25Add a tester for our string functions.Peter Jones
Note that building and running this test does not quite work yet /on this branch/. In order to do that, we need some cleanups and reorganizing that I don't want to push just yet, which can be found on https://github.com/rhboot/shim/tree/test-reorg Signed-off-by: Peter Jones <pjones@redhat.com>