Lines Matching defs:test
40 static struct kfifo test;
42 static DECLARE_KFIFO(test, unsigned char, FIFO_SIZE);
58 printk(KERN_INFO "byte stream fifo test start\n");
61 kfifo_in(&test, "hello", 5);
65 kfifo_put(&test, i);
68 printk(KERN_INFO "fifo len: %u\n", kfifo_len(&test));
71 i = kfifo_out(&test, buf, 5);
75 ret = kfifo_out(&test, buf, 2);
78 ret = kfifo_in(&test, buf, ret);
83 kfifo_skip(&test);
86 for (i = 20; kfifo_put(&test, i); i++)
89 printk(KERN_INFO "queue len: %u\n", kfifo_len(&test));
92 if (kfifo_peek(&test, &i))
97 while (kfifo_get(&test, &i)) {
100 printk(KERN_WARNING "value mismatch: test failed\n");
105 printk(KERN_WARNING "size mismatch: test failed\n");
108 printk(KERN_INFO "test passed\n");
122 ret = kfifo_from_user(&test, buf, count, &copied);
140 ret = kfifo_to_user(&test, buf, count, &copied);
160 ret = kfifo_alloc(&test, FIFO_SIZE, GFP_KERNEL);
166 INIT_KFIFO(test);
170 kfifo_free(&test);
177 kfifo_free(&test);
188 kfifo_free(&test);