From 773a80429c09f2625b9cfb910b6dd1c0b1795614 Mon Sep 17 00:00:00 2001
From: Pawel Szewczyk
Date: Wed, 7 Jan 2015 11:21:56 +0100
Subject: [PATCH] libusbgx: tests: Remove negative buffer test
Size_t is unsigned and passing -1 as buffer length makes no sense.
Signed-off-by: Pawel Szewczyk
[Rebase and update description]
Signed-off-by: Krzysztof Opasiak
---
tests/test.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/tests/test.c b/tests/test.c
index 7fae1cb..c5a2918 100644
--- a/tests/test.c
+++ b/tests/test.c
@@ -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);
}
--
2.7.4