]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* resource/Makefile (tests): Add bug-ulimit1.
authorUlrich Drepper <drepper@redhat.com>
Fri, 31 Oct 2008 17:33:50 +0000 (17:33 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 31 Oct 2008 17:33:50 +0000 (17:33 +0000)
* resource/bug-ulimit1.c: New file.

ChangeLog
resource/Makefile
resource/bug-ulimit1.c [new file with mode: 0644]

index af8cabbead1a6012b1604b3806c1e990dbc1ab3e..d789003b03067a94609aedc8116e11cc0ae2e466 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,8 @@
        [BZ #6947]
        * sysdeps/unix/sysv/linux/ulimit.c (__ulimit): Fix return value
        for UL_SETFSIZE.
+       * resource/Makefile (tests): Add bug-ulimit1.
+       * resource/bug-ulimit1.c: New file.
 
        [BZ #6974]
        * sunrpc/rpc_main.c (mkfile_output): Properly handle filename
index 68f9ff65a327daef1da67bf0f8d597796610fa5d..705c73608c7e21b9098919a45ea3376860b6cc5e 100644 (file)
@@ -1,4 +1,5 @@
-# Copyright (C) 1991,1992,1994,1995,1997,2005 Free Software Foundation, Inc.
+# Copyright (C) 1991,1992,1994,1995,1997,2005,2008
+# Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -24,6 +25,6 @@ headers         := sys/resource.h bits/resource.h sys/vlimit.h sys/vtimes.h   \
 routines := getrlimit setrlimit getrlimit64 setrlimit64 getrusage ulimit      \
            vlimit vtimes getpriority setpriority nice
 
-tests = tst-getrlimit
+tests = tst-getrlimit bug-ulimit1
 
 include ../Rules
diff --git a/resource/bug-ulimit1.c b/resource/bug-ulimit1.c
new file mode 100644 (file)
index 0000000..334d7ff
--- /dev/null
@@ -0,0 +1,21 @@
+#include <ulimit.h>
+#include <stdio.h>
+
+int
+main (void)
+{
+  int retval = 0;
+  long int res;
+
+  res = ulimit (UL_SETFSIZE, 10000);
+  printf ("Result of ulimit (UL_SETFSIZE, 10000): %ld\n", res);
+  if (res != 10000)
+    retval = 1;
+
+  res = ulimit (UL_GETFSIZE);
+  printf ("Result of ulimit(UL_GETFSIZE): %ld\n", res);
+  if (res != 10000)
+    retval = 1;
+
+  return retval;
+}