summaryrefslogtreecommitdiff
path: root/src/regress/lib/libc/elf_aux_info
diff options
context:
space:
mode:
authorcvs2svn <admin@example.com>2025-04-14 17:32:06 +0000
committercvs2svn <admin@example.com>2025-04-14 17:32:06 +0000
commiteb8dd9dca1228af0cd132f515509051ecfabf6f6 (patch)
treeedb6da6af7e865d488dc1a29309f1e1ec226e603 /src/regress/lib/libc/elf_aux_info
parent247f0352e0ed72a4f476db9dc91f4d982bc83eb2 (diff)
downloadopenbsd-tb_20250414.tar.gz
openbsd-tb_20250414.tar.bz2
openbsd-tb_20250414.zip
This commit was manufactured by cvs2git to create tag 'tb_20250414'.tb_20250414
Diffstat (limited to 'src/regress/lib/libc/elf_aux_info')
-rw-r--r--src/regress/lib/libc/elf_aux_info/Makefile5
-rw-r--r--src/regress/lib/libc/elf_aux_info/elf_aux_info.c53
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 @@
1PROG=elf_aux_info
2
3WARNINGS=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
6int
7main(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}