Lines Matching refs:buf
23 u8 *buf; in setexpr_test_int() local
25 buf = map_sysmem(0, BUF_SIZE); in setexpr_test_int()
26 memset(buf, '\xff', BUF_SIZE); in setexpr_test_int()
29 buf[0x0] = 0x12; in setexpr_test_int()
36 *(short *)buf = 0x2345; in setexpr_test_int()
43 *(u32 *)buf = 0x3456789a; in setexpr_test_int()
50 *(u64 *)buf = 0x456789abcdef0123; in setexpr_test_int()
62 unmap_sysmem(buf); in setexpr_test_int()
71 char *buf; in setexpr_test_plus() local
73 buf = map_sysmem(0, BUF_SIZE); in setexpr_test_plus()
74 memset(buf, '\xff', BUF_SIZE); in setexpr_test_plus()
77 buf[0x0] = 0x12; in setexpr_test_plus()
78 buf[0x10] = 0x34; in setexpr_test_plus()
83 *(short *)buf = 0x2345; in setexpr_test_plus()
84 *(short *)(buf + 0x10) = 0xf012; in setexpr_test_plus()
89 *(u32 *)buf = 0x3456789a; in setexpr_test_plus()
90 *(u32 *)(buf + 0x10) = 0xc3384235; in setexpr_test_plus()
95 *(u64 *)buf = 0x456789abcdef0123; in setexpr_test_plus()
96 *(u64 *)(buf + 0x10) = 0x4987328372849283; in setexpr_test_plus()
104 unmap_sysmem(buf); in setexpr_test_plus()
113 char *buf; in setexpr_test_oper() local
115 buf = map_sysmem(0, BUF_SIZE); in setexpr_test_oper()
116 memset(buf, '\xff', BUF_SIZE); in setexpr_test_oper()
118 *(u32 *)buf = 0x1234; in setexpr_test_oper()
119 *(u32 *)(buf + 0x10) = 0x560000; in setexpr_test_oper()
125 *(u32 *)buf = 0x561200; in setexpr_test_oper()
126 *(u32 *)(buf + 0x10) = 0x1234; in setexpr_test_oper()
147 unmap_sysmem(buf); in setexpr_test_oper()
156 char *buf, *val; in setexpr_test_regex() local
158 buf = map_sysmem(0, BUF_SIZE); in setexpr_test_regex()
191 unmap_sysmem(buf); in setexpr_test_regex()
200 char *buf, *val; in setexpr_test_regex_inc() local
202 buf = map_sysmem(0, BUF_SIZE); in setexpr_test_regex_inc()
208 unmap_sysmem(buf); in setexpr_test_regex_inc()
217 char *buf, *nbuf; in setexpr_test_sub() local
220 buf = map_sysmem(0, BUF_SIZE); in setexpr_test_sub()
224 memset(buf, '\xff', BUF_SIZE); in setexpr_test_sub()
227 buf[i] = i & 0xff; in setexpr_test_sub()
230 strcpy(buf, "this is a test"); in setexpr_test_sub()
236 ut_assertok(setexpr_regex_sub(buf, BUF_SIZE, nbuf, BUF_SIZE, "is", in setexpr_test_sub()
238 ut_asserteq_str("thus it is longer us it is longer a test", buf); in setexpr_test_sub()
240 ut_assertf(buf[i] == (char)i, in setexpr_test_sub()
242 i, i & 0xff, (u8)buf[i]); in setexpr_test_sub()
248 unmap_sysmem(buf); in setexpr_test_sub()
257 char *buf, *nbuf; in setexpr_test_backref() local
260 buf = map_sysmem(0, BUF_SIZE); in setexpr_test_backref()
264 memset(buf, '\xff', BUF_SIZE); in setexpr_test_backref()
267 buf[i] = i & 0xff; in setexpr_test_backref()
270 strcpy(buf, "this is surely a test is it? yes this is indeed a test"); in setexpr_test_backref()
276 ut_assertok(setexpr_regex_sub(buf, BUF_SIZE, nbuf, BUF_SIZE, in setexpr_test_backref()
280 buf); in setexpr_test_backref()
283 ut_assertf(buf[i] == (char)i, in setexpr_test_backref()
285 i, i & 0xff, (u8)buf[i]); in setexpr_test_backref()
291 unmap_sysmem(buf); in setexpr_test_backref()
300 char *buf; in setexpr_test_str() local
302 buf = map_sysmem(0, BUF_SIZE); in setexpr_test_str()
303 memset(buf, '\xff', BUF_SIZE); in setexpr_test_str()
309 strcpy(buf, "hello"); in setexpr_test_str()
314 unmap_sysmem(buf); in setexpr_test_str()
323 char *buf; in setexpr_test_str_oper() local
329 buf = map_sysmem(0, BUF_SIZE); in setexpr_test_str_oper()
330 memset(buf, '\xff', BUF_SIZE); in setexpr_test_str_oper()
331 strcpy(buf, "hello"); in setexpr_test_str_oper()
332 strcpy(buf + 0x10, " there"); in setexpr_test_str_oper()
342 unmap_sysmem(buf); in setexpr_test_str_oper()
352 char *buf, *val; in setexpr_test_str_long() local
354 buf = map_sysmem(0, size); in setexpr_test_str_long()
355 memset(buf, 'a', size); in setexpr_test_str_long()
362 unmap_sysmem(buf); in setexpr_test_str_long()
372 u8 *buf; in setexpr_test_fmt() local
374 buf = map_sysmem(0, BUF_SIZE); in setexpr_test_fmt()
375 memset(buf, '\xff', BUF_SIZE); in setexpr_test_fmt()
444 unmap_sysmem(buf); in setexpr_test_fmt()