Displaying 2 results from an estimated 2 matches for "e32c1383".
Did you mean:
321383
2020 Jul 25
0
[klibc:master] tests: Add a trivial test for sysconf()
...[klibc] tests: Add a trivial test for sysconf()
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/klibc/tests/sysconf.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/usr/klibc/tests/sysconf.c b/usr/klibc/tests/sysconf.c
new file mode 100644
index 00000000..e32c1383
--- /dev/null
+++ b/usr/klibc/tests/sysconf.c
@@ -0,0 +1,14 @@
+#include <assert.h>
+#include <stdio.h>
+#include <sys/sysconf.h>
+
+int main(void)
+{
+ long rc;
+
+ rc = sysconf(_SC_PAGESIZE);
+ assert(rc > 0);
+ printf("sysconf(_SC_PAGESIZE) = %ld\n", rc);
+
+ retur...
2020 Jul 25
0
[klibc:master] tests: Add a trivial test for sysconf()
...rtoimax.shared-y := strtoimax.o
strtotime.shared-y := strtotime.o
+sysconf.shared-y := sysconf.o
testrand48.shared-y := testrand48.o
testvsnp.shared-y := testvsnp.o
vfork.shared-y := vfork.o
diff --git a/usr/klibc/tests/sysconf.c b/usr/klibc/tests/sysconf.c
new file mode 100644
index 00000000..e32c1383
--- /dev/null
+++ b/usr/klibc/tests/sysconf.c
@@ -0,0 +1,14 @@
+#include <assert.h>
+#include <stdio.h>
+#include <sys/sysconf.h>
+
+int main(void)
+{
+ long rc;
+
+ rc = sysconf(_SC_PAGESIZE);
+ assert(rc > 0);
+ printf("sysconf(_SC_PAGESIZE) = %ld\n", rc);
+
+ retur...