summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/Makefile
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2018-01-05 20:34:10 +0100
committerAurelien Jarno <aurelien@aurel32.net>2018-01-05 20:34:10 +0100
commit19be56d8cef5c157f436234b3af4439437da259f (patch)
tree9318d3554ea4ce0f7ae43370e8db6431e7100352 /sysdeps/unix/sysv/linux/Makefile
parent24731685c89dbd2c4579234583c268b52d943d0b (diff)
downloadglibc-19be56d8cef5c157f436234b3af4439437da259f.tar.gz
glibc-19be56d8cef5c157f436234b3af4439437da259f.tar.xz
glibc-19be56d8cef5c157f436234b3af4439437da259f.zip
Add test for getrlimit/setrlimit/prlimit with infinity value
Add a test to check that the getrlimit, setrlimit and prlimit functions
and their 64-bit equivalent behave correctly with RLIM_INFINITY and
RLIM64_INFINITY. For that it assumes that the prlimit64 function calls
the syscall directly without translating the value and that the kernel
uses the -1 value to represent infinity.

It first finds a resource with the hard limit set to infinity so the
soft limit can be manipulated easily and check for the consistency
between the value set or get by the prlimit64 and the other functions.

It is Linux specific add it uses the prlimit and prlimit64 functions.

Changelog:
	* sysdeps/unix/sysv/linux/tst-rlimit-infinity.c: New file.
	* sysdeps/unix/sysv/linux/Makefile (tests): Add tst-rlimit-infinity.
Diffstat (limited to 'sysdeps/unix/sysv/linux/Makefile')
-rw-r--r--sysdeps/unix/sysv/linux/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 4af9c5661d..8f19e0efc3 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -44,7 +44,8 @@ sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \
 
 tests += tst-clone tst-clone2 tst-clone3 tst-fanotify tst-personality \
 	 tst-quota tst-sync_file_range tst-sysconf-iov_max tst-ttyname \
-	 test-errno-linux tst-memfd_create tst-mlock2 tst-pkey
+	 test-errno-linux tst-memfd_create tst-mlock2 tst-pkey \
+	 tst-rlimit-infinity
 
 # Generate the list of SYS_* macros for the system calls (__NR_*
 # macros).  The file syscall-names.list contains all possible system