about summary refs log tree commit diff
path: root/io/test-lfs.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix MIPS n32 lseek, lseek64 (bug 21019).Joseph Myers2017-01-021-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The lseek consolidation broke lseek64 for MIPS n32, so resulting in io/test-lfs failing with an incorrect return from ftello64. This configuration uses the lseek syscall with a 64-bit return value; as the C syscall macros return long, they cannot be used in this case and so an assembly implementation is needed; accordingly, this patch adds lseek64 back to syscalls.list for this configuration. lseek was also broken, truncating the result without checking for overflow. lseek however was already broken before the consolidation; it aliased lseek64 so would return an out-of-range value, resulting in architecturally undefined behavior in the caller if it tried to use a non-sign-extended value with a 32-bit instruction. This patch adds a custom lseek implementation in C for n32, which calls __lseek64 to get the 64-bit value then checks for overflow. Because the prior lseek breakage did not show in test results, and the lseek64 breakage showed only indirectly through tests of ftello64, test coverage was clearly inadequate. This patch extends io/test-lfs.c to test the lseek64 return value (at a point where it has already seeked over 2GB into a file), and then to test the lseek return value (with the latter's expectations depending on whether off_t is smaller than off64_t). Tested for mips64 n32. Also tested test-lfs for x86_64 and x86, where as expected it passes. [BZ #21019] * sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list (lseek64): New syscall entry. * sysdeps/unix/sysv/linux/mips/mips64/n32/lseek.c: New file. * io/test-lfs.c (do_test): Test offset returned from lseek64 and lseek.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2017-01-011-1/+1
|
* 2016-06-11 Paul Pluzhnikov <ppluzhnikov@google.com>Paul Pluzhnikov2016-06-111-1/+1
| | | | | | | | | | | | | | | [BZ #19670] [BZ #19672] * io/test-lfs.c (do_prepare): Use xmalloc. * io/tst-fcntl.c (do_prepare): Likewise. * libio/tst-fopenloc.c (do_bz17916): Likewise. * libio/tst-mmap2-eofsync.c (do_prepare): Likewise. * posix/tst-exec.c (do_prepare): Likewise. * posix/tst-pathconf.c (prepare): Likewise. * posix/tst-spawn.c (do_prepare): Likewise. * posix/tst-truncate.c (do_prepare): Likewise. * rt/tst-aio.c (do_prepare): Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2016-01-041-1/+1
|
* Do not leave files behind in /tmp from testing.Joseph Myers2015-10-151-1/+1
| | | | | | | | | | | | | | | | | | | | | I noticed that glibc testsuite runs left several files behind in /tmp (or TMPDIR, if different). The problem was testcases that generate a template for mkstemp / mkstemp64, ending with XXXXXX, then pass that template to add_temp_file before calling mkstemp / mkstemp64, meaning that the template ending with XXXXXX is stored in the list of temporary files to delete (add_temp_file uses strdup so that the original string doesn't need to stay live), not the actual filename as determined by mkstemp / mkstemp64. This patch fixes those tests to call add_temp_file later. Tested for x86_64 (that the files are no longer left behind by a testsuite run and the modified tests still pass). * io/test-lfs.c (do_prepare): Do not call add_temp_file until after mkstemp64. * login/tst-utmp.c (do_prepare): Likewise. * rt/tst-aio.c (do_prepare): Likewise. * rt/tst-aio64.c (do_prepare): Likewise.
* Readd O_LARGEFILE flag for openat64 (bug 18781)Andreas Schwab2015-08-101-1/+20
|
* Update copyright dates with scripts/update-copyrights.Joseph Myers2015-01-021-1/+1
|
* Update copyright notices with scripts/update-copyrightsAllan McRae2014-01-011-1/+1
|
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-021-1/+1
|
* Replace FSF snail mail address with URLs.Paul Eggert2012-02-091-3/+2
|
* [BZ #2526, BZ #3138, BZ #3143]Ulrich Drepper2006-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 2006-09-12 Jakub Jelinek <jakub@redhat.com> [BZ #2526] * README.libm: Fix a thinko in sqrt algorithm description. [BZ #3143] * manual/string.texi (argz_delete): Fix prototype. Patch by <alpt@freaknet.org>. 2006-08-26 Joseph Myers <joseph@codesourcery.com> [BZ #3138] * io/test-lfs.c (do_prepare): Give name_len type size_t. * io/tst-fcntl.c (do_prepare): Likewise. * posix/tst-exec.c (do_prepare): Likewise. * posix/tst-preadwrite.c (do_prepare): Likewise. * posix/tst-spawn.c (do_prepare): Likewise. * posix/tst-truncate.c (do_prepare): Likewise. * rt/tst-aio.c (do_prepare): Likewise. * rt/tst-aio64.c (do_prepare): Likewise. * stdlib/test-canon2.c (do_prepare): Give test_dir_len type size_t.
* (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.Ulrich Drepper2004-12-221-1/+1
|
* 2.5-18.1Jakub Jelinek2007-07-121-1/+1
|
* Update to LGPL v2.1.Andreas Jaeger2001-07-061-8/+9
| | | | | | | | | | | | | | 2001-07-06 Paul Eggert <eggert@twinsun.com> * manual/argp.texi: Remove ignored LGPL copyright notice; it's not appropriate for documentation anyway. * manual/libc-texinfo.sh: "Library General Public License" -> "Lesser General Public License". 2001-07-06 Andreas Jaeger <aj@suse.de> * All files under GPL/LGPL version 2: Place under LGPL version 2.1.
* Update.Andreas Jaeger2001-06-111-13/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-06-11 Michael Deutschmann <michael@talamasca.ocis.net> * rt/tst-aio4.c (do_test): Test whether rt signals are supported. Use my_signo instead of MY_SIGNO and initialize it so that the used signal is always available. 2001-06-11 Andreas Jaeger <aj@suse.de>, Michael Deutschmann <michael@talamasca.ocis.net> * io/test-lfs.c (do_prepare): Clean up error messages. (test_ftello): Check for EFBIG and ENOSP, clean up error messages. (do_test): Likewise. 2001-06-11 Andreas Jaeger <aj@suse.de> * sysdeps/unix/sysv/linux/powerpc/bits/termios.h (IXANY, IUCLC, IMAXBEL): Make always visible since they're needed by POSIX. Closes PR libc/2320, reported by Chris Yeoh <cyeoh@samba.org>. 2001-06-10 Ben Collins <bcollins@debian.org> * sysdeps/arm/elf/start.S: Use #function, not @function, for .type of _start. * sysdeps/ieee754/ldbl-128/s_ilogbl.c: Include limits.h to get INT_MAX. 2001-06-07 H.J. Lu <hjl@gnu.org> * sunrpc/rpc/rpc.h: Add __BEGIN_DECLS/__END_DECLS.
* Update.Andreas Jaeger2001-02-051-0/+54
| | | | | | * io/test-lfs.c (do_test): Test lseek64 return value, call test_ftello. (test_ftello): New function to test ftello64 and fseeko64.
* Update.Ulrich Drepper2001-01-081-1/+6
| | | | | | | | | | | | * intl/dcigettext.c: Fix a few warnings. Patch by Bruno Haible <haible@ilog.fr>. 2001-01-08 Andreas Jaeger <aj@suse.de> * io/test-lfs.c (do_test): Check lseek64 return for EINVAL. Reported by Joseph S. Myers <jsm28@cam.ac.uk>. 2001-01-08 Ulrich Drepper <drepper@redhat.com>
* Update.Ulrich Drepper2000-11-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 2000-11-20 Jakub Jelinek <jakub@redhat.com> * iconvdata/bug-iconv2.c (main): Use %zd in format string. * io/test-lfs.c (do_test): Cast statbuf.st_size to long long. * malloc/tst-valloc.c (main): Cast valloc return value to long. * malloc/tst-obstack.c (verbose_malloc): Use %zd in format string. * math/test-fpucw.c (main): Use %lx in format string, cast control words to long. * stdio-common/tst-fmemopen.c (main): Use %td in format strings. * stdlib/tst-strtol.c (tests): Avoid (bogus?) decimal constant is so large that it is unsigned warning. * sysdeps/unix/sysv/linux/sparc/bits/types.h (__ssize_t): Changing it to long on sparc64. 2000-11-20 Andreas Jaeger <aj@suse.de> * nscd/nscd.h (termination_handler): Add noreturn attribute. (receiv_print_stats): Likewise. * elf/ldconfig.c (path_hwcap): Cast -1 for proper comparison.
* Update.Ulrich Drepper2000-10-261-15/+25
| | | | | * io/test-lfs.c (do_prepare): Rewrite so it doesn't fail on systems without LFS support.
* * io/test-lfs.c (do_prepare): Call setrlimit64, in case the user Geoff Keating2000-10-241-0/+6
| | | | | | | | | | has a limit set---for instance, a limit of 2^31 bytes, which can't easily be reset by non-LFS-aware shells. 2000-10-24 Geoffrey Keating <geoffk@cygnus.com> * io/test-lfs.c (do_prepare): Call setrlimit64, in case the user has a limit set---for instance, a limit of 2^31 bytes, which can't easily be reset by non-LFS-aware shells.
* Update.Ulrich Drepper2000-09-141-2/+2
| | | | | * io/test-lfs.c (do_test): Allow stat64() to return EOVERFLOW and don't fail.
* Simple tests for LFS.Andreas Jaeger2000-06-301-0/+114