VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   57 Tags
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700   1) #include <linux/init.h>
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700   2) #include <linux/kernel.h>
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700   3) #include <linux/module.h>
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700   4) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700   5) #define for_each_test(i, test)	\
129965a916a8b (Fabian Frederick 2014-08-06 16:09:33 -0700   6) 	for (i = 0; i < ARRAY_SIZE(test); i++)
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700   7) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700   8) struct test_fail {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700   9) 	const char *str;
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  10) 	unsigned int base;
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  11) };
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  12) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  13) #define DEFINE_TEST_FAIL(test)	\
26d7b99b83529 (Uwe Kleine-König 2012-05-29 15:07:31 -0700  14) 	const struct test_fail test[] __initconst
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  15) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  16) #define DECLARE_TEST_OK(type, test_type)	\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  17) 	test_type {				\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  18) 		const char *str;		\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  19) 		unsigned int base;		\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  20) 		type expected_res;		\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  21) 	}
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  22) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  23) #define DEFINE_TEST_OK(type, test)	\
26d7b99b83529 (Uwe Kleine-König 2012-05-29 15:07:31 -0700  24) 	const type test[] __initconst
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  25) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  26) #define TEST_FAIL(fn, type, fmt, test)					\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  27) {									\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  28) 	unsigned int i;							\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  29) 									\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  30) 	for_each_test(i, test) {					\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  31) 		const struct test_fail *t = &test[i];			\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  32) 		type tmp;						\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  33) 		int rv;							\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  34) 									\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  35) 		tmp = 0;						\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  36) 		rv = fn(t->str, t->base, &tmp);				\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  37) 		if (rv >= 0) {						\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  38) 			WARN(1, "str '%s', base %u, expected -E, got %d/" fmt "\n",	\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  39) 				t->str, t->base, rv, tmp);		\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  40) 			continue;					\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  41) 		}							\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  42) 	}								\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  43) }
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  44) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  45) #define TEST_OK(fn, type, fmt, test)					\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  46) {									\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  47) 	unsigned int i;							\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  48) 									\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  49) 	for_each_test(i, test) {					\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  50) 		const typeof(test[0]) *t = &test[i];			\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  51) 		type res;						\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  52) 		int rv;							\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  53) 									\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  54) 		rv = fn(t->str, t->base, &res);				\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  55) 		if (rv != 0) {						\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  56) 			WARN(1, "str '%s', base %u, expected 0/" fmt ", got %d\n",	\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  57) 				t->str, t->base, t->expected_res, rv);	\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  58) 			continue;					\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  59) 		}							\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  60) 		if (res != t->expected_res) {				\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  61) 			WARN(1, "str '%s', base %u, expected " fmt ", got " fmt "\n",	\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  62) 				t->str, t->base, t->expected_res, res);	\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  63) 			continue;					\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  64) 		}							\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  65) 	}								\
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  66) }
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  67) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  68) static void __init test_kstrtoull_ok(void)
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  69) {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  70) 	DECLARE_TEST_OK(unsigned long long, struct test_ull);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  71) 	static DEFINE_TEST_OK(struct test_ull, test_ull_ok) = {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  72) 		{"0",	10,	0ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  73) 		{"1",	10,	1ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  74) 		{"127",	10,	127ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  75) 		{"128",	10,	128ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  76) 		{"129",	10,	129ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  77) 		{"255",	10,	255ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  78) 		{"256",	10,	256ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  79) 		{"257",	10,	257ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  80) 		{"32767",	10,	32767ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  81) 		{"32768",	10,	32768ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  82) 		{"32769",	10,	32769ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  83) 		{"65535",	10,	65535ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  84) 		{"65536",	10,	65536ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  85) 		{"65537",	10,	65537ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  86) 		{"2147483647",	10,	2147483647ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  87) 		{"2147483648",	10,	2147483648ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  88) 		{"2147483649",	10,	2147483649ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  89) 		{"4294967295",	10,	4294967295ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  90) 		{"4294967296",	10,	4294967296ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  91) 		{"4294967297",	10,	4294967297ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  92) 		{"9223372036854775807",	10,	9223372036854775807ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  93) 		{"9223372036854775808",	10,	9223372036854775808ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  94) 		{"9223372036854775809",	10,	9223372036854775809ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  95) 		{"18446744073709551614",	10,	18446744073709551614ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  96) 		{"18446744073709551615",	10,	18446744073709551615ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  97) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  98) 		{"00",		8,	00ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700  99) 		{"01",		8,	01ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 100) 		{"0177",	8,	0177ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 101) 		{"0200",	8,	0200ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 102) 		{"0201",	8,	0201ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 103) 		{"0377",	8,	0377ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 104) 		{"0400",	8,	0400ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 105) 		{"0401",	8,	0401ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 106) 		{"077777",	8,	077777ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 107) 		{"0100000",	8,	0100000ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 108) 		{"0100001",	8,	0100001ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 109) 		{"0177777",	8,	0177777ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 110) 		{"0200000",	8,	0200000ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 111) 		{"0200001",	8,	0200001ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 112) 		{"017777777777",	8,	017777777777ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 113) 		{"020000000000",	8,	020000000000ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 114) 		{"020000000001",	8,	020000000001ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 115) 		{"037777777777",	8,	037777777777ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 116) 		{"040000000000",	8,	040000000000ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 117) 		{"040000000001",	8,	040000000001ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 118) 		{"0777777777777777777777",	8,	0777777777777777777777ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 119) 		{"01000000000000000000000",	8,	01000000000000000000000ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 120) 		{"01000000000000000000001",	8,	01000000000000000000001ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 121) 		{"01777777777777777777776",	8,	01777777777777777777776ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 122) 		{"01777777777777777777777",	8,	01777777777777777777777ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 123) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 124) 		{"0x0",		16,	0x0ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 125) 		{"0x1",		16,	0x1ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 126) 		{"0x7f",	16,	0x7fULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 127) 		{"0x80",	16,	0x80ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 128) 		{"0x81",	16,	0x81ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 129) 		{"0xff",	16,	0xffULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 130) 		{"0x100",	16,	0x100ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 131) 		{"0x101",	16,	0x101ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 132) 		{"0x7fff",	16,	0x7fffULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 133) 		{"0x8000",	16,	0x8000ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 134) 		{"0x8001",	16,	0x8001ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 135) 		{"0xffff",	16,	0xffffULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 136) 		{"0x10000",	16,	0x10000ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 137) 		{"0x10001",	16,	0x10001ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 138) 		{"0x7fffffff",	16,	0x7fffffffULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 139) 		{"0x80000000",	16,	0x80000000ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 140) 		{"0x80000001",	16,	0x80000001ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 141) 		{"0xffffffff",	16,	0xffffffffULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 142) 		{"0x100000000",	16,	0x100000000ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 143) 		{"0x100000001",	16,	0x100000001ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 144) 		{"0x7fffffffffffffff",	16,	0x7fffffffffffffffULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 145) 		{"0x8000000000000000",	16,	0x8000000000000000ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 146) 		{"0x8000000000000001",	16,	0x8000000000000001ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 147) 		{"0xfffffffffffffffe",	16,	0xfffffffffffffffeULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 148) 		{"0xffffffffffffffff",	16,	0xffffffffffffffffULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 149) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 150) 		{"0\n",	0,	0ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 151) 	};
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 152) 	TEST_OK(kstrtoull, unsigned long long, "%llu", test_ull_ok);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 153) }
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 154) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 155) static void __init test_kstrtoull_fail(void)
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 156) {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 157) 	static DEFINE_TEST_FAIL(test_ull_fail) = {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 158) 		{"",	0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 159) 		{"",	8},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 160) 		{"",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 161) 		{"",	16},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 162) 		{"\n",	0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 163) 		{"\n",	8},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 164) 		{"\n",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 165) 		{"\n",	16},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 166) 		{"\n0",	0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 167) 		{"\n0",	8},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 168) 		{"\n0",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 169) 		{"\n0",	16},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 170) 		{"+",	0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 171) 		{"+",	8},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 172) 		{"+",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 173) 		{"+",	16},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 174) 		{"-",	0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 175) 		{"-",	8},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 176) 		{"-",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 177) 		{"-",	16},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 178) 		{"0x",	0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 179) 		{"0x",	16},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 180) 		{"0X",	0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 181) 		{"0X",	16},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 182) 		{"0 ",	0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 183) 		{"1+",	0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 184) 		{"1-",	0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 185) 		{" 2",	0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 186) 		/* base autodetection */
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 187) 		{"0x0z",	0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 188) 		{"0z",		0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 189) 		{"a",		0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 190) 		/* digit >= base */
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 191) 		{"2",	2},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 192) 		{"8",	8},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 193) 		{"a",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 194) 		{"A",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 195) 		{"g",	16},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 196) 		{"G",	16},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 197) 		/* overflow */
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 198) 		{"10000000000000000000000000000000000000000000000000000000000000000",	2},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 199) 		{"2000000000000000000000",	8},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 200) 		{"18446744073709551616",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 201) 		{"10000000000000000",	16},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 202) 		/* negative */
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 203) 		{"-0", 0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 204) 		{"-0", 8},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 205) 		{"-0", 10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 206) 		{"-0", 16},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 207) 		{"-1", 0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 208) 		{"-1", 8},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 209) 		{"-1", 10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 210) 		{"-1", 16},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 211) 		/* sign is first character if any */
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 212) 		{"-+1", 0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 213) 		{"-+1", 8},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 214) 		{"-+1", 10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 215) 		{"-+1", 16},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 216) 		/* nothing after \n */
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 217) 		{"0\n0", 0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 218) 		{"0\n0", 8},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 219) 		{"0\n0", 10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 220) 		{"0\n0", 16},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 221) 		{"0\n+", 0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 222) 		{"0\n+", 8},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 223) 		{"0\n+", 10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 224) 		{"0\n+", 16},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 225) 		{"0\n-", 0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 226) 		{"0\n-", 8},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 227) 		{"0\n-", 10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 228) 		{"0\n-", 16},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 229) 		{"0\n ", 0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 230) 		{"0\n ", 8},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 231) 		{"0\n ", 10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 232) 		{"0\n ", 16},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 233) 	};
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 234) 	TEST_FAIL(kstrtoull, unsigned long long, "%llu", test_ull_fail);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 235) }
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 236) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 237) static void __init test_kstrtoll_ok(void)
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 238) {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 239) 	DECLARE_TEST_OK(long long, struct test_ll);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 240) 	static DEFINE_TEST_OK(struct test_ll, test_ll_ok) = {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 241) 		{"0",	10,	0LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 242) 		{"1",	10,	1LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 243) 		{"127",	10,	127LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 244) 		{"128",	10,	128LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 245) 		{"129",	10,	129LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 246) 		{"255",	10,	255LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 247) 		{"256",	10,	256LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 248) 		{"257",	10,	257LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 249) 		{"32767",	10,	32767LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 250) 		{"32768",	10,	32768LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 251) 		{"32769",	10,	32769LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 252) 		{"65535",	10,	65535LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 253) 		{"65536",	10,	65536LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 254) 		{"65537",	10,	65537LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 255) 		{"2147483647",	10,	2147483647LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 256) 		{"2147483648",	10,	2147483648LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 257) 		{"2147483649",	10,	2147483649LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 258) 		{"4294967295",	10,	4294967295LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 259) 		{"4294967296",	10,	4294967296LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 260) 		{"4294967297",	10,	4294967297LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 261) 		{"9223372036854775807",	10,	9223372036854775807LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 262) 
2d2e4715a65ca (Alexey Dobriyan  2015-09-09 15:36:17 -0700 263) 		{"-0",	10,	0LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 264) 		{"-1",	10,	-1LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 265) 		{"-2",	10,	-2LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 266) 		{"-9223372036854775808",	10,	LLONG_MIN},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 267) 	};
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 268) 	TEST_OK(kstrtoll, long long, "%lld", test_ll_ok);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 269) }
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 270) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 271) static void __init test_kstrtoll_fail(void)
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 272) {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 273) 	static DEFINE_TEST_FAIL(test_ll_fail) = {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 274) 		{"9223372036854775808",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 275) 		{"9223372036854775809",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 276) 		{"18446744073709551614",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 277) 		{"18446744073709551615",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 278) 		{"-9223372036854775809",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 279) 		{"-18446744073709551614",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 280) 		{"-18446744073709551615",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 281) 		/* sign is first character if any */
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 282) 		{"-+1", 0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 283) 		{"-+1", 8},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 284) 		{"-+1", 10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 285) 		{"-+1", 16},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 286) 	};
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 287) 	TEST_FAIL(kstrtoll, long long, "%lld", test_ll_fail);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 288) }
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 289) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 290) static void __init test_kstrtou64_ok(void)
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 291) {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 292) 	DECLARE_TEST_OK(u64, struct test_u64);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 293) 	static DEFINE_TEST_OK(struct test_u64, test_u64_ok) = {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 294) 		{"0",	10,	0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 295) 		{"1",	10,	1},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 296) 		{"126",	10,	126},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 297) 		{"127",	10,	127},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 298) 		{"128",	10,	128},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 299) 		{"129",	10,	129},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 300) 		{"254",	10,	254},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 301) 		{"255",	10,	255},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 302) 		{"256",	10,	256},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 303) 		{"257",	10,	257},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 304) 		{"32766",	10,	32766},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 305) 		{"32767",	10,	32767},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 306) 		{"32768",	10,	32768},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 307) 		{"32769",	10,	32769},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 308) 		{"65534",	10,	65534},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 309) 		{"65535",	10,	65535},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 310) 		{"65536",	10,	65536},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 311) 		{"65537",	10,	65537},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 312) 		{"2147483646",	10,	2147483646},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 313) 		{"2147483647",	10,	2147483647},
01eda2e0c0cf0 (Alexey Dobriyan  2011-04-14 15:22:00 -0700 314) 		{"2147483648",	10,	2147483648ULL},
01eda2e0c0cf0 (Alexey Dobriyan  2011-04-14 15:22:00 -0700 315) 		{"2147483649",	10,	2147483649ULL},
01eda2e0c0cf0 (Alexey Dobriyan  2011-04-14 15:22:00 -0700 316) 		{"4294967294",	10,	4294967294ULL},
01eda2e0c0cf0 (Alexey Dobriyan  2011-04-14 15:22:00 -0700 317) 		{"4294967295",	10,	4294967295ULL},
01eda2e0c0cf0 (Alexey Dobriyan  2011-04-14 15:22:00 -0700 318) 		{"4294967296",	10,	4294967296ULL},
01eda2e0c0cf0 (Alexey Dobriyan  2011-04-14 15:22:00 -0700 319) 		{"4294967297",	10,	4294967297ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 320) 		{"9223372036854775806",	10,	9223372036854775806ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 321) 		{"9223372036854775807",	10,	9223372036854775807ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 322) 		{"9223372036854775808",	10,	9223372036854775808ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 323) 		{"9223372036854775809",	10,	9223372036854775809ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 324) 		{"18446744073709551614",	10,	18446744073709551614ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 325) 		{"18446744073709551615",	10,	18446744073709551615ULL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 326) 	};
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 327) 	TEST_OK(kstrtou64, u64, "%llu", test_u64_ok);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 328) }
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 329) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 330) static void __init test_kstrtou64_fail(void)
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 331) {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 332) 	static DEFINE_TEST_FAIL(test_u64_fail) = {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 333) 		{"-2",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 334) 		{"-1",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 335) 		{"18446744073709551616",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 336) 		{"18446744073709551617",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 337) 	};
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 338) 	TEST_FAIL(kstrtou64, u64, "%llu", test_u64_fail);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 339) }
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 340) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 341) static void __init test_kstrtos64_ok(void)
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 342) {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 343) 	DECLARE_TEST_OK(s64, struct test_s64);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 344) 	static DEFINE_TEST_OK(struct test_s64, test_s64_ok) = {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 345) 		{"-128",	10,	-128},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 346) 		{"-127",	10,	-127},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 347) 		{"-1",	10,	-1},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 348) 		{"0",	10,	0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 349) 		{"1",	10,	1},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 350) 		{"126",	10,	126},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 351) 		{"127",	10,	127},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 352) 		{"128",	10,	128},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 353) 		{"129",	10,	129},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 354) 		{"254",	10,	254},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 355) 		{"255",	10,	255},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 356) 		{"256",	10,	256},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 357) 		{"257",	10,	257},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 358) 		{"32766",	10,	32766},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 359) 		{"32767",	10,	32767},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 360) 		{"32768",	10,	32768},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 361) 		{"32769",	10,	32769},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 362) 		{"65534",	10,	65534},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 363) 		{"65535",	10,	65535},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 364) 		{"65536",	10,	65536},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 365) 		{"65537",	10,	65537},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 366) 		{"2147483646",	10,	2147483646},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 367) 		{"2147483647",	10,	2147483647},
01eda2e0c0cf0 (Alexey Dobriyan  2011-04-14 15:22:00 -0700 368) 		{"2147483648",	10,	2147483648LL},
01eda2e0c0cf0 (Alexey Dobriyan  2011-04-14 15:22:00 -0700 369) 		{"2147483649",	10,	2147483649LL},
01eda2e0c0cf0 (Alexey Dobriyan  2011-04-14 15:22:00 -0700 370) 		{"4294967294",	10,	4294967294LL},
01eda2e0c0cf0 (Alexey Dobriyan  2011-04-14 15:22:00 -0700 371) 		{"4294967295",	10,	4294967295LL},
01eda2e0c0cf0 (Alexey Dobriyan  2011-04-14 15:22:00 -0700 372) 		{"4294967296",	10,	4294967296LL},
01eda2e0c0cf0 (Alexey Dobriyan  2011-04-14 15:22:00 -0700 373) 		{"4294967297",	10,	4294967297LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 374) 		{"9223372036854775806",	10,	9223372036854775806LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 375) 		{"9223372036854775807",	10,	9223372036854775807LL},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 376) 	};
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 377) 	TEST_OK(kstrtos64, s64, "%lld", test_s64_ok);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 378) }
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 379) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 380) static void __init test_kstrtos64_fail(void)
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 381) {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 382) 	static DEFINE_TEST_FAIL(test_s64_fail) = {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 383) 		{"9223372036854775808",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 384) 		{"9223372036854775809",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 385) 		{"18446744073709551614",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 386) 		{"18446744073709551615",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 387) 		{"18446744073709551616",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 388) 		{"18446744073709551617",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 389) 	};
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 390) 	TEST_FAIL(kstrtos64, s64, "%lld", test_s64_fail);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 391) }
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 392) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 393) static void __init test_kstrtou32_ok(void)
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 394) {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 395) 	DECLARE_TEST_OK(u32, struct test_u32);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 396) 	static DEFINE_TEST_OK(struct test_u32, test_u32_ok) = {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 397) 		{"0",	10,	0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 398) 		{"1",	10,	1},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 399) 		{"126",	10,	126},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 400) 		{"127",	10,	127},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 401) 		{"128",	10,	128},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 402) 		{"129",	10,	129},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 403) 		{"254",	10,	254},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 404) 		{"255",	10,	255},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 405) 		{"256",	10,	256},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 406) 		{"257",	10,	257},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 407) 		{"32766",	10,	32766},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 408) 		{"32767",	10,	32767},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 409) 		{"32768",	10,	32768},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 410) 		{"32769",	10,	32769},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 411) 		{"65534",	10,	65534},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 412) 		{"65535",	10,	65535},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 413) 		{"65536",	10,	65536},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 414) 		{"65537",	10,	65537},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 415) 		{"2147483646",	10,	2147483646},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 416) 		{"2147483647",	10,	2147483647},
01eda2e0c0cf0 (Alexey Dobriyan  2011-04-14 15:22:00 -0700 417) 		{"2147483648",	10,	2147483648U},
01eda2e0c0cf0 (Alexey Dobriyan  2011-04-14 15:22:00 -0700 418) 		{"2147483649",	10,	2147483649U},
01eda2e0c0cf0 (Alexey Dobriyan  2011-04-14 15:22:00 -0700 419) 		{"4294967294",	10,	4294967294U},
01eda2e0c0cf0 (Alexey Dobriyan  2011-04-14 15:22:00 -0700 420) 		{"4294967295",	10,	4294967295U},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 421) 	};
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 422) 	TEST_OK(kstrtou32, u32, "%u", test_u32_ok);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 423) }
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 424) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 425) static void __init test_kstrtou32_fail(void)
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 426) {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 427) 	static DEFINE_TEST_FAIL(test_u32_fail) = {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 428) 		{"-2",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 429) 		{"-1",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 430) 		{"4294967296",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 431) 		{"4294967297",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 432) 		{"9223372036854775806",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 433) 		{"9223372036854775807",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 434) 		{"9223372036854775808",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 435) 		{"9223372036854775809",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 436) 		{"18446744073709551614",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 437) 		{"18446744073709551615",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 438) 		{"18446744073709551616",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 439) 		{"18446744073709551617",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 440) 	};
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 441) 	TEST_FAIL(kstrtou32, u32, "%u", test_u32_fail);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 442) }
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 443) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 444) static void __init test_kstrtos32_ok(void)
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 445) {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 446) 	DECLARE_TEST_OK(s32, struct test_s32);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 447) 	static DEFINE_TEST_OK(struct test_s32, test_s32_ok) = {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 448) 		{"-128",	10,	-128},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 449) 		{"-127",	10,	-127},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 450) 		{"-1",	10,	-1},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 451) 		{"0",	10,	0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 452) 		{"1",	10,	1},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 453) 		{"126",	10,	126},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 454) 		{"127",	10,	127},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 455) 		{"128",	10,	128},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 456) 		{"129",	10,	129},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 457) 		{"254",	10,	254},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 458) 		{"255",	10,	255},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 459) 		{"256",	10,	256},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 460) 		{"257",	10,	257},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 461) 		{"32766",	10,	32766},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 462) 		{"32767",	10,	32767},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 463) 		{"32768",	10,	32768},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 464) 		{"32769",	10,	32769},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 465) 		{"65534",	10,	65534},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 466) 		{"65535",	10,	65535},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 467) 		{"65536",	10,	65536},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 468) 		{"65537",	10,	65537},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 469) 		{"2147483646",	10,	2147483646},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 470) 		{"2147483647",	10,	2147483647},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 471) 	};
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 472) 	TEST_OK(kstrtos32, s32, "%d", test_s32_ok);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 473) }
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 474) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 475) static void __init test_kstrtos32_fail(void)
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 476) {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 477) 	static DEFINE_TEST_FAIL(test_s32_fail) = {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 478) 		{"2147483648",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 479) 		{"2147483649",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 480) 		{"4294967294",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 481) 		{"4294967295",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 482) 		{"4294967296",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 483) 		{"4294967297",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 484) 		{"9223372036854775806",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 485) 		{"9223372036854775807",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 486) 		{"9223372036854775808",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 487) 		{"9223372036854775809",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 488) 		{"18446744073709551614",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 489) 		{"18446744073709551615",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 490) 		{"18446744073709551616",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 491) 		{"18446744073709551617",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 492) 	};
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 493) 	TEST_FAIL(kstrtos32, s32, "%d", test_s32_fail);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 494) }
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 495) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 496) static void __init test_kstrtou16_ok(void)
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 497) {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 498) 	DECLARE_TEST_OK(u16, struct test_u16);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 499) 	static DEFINE_TEST_OK(struct test_u16, test_u16_ok) = {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 500) 		{"0",	10,	0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 501) 		{"1",	10,	1},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 502) 		{"126",	10,	126},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 503) 		{"127",	10,	127},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 504) 		{"128",	10,	128},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 505) 		{"129",	10,	129},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 506) 		{"254",	10,	254},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 507) 		{"255",	10,	255},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 508) 		{"256",	10,	256},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 509) 		{"257",	10,	257},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 510) 		{"32766",	10,	32766},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 511) 		{"32767",	10,	32767},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 512) 		{"32768",	10,	32768},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 513) 		{"32769",	10,	32769},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 514) 		{"65534",	10,	65534},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 515) 		{"65535",	10,	65535},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 516) 	};
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 517) 	TEST_OK(kstrtou16, u16, "%hu", test_u16_ok);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 518) }
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 519) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 520) static void __init test_kstrtou16_fail(void)
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 521) {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 522) 	static DEFINE_TEST_FAIL(test_u16_fail) = {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 523) 		{"-2",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 524) 		{"-1",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 525) 		{"65536",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 526) 		{"65537",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 527) 		{"2147483646",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 528) 		{"2147483647",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 529) 		{"2147483648",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 530) 		{"2147483649",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 531) 		{"4294967294",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 532) 		{"4294967295",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 533) 		{"4294967296",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 534) 		{"4294967297",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 535) 		{"9223372036854775806",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 536) 		{"9223372036854775807",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 537) 		{"9223372036854775808",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 538) 		{"9223372036854775809",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 539) 		{"18446744073709551614",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 540) 		{"18446744073709551615",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 541) 		{"18446744073709551616",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 542) 		{"18446744073709551617",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 543) 	};
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 544) 	TEST_FAIL(kstrtou16, u16, "%hu", test_u16_fail);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 545) }
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 546) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 547) static void __init test_kstrtos16_ok(void)
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 548) {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 549) 	DECLARE_TEST_OK(s16, struct test_s16);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 550) 	static DEFINE_TEST_OK(struct test_s16, test_s16_ok) = {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 551) 		{"-130",	10,	-130},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 552) 		{"-129",	10,	-129},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 553) 		{"-128",	10,	-128},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 554) 		{"-127",	10,	-127},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 555) 		{"-1",	10,	-1},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 556) 		{"0",	10,	0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 557) 		{"1",	10,	1},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 558) 		{"126",	10,	126},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 559) 		{"127",	10,	127},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 560) 		{"128",	10,	128},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 561) 		{"129",	10,	129},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 562) 		{"254",	10,	254},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 563) 		{"255",	10,	255},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 564) 		{"256",	10,	256},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 565) 		{"257",	10,	257},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 566) 		{"32766",	10,	32766},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 567) 		{"32767",	10,	32767},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 568) 	};
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 569) 	TEST_OK(kstrtos16, s16, "%hd", test_s16_ok);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 570) }
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 571) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 572) static void __init test_kstrtos16_fail(void)
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 573) {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 574) 	static DEFINE_TEST_FAIL(test_s16_fail) = {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 575) 		{"32768",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 576) 		{"32769",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 577) 		{"65534",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 578) 		{"65535",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 579) 		{"65536",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 580) 		{"65537",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 581) 		{"2147483646",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 582) 		{"2147483647",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 583) 		{"2147483648",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 584) 		{"2147483649",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 585) 		{"4294967294",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 586) 		{"4294967295",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 587) 		{"4294967296",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 588) 		{"4294967297",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 589) 		{"9223372036854775806",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 590) 		{"9223372036854775807",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 591) 		{"9223372036854775808",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 592) 		{"9223372036854775809",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 593) 		{"18446744073709551614",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 594) 		{"18446744073709551615",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 595) 		{"18446744073709551616",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 596) 		{"18446744073709551617",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 597) 	};
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 598) 	TEST_FAIL(kstrtos16, s16, "%hd", test_s16_fail);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 599) }
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 600) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 601) static void __init test_kstrtou8_ok(void)
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 602) {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 603) 	DECLARE_TEST_OK(u8, struct test_u8);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 604) 	static DEFINE_TEST_OK(struct test_u8, test_u8_ok) = {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 605) 		{"0",	10,	0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 606) 		{"1",	10,	1},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 607) 		{"126",	10,	126},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 608) 		{"127",	10,	127},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 609) 		{"128",	10,	128},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 610) 		{"129",	10,	129},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 611) 		{"254",	10,	254},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 612) 		{"255",	10,	255},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 613) 	};
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 614) 	TEST_OK(kstrtou8, u8, "%hhu", test_u8_ok);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 615) }
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 616) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 617) static void __init test_kstrtou8_fail(void)
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 618) {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 619) 	static DEFINE_TEST_FAIL(test_u8_fail) = {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 620) 		{"-2",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 621) 		{"-1",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 622) 		{"256",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 623) 		{"257",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 624) 		{"32766",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 625) 		{"32767",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 626) 		{"32768",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 627) 		{"32769",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 628) 		{"65534",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 629) 		{"65535",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 630) 		{"65536",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 631) 		{"65537",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 632) 		{"2147483646",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 633) 		{"2147483647",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 634) 		{"2147483648",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 635) 		{"2147483649",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 636) 		{"4294967294",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 637) 		{"4294967295",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 638) 		{"4294967296",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 639) 		{"4294967297",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 640) 		{"9223372036854775806",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 641) 		{"9223372036854775807",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 642) 		{"9223372036854775808",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 643) 		{"9223372036854775809",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 644) 		{"18446744073709551614",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 645) 		{"18446744073709551615",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 646) 		{"18446744073709551616",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 647) 		{"18446744073709551617",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 648) 	};
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 649) 	TEST_FAIL(kstrtou8, u8, "%hhu", test_u8_fail);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 650) }
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 651) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 652) static void __init test_kstrtos8_ok(void)
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 653) {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 654) 	DECLARE_TEST_OK(s8, struct test_s8);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 655) 	static DEFINE_TEST_OK(struct test_s8, test_s8_ok) = {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 656) 		{"-128",	10,	-128},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 657) 		{"-127",	10,	-127},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 658) 		{"-1",	10,	-1},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 659) 		{"0",	10,	0},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 660) 		{"1",	10,	1},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 661) 		{"126",	10,	126},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 662) 		{"127",	10,	127},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 663) 	};
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 664) 	TEST_OK(kstrtos8, s8, "%hhd", test_s8_ok);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 665) }
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 666) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 667) static void __init test_kstrtos8_fail(void)
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 668) {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 669) 	static DEFINE_TEST_FAIL(test_s8_fail) = {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 670) 		{"-130",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 671) 		{"-129",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 672) 		{"128",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 673) 		{"129",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 674) 		{"254",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 675) 		{"255",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 676) 		{"256",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 677) 		{"257",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 678) 		{"32766",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 679) 		{"32767",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 680) 		{"32768",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 681) 		{"32769",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 682) 		{"65534",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 683) 		{"65535",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 684) 		{"65536",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 685) 		{"65537",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 686) 		{"2147483646",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 687) 		{"2147483647",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 688) 		{"2147483648",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 689) 		{"2147483649",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 690) 		{"4294967294",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 691) 		{"4294967295",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 692) 		{"4294967296",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 693) 		{"4294967297",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 694) 		{"9223372036854775806",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 695) 		{"9223372036854775807",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 696) 		{"9223372036854775808",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 697) 		{"9223372036854775809",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 698) 		{"18446744073709551614",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 699) 		{"18446744073709551615",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 700) 		{"18446744073709551616",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 701) 		{"18446744073709551617",	10},
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 702) 	};
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 703) 	TEST_FAIL(kstrtos8, s8, "%hhd", test_s8_fail);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 704) }
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 705) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 706) static int __init test_kstrtox_init(void)
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 707) {
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 708) 	test_kstrtoull_ok();
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 709) 	test_kstrtoull_fail();
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 710) 	test_kstrtoll_ok();
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 711) 	test_kstrtoll_fail();
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 712) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 713) 	test_kstrtou64_ok();
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 714) 	test_kstrtou64_fail();
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 715) 	test_kstrtos64_ok();
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 716) 	test_kstrtos64_fail();
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 717) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 718) 	test_kstrtou32_ok();
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 719) 	test_kstrtou32_fail();
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 720) 	test_kstrtos32_ok();
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 721) 	test_kstrtos32_fail();
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 722) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 723) 	test_kstrtou16_ok();
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 724) 	test_kstrtou16_fail();
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 725) 	test_kstrtos16_ok();
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 726) 	test_kstrtos16_fail();
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 727) 
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 728) 	test_kstrtou8_ok();
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 729) 	test_kstrtou8_fail();
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 730) 	test_kstrtos8_ok();
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 731) 	test_kstrtos8_fail();
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 732) 	return -EINVAL;
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 733) }
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 734) module_init(test_kstrtox_init);
33ee3b2e2eb9b (Alexey Dobriyan  2011-03-22 16:34:40 -0700 735) MODULE_LICENSE("Dual BSD/GPL");