Drop main() prototype. Syncs with NetBSD-8
[minix.git] / minix / tests / kernel / sys_padconf / padconftest.c
blobb0e06bb3861c684e5601873cbbbfa4f8ea0fdac6
1 /* Test for sys_padconf() */
2 #include <errno.h>
3 #include <stdio.h>
4 #include <minix/com.h>
5 #include <minix/syslib.h>
6 #include <minix/padconf.h>
7 #include <minix/drivers.h>
8 #include <assert.h>
10 static unsigned int failures = 0;
13 * padconf is only supported on ARM. On other systems sys_padconf() should
14 * return -EBADREQUEST.
16 static void test_badrequest(void)
18 #if !defined(__arm__)
19 int r;
21 r = sys_padconf(0xffffffff, 0xffffffff, 0xffffffff);
22 if (r != -EBADREQUEST) {
23 printf("Expected r=%d | Got r=%d\n", -EBADREQUEST, r);
24 failures++;
26 #endif
27 return;
30 static void do_tests(void)
32 test_badrequest();
35 static int sef_cb_init_fresh(int UNUSED(type), sef_init_info_t *UNUSED(info))
37 do_tests();
39 /* The returned code will determine the outcome of the RS call, and
40 * thus the entire test. The actual error code does not matter.
42 return (failures) ? EINVAL : 0;
45 static void sef_local_startup(void)
47 sef_setcb_init_fresh(sef_cb_init_fresh);
49 sef_startup();
52 int main(int argc, char **argv)
54 env_setargs(argc, argv);
56 sef_local_startup();
58 return 0;