Skip to content
Snippets Groups Projects
Commit 65589f9c authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Merge branch 'sys-resource-constants' into 'master'

Add tests for further sys/resource.h constants

See merge request redox-os/relibc!462
parents cbd42b22 d189b05f
No related branches found
No related tags found
No related merge requests found
Pipeline #14499 passed
...@@ -162,6 +162,7 @@ NAMES=\ ...@@ -162,6 +162,7 @@ NAMES=\
stdlib/mktemp \ stdlib/mktemp \
stdlib/realpath \ stdlib/realpath \
sys_epoll/epoll \ sys_epoll/epoll \
sys_resource/constants \
sys_utsname/uname \ sys_utsname/uname \
time/gettimeofday \ time/gettimeofday \
unistd/chdir \ unistd/chdir \
...@@ -188,7 +189,6 @@ NAMES=\ ...@@ -188,7 +189,6 @@ NAMES=\
grp/getgrgid_r \ grp/getgrgid_r \
grp/getgrnam_r \ grp/getgrnam_r \
grp/gr_iter \ grp/gr_iter \
resource/prio_process \
# resource/getrusage # resource/getrusage
# time/times # time/times
......
#include <stdio.h>
#include <sys/resource.h>
int main(void) {
printf("PRIO_PROCESS: %d", PRIO_PROCESS);
return 0;
}
#include <stdio.h>
#include <sys/resource.h>
int main(void) {
// Checks availability of constants specified in
// https://pubs.opengroup.org/onlinepubs/7908799/xsh/sysresource.h.html
printf("PRIO_PROCESS: %d\n", PRIO_PROCESS);
printf("PRIO_PGRP: %d\n", PRIO_PGRP);
printf("PRIO_USER: %d\n", PRIO_USER);
printf("RLIM_INFINITY: %lld\n", RLIM_INFINITY);
printf("RLIM_SAVED_MAX: %lld\n", RLIM_SAVED_MAX);
printf("RLIM_SAVED_CUR: %lld\n", RLIM_SAVED_CUR);
printf("RUSAGE_SELF: %lld\n", RUSAGE_SELF);
printf("RUSAGE_CHILDREN: %lld\n", RUSAGE_CHILDREN);
printf("RLIMIT_CORE: %lld\n", RLIMIT_CORE);
printf("RLIMIT_CPU: %lld\n", RLIMIT_CPU);
printf("RLIMIT_DATA: %lld\n", RLIMIT_DATA);
printf("RLIMIT_FSIZE: %lld\n", RLIMIT_FSIZE);
printf("RLIMIT_NOFILE: %lld\n", RLIMIT_NOFILE);
printf("RLIMIT_STACK: %lld\n", RLIMIT_STACK);
printf("RLIMIT_AS: %lld\n", RLIMIT_AS);
return 0;
}
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment