diff options
Diffstat (limited to 'src/regress/lib/libc/elf_aux_info')
| -rw-r--r-- | src/regress/lib/libc/elf_aux_info/Makefile | 5 | ||||
| -rw-r--r-- | src/regress/lib/libc/elf_aux_info/elf_aux_info.c | 53 |
2 files changed, 0 insertions, 58 deletions
diff --git a/src/regress/lib/libc/elf_aux_info/Makefile b/src/regress/lib/libc/elf_aux_info/Makefile deleted file mode 100644 index 58dc58a830..0000000000 --- a/src/regress/lib/libc/elf_aux_info/Makefile +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | PROG=elf_aux_info | ||
| 2 | |||
| 3 | WARNINGS=yes | ||
| 4 | |||
| 5 | .include <bsd.regress.mk> | ||
diff --git a/src/regress/lib/libc/elf_aux_info/elf_aux_info.c b/src/regress/lib/libc/elf_aux_info/elf_aux_info.c deleted file mode 100644 index 14870e253c..0000000000 --- a/src/regress/lib/libc/elf_aux_info/elf_aux_info.c +++ /dev/null | |||
| @@ -1,53 +0,0 @@ | |||
| 1 | #include <sys/auxv.h> | ||
| 2 | |||
| 3 | #include <errno.h> | ||
| 4 | #include <stdio.h> | ||
| 5 | |||
| 6 | int | ||
| 7 | main(void) | ||
| 8 | { | ||
| 9 | int ret = 0; | ||
| 10 | int a; | ||
| 11 | unsigned long b; | ||
| 12 | |||
| 13 | /* Should always succeed */ | ||
| 14 | if (elf_aux_info(AT_PAGESZ, &a, sizeof(a))) | ||
| 15 | ret |= 1; | ||
| 16 | else | ||
| 17 | fprintf(stderr, "AT_PAGESZ %d\n", a); | ||
| 18 | |||
| 19 | /* Wrong size */ | ||
| 20 | if (elf_aux_info(AT_PAGESZ, &b, sizeof(b)) != EINVAL) | ||
| 21 | ret |= 2; | ||
| 22 | |||
| 23 | /* Invalid request */ | ||
| 24 | if (elf_aux_info(-1, &a, sizeof(a)) != EINVAL) | ||
| 25 | ret |= 4; | ||
| 26 | |||
| 27 | /* Should either succeed or fail with ENOENT if not supported */ | ||
| 28 | switch (elf_aux_info(AT_HWCAP, &b, sizeof(b))) { | ||
| 29 | case 0: | ||
| 30 | fprintf(stderr, "AT_HWCAP %lx\n", b); | ||
| 31 | break; | ||
| 32 | case ENOENT: | ||
| 33 | break; | ||
| 34 | default: | ||
| 35 | ret |= 8; | ||
| 36 | } | ||
| 37 | |||
| 38 | /* Should either succeed or fail with ENOENT if not supported */ | ||
| 39 | switch (elf_aux_info(AT_HWCAP2, &b, sizeof(b))) { | ||
| 40 | case 0: | ||
| 41 | fprintf(stderr, "AT_HWCAP2 %lx\n", b); | ||
| 42 | break; | ||
| 43 | case ENOENT: | ||
| 44 | break; | ||
| 45 | default: | ||
| 46 | ret |= 16; | ||
| 47 | } | ||
| 48 | |||
| 49 | if (ret) | ||
| 50 | fprintf(stderr, "FAILED (status %x)\n", ret); | ||
| 51 | |||
| 52 | return ret; | ||
| 53 | } | ||
