libusbgx: tests: Remove negative buffer test
authorPawel Szewczyk <p.szewczyk@samsung.com>
Wed, 7 Jan 2015 10:21:56 +0000 (11:21 +0100)
committerKrzysztof Opasiak <k.opasiak@samsung.com>
Tue, 22 Dec 2015 20:44:57 +0000 (21:44 +0100)
Size_t is unsigned and passing -1 as buffer length makes no sense.

Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
[Rebase and update description]
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
tests/test.c

index 7fae1cb..c5a2918 100644 (file)
@@ -402,14 +402,6 @@ void test_cpy_gadget_name_fail(void **state)
                ret = usbg_cpy_gadget_name(g, name, 0);
                assert_int_equal(ret, USBG_ERROR_INVALID_PARAM);
 
-/*             It cause total crash of cmocka framework (SIGSEGV), commented
- *             temporarly to run other tests crrectly, fail test anyway.
- */
-/*             ret = usbg_cpy_gadget_name(g, name, -1);
- *             assert_int_equal(ret, USBG_ERROR_INVALID_PARAM);
- */
-               fail_msg("Negative buffer length error");
-
                ret = usbg_cpy_gadget_name(g, NULL, USBG_MAX_NAME_LENGTH);
                assert_int_equal(ret, USBG_ERROR_INVALID_PARAM);
        }