diff options
-rw-r--r-- | usr/klibc/tests/Kbuild | 1 | ||||
-rw-r--r-- | usr/klibc/tests/sysconf.c | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/usr/klibc/tests/Kbuild b/usr/klibc/tests/Kbuild index c7ca531f726db4..00b701fc46317b 100644 --- a/usr/klibc/tests/Kbuild +++ b/usr/klibc/tests/Kbuild @@ -45,6 +45,7 @@ stdio.shared-y := stdio.o strlcpycat.shared-y := strlcpycat.o strtoimax.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 00000000000000..e32c1383ec1dcd --- /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); + + return 0; +} |