about summary refs log tree commit diff
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Add pretty printers for the NPTL lock types"Siddhesh Poyarekar2016-07-111-118/+0
| | | | | | | | | | | | | | | | This reverts commit 62ce266b0b261def2c6329be9814ffdcc11964d6. The change is not mature enough because it needs the following fixes: 1. Redirect test output to a file like other tests 2. Eliminate the need to use a .gdbinit because distributions will break without it. I should have caught that but I was in too much of a hurry to get the patch in :/ 3. Feature checking during configure to determine things like minimum required gdb version, python-pexpect version, etc. to make sure that tests work correctly.
* Add pretty printers for the NPTL lock typesMartin Galvan2016-07-081-0/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds pretty printers for the following NPTL types: - pthread_mutex_t - pthread_mutexattr_t - pthread_cond_t - pthread_condattr_t - pthread_rwlock_t - pthread_rwlockattr_t To load the pretty printers into your gdb session, do the following: python import sys sys.path.insert(0, '/path/to/glibc/build/nptl/pretty-printers') end source /path/to/glibc/source/pretty-printers/nptl-printers.py You can check which printers are registered and enabled by issuing the 'info pretty-printer' gdb command. Printers should trigger automatically when trying to print a variable of one of the types mentioned above. The printers are architecture-independent, and were manually tested on both the gdb CLI and Eclipse CDT. In order to work, the printers need to know the values of various flags that are scattered throughout pthread.h and pthreadP.h as enums and #defines. Since replicating these constants in the printers file itself would create a maintenance burden, I wrote a script called gen-py-const.awk that Makerules uses to extract the constants. This script is pretty much the same as gen-as-const.awk, except it doesn't cast the constant values to 'long' and is thorougly documented. The constants need only to be enumerated in a .pysym file, which is then referenced by a Make variable called gen-py-const-headers. As for the install directory, I discussed this with Mike Frysinger and Siddhesh Poyarekar, and we agreed that it can be handled in a separate patch, and it shouldn't block merging of this one. In addition, I've written a series of test cases for the pretty printers. Each lock type (mutex, condvar and rwlock) has two test programs, one for itself and other for its related 'attributes' object. Each test program in turn has a PExpect-based Python script that drives gdb and compares its output to the expected printer's. The tests run on the glibc host, which is assumed to have both gdb and PExpect; if either is absent the tests will fail with code 77 (UNSUPPORTED). For cross-testing you should use cross-test-ssh.sh as test-wrapper. I've tested the printers on both a native build and a cross build using a Beaglebone Black, with the build system's filesystem shared with the board through NFS. Finally, I've written a README that explains all this and more. Hopefully this should be good to go in now. Thanks. ChangeLog: 2016-07-04 Martin Galvan <martin.galvan@tallertechnologies.com> * Makeconfig (build-hardcoded-path-in-tests): Set to 'yes' for shared builds if tests-need-hardcoded-path is defined. (all-subdirs): Add pretty-printers. * Makerules ($(py-const)): New rule. * Rules (others): Add $(py-const), if defined. * nptl/Makefile (gen-py-const-headers): Define. * nptl/nptl-printers.py: New file. * nptl/nptl_lock_constants.pysym: Likewise. * pretty-printers/Makefile: Likewise. * pretty-printers/README: Likewise. * pretty-printers/test-condvar-attributes.c: Likewise. * pretty-printers/test-condvar-attributes.p: Likewise. * pretty-printers/test-condvar-printer.c: Likewise. * pretty-printers/test-condvar-printer.py: Likewise. * pretty-printers/test-mutex-attributes.c: Likewise. * pretty-printers/test-mutex-attributes.py: Likewise. * pretty-printers/test-mutex-printer.c: Likewise. * pretty-printers/test-mutex-printer.py: Likewise. * pretty-printers/test-rwlock-attributes.c: Likewise. * pretty-printers/test-rwlock-attributes.py: Likewise. * pretty-printers/test-rwlock-printer.c: Likewise. * pretty-printers/test-rwlock-printer.py: Likewise. * pretty-printers/test_common.py: Likewise. * scripts/gen-py-const.awk: Likewise.
* Add more hurd exception to local headers listSamuel Thibault2016-05-301-1/+1
| | | | | | * scripts/check-local-headers.sh (exclude): Add hurd/ihash.h, and include .*-.*/ in addition to .*-.*-.*/ (i.e. i386-gnu in addition to i386-linux-gnu).
* Allow overriding of CFLAGS as well as CPPFLAGS for rtld.Nick Alcock2016-04-091-1/+1
| | | | | We need this to pass -fno-stack-protector to all the pieces of rtld in non-elf/ directories.
* Make shebang interpreter directives consistentMarko Myllynen2016-01-083-3/+3
| | | | Undo changes in files maintained elsewhere.
* Make shebang interpreter directives consistentMarko Myllynen2016-01-0716-16/+16
|
* Update miscellaneous files from upstream sources.Joseph Myers2016-01-053-34/+80
| | | | | | | | | | | This patch updates texinfo.tex, config.guess, config.sub and move-if-change from their respective upstream sources. * manual/texinfo.tex: Update to version 2016-01-04.21 with trailing whitespace removed. * scripts/config.guess: Update to version 2016-01-01. * scripts/config.sub: Update to version 2016-01-01. * scripts/move-if-change: Update from gnulib.
* Update copyright dates not handled by scripts/update-copyrights.Joseph Myers2016-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've updated copyright dates in glibc for 2016. This is the patch for the changes not generated by scripts/update-copyrights and subsequent build / regeneration of generated files. * NEWS: Update copyright dates. * catgets/gencat.c (print_version): Likewise. * csu/version.c (banner): Likewise. * debug/catchsegv.sh: Likewise. * debug/pcprofiledump.c (print_version): Likewise. * debug/xtrace.sh (do_version): Likewise. * elf/ldconfig.c (print_version): Likewise. * elf/ldd.bash.in: Likewise. * elf/pldd.c (print_version): Likewise. * elf/sotruss.sh: Likewise. * elf/sprof.c (print_version): Likewise. * iconv/iconv_prog.c (print_version): Likewise. * iconv/iconvconfig.c (print_version): Likewise. * locale/programs/locale.c (print_version): Likewise. * locale/programs/localedef.c (print_version): Likewise. * login/programs/pt_chown.c (print_version): Likewise. * malloc/memusage.sh (do_version): Likewise. * malloc/memusagestat.c (print_version): Likewise. * malloc/mtrace.pl: Likewise. * manual/libc.texinfo: Likewise. * nptl/version.c (banner): Likewise. * nscd/nscd.c (print_version): Likewise. * nss/getent.c (print_version): Likewise. * nss/makedb.c (print_version): Likewise. * posix/getconf.c (main): Likewise. * scripts/test-installation.pl: Likewise. * sysdeps/unix/sysv/linux/lddlibc4.c (main): Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2016-01-0413-13/+13
|
* list-fixed-bugs: use argparse for the commandlineMike Frysinger2015-12-291-1/+19
| | | | This makes the interface more friendly to users.
* Use shell's builtin pwd.Ludovic Courtès2015-12-021-13/+5
| | | | | Insisting on /bin/pwd is unnecessary nowadays. Autoconf-generated scripts have been using the shell's built-in "pwd" for a long time.`
* Implement "make update-all-abi"Florian Weimer2015-11-241-0/+66
| | | | | | | | * scripts/update-abilist.sh: New file. * Makefile (+subdir_targets): Add subdir_update-all-abi. * Makerules (update-all-abi-%, update-all-abi) (subdir_update-all-abi): New targets. * elf/Makefile (update-all-abi): New target.
* pylintrc: disable reportsMike Frysinger2015-11-111-1/+1
| | | | | I've never found these useful, nor found anyone else who likes them. Turn them off by default.
* Simplify the abilist formatFlorian Weimer2015-11-061-58/+9
| | | | | | | | | | | | | | | The new format lists the version on each line, as in: VERSION SYMBOL TYPE [VALUE] This makes it easier to process the files with line-oriented tools. The abilist files were converted with this awk script: /^[^ ]/ { version = $1 } /^ / { print version, substr($0, 2) } And sorted under the "C" locale with sort.
* Add script to list fixed bugs for the NEWS file.Joseph Myers2015-11-051-0/+46
| | | | | | | | | | This patch adds a script to list fixed bugs for the NEWS file, as proposed in <https://sourceware.org/ml/libc-alpha/2015-10/msg01043.html>, with the bugs listed in the format proposed in <https://sourceware.org/ml/libc-alpha/2015-11/msg00088.html>. * scripts/list-fixed-bugs.py: New file.
* Support PLT and GOT references in local PIC checkH.J. Lu2015-10-141-1/+1
| | | | | | | | | | | | | | Linker in binutils 2.26 and newer generate GOT references instead PLT references when -z now is passed to linker. We need to extend scripts/localplt.awk to allow PLT or GOT references. [BZ #19007] * scripts/localplt.awk: Also allow GOT references. * sysdeps/unix/sysv/linux/i386/localplt.data: Mark _Unwind_Find_FDE, calloc, memalign, realloc and __libc_memalign with "+ REL R_386_GLOB_DAT". * sysdeps/x86_64/localplt.data: Mark calloc, memalign, realloc and __libc_memalign with "+ RELA R_X86_64_GLOB_DAT".
* Remove scripts/rpm2dynsym.sh.Joseph Myers2015-10-061-36/+0
| | | | | | | | | | The file scripts/rpm2dynsym.sh appears to be unused anywhere in glibc. This patch removes this script. Tested for x86_64 and x86 (testsuite, and that installed shared libraries are unchanged by the patch). * scripts/rpm2dynsym.sh: Remove file.
* [BZ #18796]Andrew Senkevich2015-08-191-1/+12
| | | | | * scripts/test-installation.pl: Don't add -lmvec to build options if libmvec wasn't built.
* gawk: fix gensub usageMike Frysinger2015-08-091-1/+1
| | | | | | The third arg can either be a string with "g" or "G", or it is a number. The empty string elicits a warning with newer versions like so: gawk: scripts/sysd-rules.awk:56: warning: gensub: third argument `' treated as 1
* Extend local PLT reference checkH.J. Lu2015-07-292-5/+82
| | | | | | | | | | | | | | On x86, linker in binutils 2.26 and newer consolidates R_*_JUMP_SLOT with R_*_GLOB_DAT relocation against the same symbol. This patch extends local PLT reference check to support alternate relocations. [BZ #18078] * scripts/check-localplt.awk: Support alternate relocations. * scripts/localplt.awk: Also check relocations in DT_RELA/DT_REL sections. * sysdeps/unix/sysv/linux/i386/localplt.data: Mark free and malloc entries with + REL R_386_GLOB_DAT. * sysdeps/x86_64/localplt.data: New file.
* Add more exception to local headers listSamuel Thibault2015-03-231-1/+1
| | | | | | * scripts/check-local-headers.sh (exclude): Add device/, hurd/hurd_types.h, hurd/ioctl_types.h, hurd/paths.h, hurd/ioctls.defs, cthreads.h.
* Let tests result in UNSUPPORTED; use that for unbuildable C++ casesRoland McGrath2015-03-101-8/+13
|
* Fix localplt test breakage with new readelfAlan Modra2015-03-031-2/+2
| | | | | | | | | Since 2014-11-24 binutils git commit bb4d2ac2, readelf has appended the symbol version to symbols shown in reloc dumps. [BZ #16512] * scripts/localplt.awk: Strip off symbol version. * NEWS: Mention bug fix.
* Update copyright dates not handled by scripts/update-copyrights.Joseph Myers2015-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've updated copyright dates in glibc for 2015. This is the patch for the changes not generated by scripts/update-copyrights and subsequent build / regeneration of generated files. Apart from the files updated last time (of which sotruss.ksh had moved to sotruss.sh during the year) this also updates nptl/version.c (missed from 2006 until October) and sysdeps/unix/sysv/linux/lddlibc4.c (missed since 2009). * NEWS: Update copyright dates. * catgets/gencat.c (print_version): Likewise. * csu/version.c (banner): Likewise. * debug/catchsegv.sh: Likewise. * debug/pcprofiledump.c (print_version): Likewise. * debug/xtrace.sh (do_version): Likewise. * elf/ldconfig.c (print_version): Likewise. * elf/ldd.bash.in: Likewise. * elf/pldd.c (print_version): Likewise. * elf/sotruss.sh: Likewise. * elf/sprof.c (print_version): Likewise. * iconv/iconv_prog.c (print_version): Likewise. * iconv/iconvconfig.c (print_version): Likewise. * locale/programs/locale.c (print_version): Likewise. * locale/programs/localedef.c (print_version): Likewise. * login/programs/pt_chown.c (print_version): Likewise. * malloc/memusage.sh (do_version): Likewise. * malloc/memusagestat.c (print_version): Likewise. * malloc/mtrace.pl: Likewise. * manual/libc.texinfo: Likewise. * nptl/version.c (banner): Likewise. * nscd/nscd.c (print_version): Likewise. * nss/getent.c (print_version): Likewise. * nss/makedb.c (print_version): Likewise. * posix/getconf.c (main): Likewise. * scripts/test-installation.pl: Likewise. * sysdeps/unix/sysv/linux/lddlibc4.c (main): Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2015-01-0211-11/+11
|
* Remove uses of sprintf in gen-posix-conf-vars.awkSiddhesh Poyarekar2015-01-021-5/+2
| | | | Simply some code by replacing sprintf in the awk script.
* Use one-dimension arrays in gen-posix-conf-vars.awkSiddhesh Poyarekar2014-12-311-23/+23
| | | | | | | | | | | | True multi-dimensional arrays were introduced in awk 4.0 and we support awk versions as early as 3.12. Use a single subscript of the form prefix_conf instead of two dimensions to work around this limitation. We also need one additional array of just the conf names subscripted by the prefix_conf to print the names for the specifications. * scripts/gen-posix-conf-vars.awk: Don't use multi-dimensional arrays.
* Make type for spec variable size as size_tSiddhesh Poyarekar2014-12-291-1/+1
|
* Use posix-conf-vars.list to generate spec arraySiddhesh Poyarekar2014-12-291-0/+28
| | | | | | | | | | | | | | | | | | This patch adds support to generate the spec array in getconf from the conf.list. The generated code is mostly unchanged. the only changes are due to the change in layout of the spec and val arrays in the ELF. The val array can also be auto-generated from posix-conf-vars.list once the remaining macros are added to it. * posix/posix-conf-vars.list (SPEC:XBS5): Add sysconf prefix. * posix/confstr.c: Define NEED_SPEC_ARRAY to 0. * posix/posix-envs.def: Likewise. * sysdeps/posix/sysconf.c: Likewise. * posix/getconf.c: Define NEED_SPEC_ARRAY to 1. (specs): Remove array. * scripts/gen-posix-conf-vars.awk: Support generation of specs array.
* Remove Wundef warnings for specification macrosSiddhesh Poyarekar2014-12-291-0/+61
| | | | | | | | | | | | | | | | | | | | | This patch adds a file posix-conf-vars.list that is used to generate macros to determine if a macro is defined as set, unset or not defined. gen-posix-conf-vars.awk processes this file and generates a header (posix-conf-vars-def.h) with these macros. A new header posix-conf-vars.h includes this generated header and defines accessor macros for the generated macros. Tested on x86_64. * posix/Makefile (before-compile): Add posix-conf-vars-def.h. ($(objpfx)posix-conf-vars-def.h): New target. * posix/posix-conf-vars.list: New file. * posix/posix-conf-vars.h: New file. * posix/confstr.c: Include posix-conf-vars.h. (confstr): Use CONF_IS_* macros. * posix/posix-envs.def: Include posix-conf-vars.h. Use CONF_IS_* macros. * scripts/gen-posix-conf-vars.awk: New file.
* Auto-generate libc-modules.hSiddhesh Poyarekar2014-11-191-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove libc-modules.h from the tree and auto-generate it from soversions.i and the list of modules in the built-modules variable defined in Makeconfig. Macros generated have increasing numbered values, with built-modules having lower values starting from 1, following which a separator value LIBS_BEGIN is added and then finally the library names from soversions.i are appended to the list. This allows us to conveniently differentiate between the versioned libraries and other built modules, which is needed in errno.h and netdb.h to decide whether to use an internal symbol or an external one. Verified that generated code remains unchanged on x86_64. * Makeconfig (built-modules): List non-library modules to be built. (module-cppflags): Include libc-modules.h for everything except shlib-versions.v.i. (CPPFLAGS): Use it. (before-compile): Add libc-modules.h. ($(common-objpfx)libc-modules.h, $(common-objpfx)libc-modules.stmp): New targets. (common-generated): Add libc-modules.h and libc-modules.stmp. ($(common-objpfx)Versions.v.i): Depend on libc-modules.h. * include/libc-symbols.h: Don't include libc-modules.h. * include/libc-modules.h: Remove file. * scripts/gen-libc-modules.awk: New script to generate libc-modules.h. * sysdeps/unix/Makefile ($(common-objpfx)sysd-syscalls): Depend on libc-modules.stmp.
* Clean up gnu/lib-names.h generation (bug 14171).Joseph Myers2014-09-261-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch eliminates the mixture of SONAME information in shlib-versions files and SONAME information used to generate gnu/lib-names.h in makefiles, with the information in the makefiles being removed so all this information comes from the shlib-versions files. So that gnu/lib-names.h supports multiple ABIs, it is changed to be generated on the same basis as gnu/stubs.h: when there are multiple ABIs, gnu/lib-names.h is a wrapper header (the same header installed whatever ABI is being built) and separate headers such as gnu/lib-names-64.h contain the substantive contents (only one such header being installed by any glibc build). The rules for building gnu/lib-names.h were moved from Makeconfig to Makerules because they need to come after sysdeps makefiles are included (now that "ifndef abi-variants" is a toplevel conditional on the rules rather than $(abi-variants) being evaluated later inside the commands for a rule). Tested for x86_64 and x86 that the installed shared libraries are unchanged by this patch, and examined the installed gnu/lib-names*.h headers by hand. Also tested the case of a single ABI (where there is just a single header installed, again like stubs.h) by hacking abi-variants to empty for x86_64. [BZ #14171] * Makeconfig [$(build-shared) = yes] ($(common-objpfx)soversions.mk): Don't handle SONAMEs specified in makefiles. [$(build-shared) = yes && $(soversions.mk-done) = t] ($(common-objpfx)gnu/lib-names.h): Remove rule. [$(build-shared) = yes && $(soversions.mk-done) = t] ($(common-objpfx)gnu/lib-names.stmp): Likewise. Split and moved to Makerules. [$(build-shared) = yes && $(soversions.mk-done) = t] (before-compile): Don't append $(common-objpfx)gnu/lib-names.h here. [$(build-shared) = yes && $(soversions.mk-done) = t] (common-generated): Don't append gnu/lib-names.h and gnu/lib-names.stmp here. * Makerules [$(build-shared) = yes && $(soversions.mk-done) = t] (lib-names-h-abi): New variable. [$(build-shared) = yes && $(soversions.mk-done) = t] (lib-names-stmp-abi): Likewise. [$(build-shared) = yes && $(soversions.mk-done) = t && abi-variants] (before-compile): Append $(common-objpfx)$(lib-names-h-abi). [$(build-shared) = yes && $(soversions.mk-done) = t && abi-variants] (common-generated): Append gnu/lib-names.h. [$(build-shared) = yes && $(soversions.mk-done) = t && abi-variants] (install-others-nosubdir): Depend on $(inst_includedir)/$(lib-names-h-abi). [$(build-shared) = yes && $(soversions.mk-done) = t && abi-variants] ($(common-objpfx)gnu/lib-names.h): New rule. [$(build-shared) = yes && $(soversions.mk-done) = t] ($(common-objpfx)$(lib-names-h-abi)): New rule. [$(build-shared) = yes && $(soversions.mk-done) = t] ($(common-objpfx)$(lib-names-stmp-abi)): Likewise. [$(build-shared) = yes && $(soversions.mk-done) = t] (common-generated): Append $(lib-names-h-abi) and $(lib-names-stmp-abi). * scripts/lib-names.awk: Do not handle multi being set. * sysdeps/unix/sysv/linux/aarch64/Makefile (abi-lp64-ld-soname): Remove variable. (abi-lp64_be-ld-soname): Likewise. * sysdeps/unix/sysv/linux/arm/Makefile (abi-soft-ld-soname): Likewise. (abi-hard-ld-soname): Likewise. * sysdeps/unix/sysv/linux/i386/shlib-versions: New file. * sysdeps/unix/sysv/linux/mips/Makefile (abi-o32_soft-ld-soname): Remove variable. (abi-o32_hard-ld-soname): Likewise. (abi-o32_soft_2008-ld-soname): Likewise. (abi-o32_hard_2008-ld-soname): Likewise. (abi-n32_soft-ld-soname): Likewise. (abi-n32_hard-ld-soname): Likewise. (abi-n32_soft_2008-ld-soname): Likewise. (abi-n32_hard_2008-ld-soname): Likewise. (abi-n64_soft-ld-soname): Likewise. (abi-n64_hard-ld-soname): Likewise. (abi-n64_soft_2008-ld-soname): Likewise. (abi-n64_hard_2008-ld-soname): Likewise. * sysdeps/unix/sysv/linux/powerpc/Makefile (abi-64-v1-ld-soname): Likewise. (abi-64-v2-ld-soname): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions: Add ld.so entries. * sysdeps/unix/sysv/linux/s390/Makefile (abi-64-ld-soname): Remove variable. * sysdeps/unix/sysv/linux/s390/s390-64/shlib-versions: Add ld.so entry. * sysdeps/unix/sysv/linux/x86/Makefile (abi-32-ld-soname): Remove variable. (abi-64-ld-soname): Likewise. (abi-x32-ld-soname): Likewise. * sysdeps/unix/sysv/linux/x86_64/64/shlib-versions: Add ld.so entry. * sysdeps/unix/sysv/linux/x86_64/x32/shlib-versions: Likewise.
* Remove bitrotten --enable-oldest-abi (bug 6652).Joseph Myers2014-09-162-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the --enable-oldest-abi configure option, which has long been bitrotten (as reported in bug 6652). The principle of removing this option was agreed in the thread starting at <https://sourceware.org/ml/libc-alpha/2013-07/msg00174.html>. Tested for x86_64 and x86 that the installed shared libraries other than libc.so are unchanged by this patch and that libc.so disassembly and symbol versions are unchanged (debug info changes because of changed line numbers in csu/version.c). [BZ #6652] * Makeconfig (soversions-default-setname): Remove variable. ($(common-objpfx)soversions.i): Don't pass default_setname to soversions.awk. * Makerules ($(common-objpfx)abi-versions.h): Don't pass oldest_abi to abi-versions.awk. * config.h.in (GLIBC_OLDEST_ABI): Remove macro undefine. * config.make.in (oldest-abi): Remove variable. * configure.ac (--enable-oldest-abi): Remove configure option. * configure: Regenerated. * csu/version.c (banner) [GLIBC_OLDEST_ABI]: Remove conditional text. * scripts/abi-versions.awk: Do not handle oldest_abi variable. * scripts/soversions.awk: Do not handle default_setname variable. * sysdeps/mach/hurd/configure.ac: Do not handle oldest_abi variable. * sysdeps/mach/hurd/configure: Regenerated. * sysdeps/unix/sysv/linux/configure.ac: Do not handle oldest_abi variable. * sysdeps/unix/sysv/linux/configure: Regenerated.
* Remove configuration name patterns from shlib-versions.Joseph Myers2014-09-121-41/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the first column (patterns matching configuration names) from shlib-versions, leaving shlib-versions entry selection based purely on sysdeps directories. An implication of this removal is that the default for any non-Linux ports using NPTL will be the same SONAMEs for NPTL libraries as for Linux (as those defaults, previously limited to .*-.*-linux.*, are left in nptl/shlib-versions and nptl_db/shlib-versions). Special host_os handling in configure.ac that was purely for shlib-versions is removed. (The host_os setting is still used for libc-abis - see <https://sourceware.org/ml/libc-alpha/2014-01/msg00375.html> regarding that - but no entries there are affected by this change.) Tested on x86_64 and x86 that the installed shared libraries are unchanged by this patch. * scripts/soversions.awk: Do not handle configuration names. * Makeconfig ($(common-objpfx)soversions.i): Do not pass cpu, vendor and os variables to soversions.awk. * configure.ac: Do not modify gnu-* host_os. * configure: Regenerated * shlib-versions: Remove first column with configuration names. * nptl/shlib-versions: Likewise. * nptl_db/shlib-versions: Likewise. * sysdeps/hppa/shlib-versions: Likewise. * sysdeps/m68k/shlib-versions: Likewise. * sysdeps/mach/hurd/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/aarch64/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/alpha/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/arm/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/hppa/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/ia64/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/microblaze/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/mips/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/sh/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/tile/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/shlib-versions: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/shlib-versions: Likewise. libidn/ChangeLog: * shlib-versions: Remove first column with configuration names.
* Remove shlib-versions ABI names support.Joseph Myers2014-06-271-13/+0
| | | | | | | | | | | | | | | | | | | | shlib-versions files can contain ABI lines that map triplets to a canonical ABI name. This name was once used for various purposes where test baseline files for different ABIs went in a single directory; now these purposes use sysdeps files, generation of headers which have per-ABI variants uses abi-variants and related Makefile variables and the shlib-versions ABI names are unused. This patch duly removes those lines and associated build system support for them. Tested for x86_64 (both a full testsuite run and confirming the installed shared libraries are unchanged by the patch). * Makeconfig ($(common-objpfx)soversions.mk): Do not generate abi-name definition. * scripts/soversions.awk: Do not handle or generate ABI lines. * shlib-versions: Remove ABI entries. * sysdeps/powerpc/nofpu/shlib-versions: Remove file. * sysdeps/x86_64/x32/shlib-versions: Remove ABI entry.
* Update scripts/list-sources.sh for ports repository merge.Joseph Myers2014-06-261-14/+0
| | | | | | | | | | scripts/list-sources.sh includes handling of ports that has been obsolete ever since the ports repository was merged into the libc repository. This patch removes that handling. Tested by regenerating libc.pot and examining the resulting changes. * scripts/list-sources.sh: Do not handle ports specially.
* Update miscellaneous files from upstream sources.Joseph Myers2014-06-264-362/+189
| | | | | | | | | | | | | | | | This patch updates miscellaneous files from their upstream sources: texinfo.tex from Texinfo, config.guess and config.sub from config.git, install-sh from automake and move-if-change from gnulib. Tested x86_64 that installed shared libraries are unchanged by the patch; also looked at the generated libc.pdf manual. * manual/texinfo.tex: Update to version 2014-05-05.10 with trailing whitespace removed. * scripts/config.guess: Update to version 2014-03-23. * scripts/config.sub: Update to version 2014-05-01 * scripts/install-sh: Update to version 2013-12-25.23. * scripts/move-if-change: Update from gnulib.
* Pass $TIMEOUTFACTOR to tests also in cross testingAndreas Schwab2014-06-161-1/+1
|
* Don't require test wrappers to preserve environment variables, use more ↵Joseph Myers2014-06-061-23/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | consistent environment. One wart in the original support for test wrappers for cross testing, as noted in <https://sourceware.org/ml/libc-alpha/2012-10/msg00722.html>, is the requirement for test wrappers to pass a poorly-defined set of environment variables from the build system to the system running the glibc under test. Although some variables are passed explicitly via $(test-wrapper-env), including LD_* variables that simply can't be passed implicitly because of the side effects they'd have on the build system's dynamic linker, others are passed implicitly, including variables such as GCONV_PATH and LOCPATH that could potentially affect the build system's libc (so effectively relying on any such effects not breaking the wrappers). In addition, the code in cross-test-ssh.sh for preserving environment variables is fragile (it depends on how bash formats a list of exported variables, and could well break for multi-line variable definitions where the contents contain things looking like other variable definitions). This patch moves to explicitly passing environment variables via $(test-wrapper-env). Makefile variables that previously used $(test-wrapper) are split up into -before-env and -after-env parts that can be passed separately to the various .sh files used in testing, so those files can then insert environment settings between the two parts. The common default environment settings in make-test-out are made into a separate makefile variable that can also be passed to scripts, rather than many scripts duplicating those settings (for testing an installed glibc, it is desirable to have the GCONV_PATH setting on just one place, so just that one place needs to support it pointing to an installed sysroot instead of the build tree). The default settings are included in the variables such as $(test-program-prefix), so that if tests do not need any non-default settings they can continue to use single variables rather than the split-up variables. Although this patch cleans up LC_ALL=C settings (that being part of the common defaults), various LANG=C and LANGUAGE=C settings remain. Those are generally unnecessary and I propose a subsequent cleanup to remove them. LC_ALL takes precedence over LANG, and while LANGUAGE takes precedence over LC_ALL, it only does so for settings other than LC_ALL=C. So LC_ALL=C on its own is sufficient to ensure the C locale, and anything that gets LC_ALL=C does not need the other settings. While preparing this patch I noticed some tests with .sh files that appeared to do nothing beyond what the generic makefile support for tests can do (localedata/tst-wctype.sh - the makefiles support -ENV variables and .input files - and localedata/tst-mbswcs.sh - just runs five tests that could be run individually from the makefile). So I propose another subsequent cleanup to move those to using the generic support instead of special .sh files. Tested x86_64 (native) and powerpc32 (cross). * Makeconfig (run-program-env): New variable. (run-program-prefix-before-env): Likewise. (run-program-prefix-after-env): Likewise. (run-program-prefix): Define in terms of new variables. (built-program-cmd-before-env): New variable. (built-program-cmd-after-env): Likewise. (built-program-cmd): Define in terms of new variables. (test-program-prefix-before-env): New variable. (test-program-prefix-after-env): Likewise. (test-program-prefix): Define in terms of new variables. (test-program-cmd-before-env): New variable. (test-program-cmd-after-env): Likewise. (test-program-cmd): Define in terms of new variables. * Rules (make-test-out): Use $(run-program-env). * scripts/cross-test-ssh.sh (env_blacklist): Remove variable. (help): Do not mention environment variables. Mention --timeoutfactor option. (timeoutfactor): New variable. (blacklist_exports): Remove function. (exports): Remove variable. (command): Do not include ${exports}. * manual/install.texi (Configuring and compiling): Do not mention test wrappers preserving environment variables. Mention that last assignment to a variable must take precedence. * INSTALL: Regenerated. * benchtests/Makefile (run-bench): Use $(run-program-env). * catgets/Makefile ($(objpfx)test1.cat): Use $(built-program-cmd-before-env), $(run-program-env) and $(built-program-cmd-after-env). ($(objpfx)test2.cat): Do not specify environment variables explicitly. ($(objpfx)de/libc.cat): Use $(built-program-cmd-before-env), $(run-program-env) and $(built-program-cmd-after-env). ($(objpfx)test-gencat.out): Use $(test-program-cmd-before-env), $(run-program-env) and $(test-program-cmd-after-env). ($(objpfx)sample.SJIS.cat): Do not specify environment variables explicitly. * catgets/test-gencat.sh: Use test_program_cmd_before_env, run_program_env and test_program_cmd_after_env arguments. * elf/Makefile ($(objpfx)tst-pathopt.out): Use $(run-program-env). * elf/tst-pathopt.sh: Use run_program_env argument. * iconvdata/Makefile ($(objpfx)iconv-test.out): Use $(test-wrapper-env) and $(run-program-env). * iconvdata/run-iconv-test.sh: Use test_wrapper_env and run_program_env arguments. * iconvdata/tst-table.sh: Do not set GCONV_PATH explicitly. * intl/Makefile ($(objpfx)tst-gettext.out): Use $(test-program-prefix-before-env), $(run-program-env) and $(test-program-prefix-after-env). ($(objpfx)tst-gettext2.out): Likewise. * intl/tst-gettext.sh: Use test_program_prefix_before_env, run_program_env and test_program_prefix_after_env arguments. * intl/tst-gettext2.sh: Likewise. * intl/tst-gettext4.sh: Do not set environment variables explicitly. * intl/tst-gettext6.sh: Likewise. * intl/tst-translit.sh: Likewise. * malloc/Makefile ($(objpfx)tst-mtrace.out): Use $(test-program-prefix-before-env), $(run-program-env) and $(test-program-prefix-after-env). * malloc/tst-mtrace.sh: Use test_program_prefix_before_env, run_program_env and test_program_prefix_after_env arguments. * math/Makefile (run-regen-ulps): Use $(run-program-env). * nptl/Makefile ($(objpfx)tst-tls6.out): Use $(run-program-env). * nptl/tst-tls6.sh: Use run_program_env argument. Set LANG=C explicitly with each use of ${test_wrapper_env}. * posix/Makefile ($(objpfx)wordexp-tst.out): Use $(test-program-prefix-before-env), $(run-program-env) and $(test-program-prefix-after-env). * posix/tst-getconf.sh: Do not set environment variables explicitly. * posix/wordexp-tst.sh: Use test_program_prefix_before_env, run_program_env and test_program_prefix_after_env arguments. * stdio-common/tst-printf.sh: Do not set environment variables explicitly. * stdlib/Makefile ($(objpfx)tst-fmtmsg.out): Use $(test-program-prefix-before-env), $(run-program-env) and $(test-program-prefix-after-env). * stdlib/tst-fmtmsg.sh: Use test_program_prefix_before_env, run_program_env and test_program_prefix_after_env arguments. Split $test calls into $test_pre and $test. * timezone/Makefile (build-testdata): Use $(built-program-cmd-before-env), $(run-program-env) and $(built-program-cmd-after-env). localedata/ChangeLog: * Makefile ($(addprefix $(objpfx),$(CTYPE_FILES))): Use $(built-program-cmd-before-env), $(run-program-env) and $(built-program-cmd-after-env). ($(objpfx)sort-test.out): Use $(test-program-prefix-before-env), $(run-program-env) and $(test-program-prefix-after-env). ($(objpfx)tst-fmon.out): Use $(run-program-prefix-before-env), $(run-program-env) and $(run-program-prefix-after-env). ($(objpfx)tst-locale.out): Use $(built-program-cmd-before-env), $(run-program-env) and $(built-program-cmd-after-env). ($(objpfx)tst-trans.out): Use $(run-program-prefix-before-env), $(run-program-env), $(run-program-prefix-after-env), $(test-program-prefix-before-env) and $(test-program-prefix-after-env). ($(objpfx)tst-ctype.out): Use $(test-program-cmd-before-env), $(run-program-env) and $(test-program-cmd-after-env). ($(objpfx)tst-wctype.out): Likewise. ($(objpfx)tst-langinfo.out): Likewise. ($(objpfx)tst-langinfo-static.out): Likewise. * gen-locale.sh: Use localedef_before_env, run_program_env and localedef_after_env arguments. * sort-test.sh: Use test_program_prefix_before_env, run_program_env and test_program_prefix_after_env arguments. * tst-ctype.sh: Use tst_ctype_before_env, run_program_env and tst_ctype_after_env arguments. * tst-fmon.sh: Use run_program_prefix_before_env, run_program_env and run_program_prefix_after_env arguments. * tst-langinfo.sh: Use tst_langinfo_before_env, run_program_env and tst_langinfo_after_env arguments. * tst-locale.sh: Use localedef_before_env, run_program_env and localedef_after_env arguments. * tst-mbswcs.sh: Do not set environment variables explicitly. * tst-numeric.sh: Likewise. * tst-rpmatch.sh: Likewise. * tst-trans.sh: Use run_program_prefix_before_env, run_program_env, run_program_prefix_after_env, test_program_prefix_before_env and test_program_prefix_after_env arguments. * tst-wctype.sh: Use tst_wctype_before_env, run_program_env and tst_wctype_after_env arguments.
* Kludge fix for Versions.def regressionRoland McGrath2014-03-251-5/+33
|
* Fix localplt check for GNU_IFUNCAdhemerval Zanella2014-03-251-2/+8
| | | | | | | | GNU_IFUNC are shown by readelf in 'Relocation section' value as "symbol()" instead of expected hexadecimal value. This causes the check-localplt script to ignore potential PLT stub begin generated by wrong IFUNC usage. This patch changes the localplt script to emit such PLT cases.
* benchtests: Move bench.py to benchtests/scripts/Siddhesh Poyarekar2014-03-241-299/+0
| | | | | It makes much more sense to have all benchmarking-related scripts in a single place away from everything else.
* Implement benchmarking script in pythonSiddhesh Poyarekar2014-03-214-205/+578
| | | | | Implemented the benchmark script in python since it is much cleaner and simpler to maintain.
* Work around binutils bugs in 2.23 and olderRoland McGrath2014-03-181-0/+4
| | | | | binutils versions up through at least 2.23 have some bugs that cause STV_HIDDEN symbols to appear in .dynsyms.
* Do not terminate default test runs on test failure.Joseph Myers2014-03-141-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is an updated version of <https://sourceware.org/ml/libc-alpha/2014-01/msg00198.html> and <https://sourceware.org/ml/libc-alpha/2014-03/msg00180.html>. Normal practice for software testsuites is that rather than terminating immediately when a test fails, they continue running and report at the end on how many tests passed or failed. The principle behind the glibc testsuite stopping on failure was probably that the expected state is no failures and so any failure indicates a problem such as miscompilation. In practice, while this is fairly close to true for native testing on x86_64 and x86 (kernel bugs and race conditions can still cause intermittent failures), it's less likely to be the case on other platforms, and so people testing glibc run the testsuite with "make -k" and then examine the logs to determine whether the failures are what they expect to fail on that platform, possibly with some automation for the comparison. This patch switches the glibc testsuite to the normal convention of not stopping on failure - unless you use stop-on-test-failure=y, in which case it behaves essentially as it did before (and does not generate overall test summaries on failure). Instead, the summary tests.sum may contain tests that FAILed. At the end of the test run, any FAIL or ERROR lines from tests.sum are printed, and then it exits with error status if there were any such lines. In addition, build failures will also cause the test run to stop - this has the justification that those *do* indicate serious problems that should be promptly fixed and aren't generally hard to fix (but apart from that, avoiding the build stopping on those failures seems harder). Note that unlike the previous patches in this series, this *does* require people with automation around testing glibc to change their processes - either to start using tests.sum / xtests.sum to track failures and compare them with expectations (with or without also using "make -k" and examining "make" logs to identify build failures), or else to use stop-on-test-failure=y and ignore the new tests.sum / xtests.sum mechanism. (If all you check is the exit status from "make check", no changes are needed unless you want to avoid test runs continuing after the first failure.) Tested x86_64. * scripts/evaluate-test.sh: Handle fourth argument to determine whether test run should stop on failure. * Makeconfig (stop-on-test-failure): New variable. (evaluate-test): Pass fourth argument to evaluate-test.sh based on $(stop-on-test-failure). * Makefile (tests): Give a summary of results from testing and exit with failure status if they include an ERROR or FAIL. (xtests): Likewise. * manual/install.texi (Configuring and compiling): Mention stop-on-test-failure=y. * INSTALL: Regenerated.
* Get rid of Versions.def source fileRoland McGrath2014-03-141-0/+39
|
* Generate overall summary of test results.Joseph Myers2014-03-071-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch, an updated version of <https://sourceware.org/ml/libc-alpha/2014-01/msg00197.html>, makes testsuite runs generate an overall summary of test results. A new script merge-test-results.sh deals both with collecting results within a directory to a file with all the results from that directory, and collecting the results from subdirectories into a single overall file (there's not much in common between the two modes of operation of the script, but it seemed silly to have two separate scripts for this). Within a directory, missing results produce UNRESOLVED lines; at top level, missing results for a whole directory produce an ERROR line (since toplevel can't identify what the specific missing tests are in this case). Note that this does not change the rules for when "make" considers there has been an error, or terminates, so unexpected failures will still cause make to terminate, or, with -k, mean the commands for "tests" don't get run because of failure of a dependency. Tested x86_64, including that the summary does in fact reflect all the tests with .test-result files. * scripts/merge-test-results.sh: New file. * Makefile (tests-special-notdir): New variable. (tests): Run merge-test-results.sh. (xtests): Likewise. * Rules (tests-special-notdir): New variable. (xtests-special-notdir): Likewise. (tests): Run merge-test-results.sh (xtests): Likewise.
* Support expected failures in .test-result files.Joseph Myers2014-02-271-2/+9
| | | | | | | | | | | | | | | | | | | | | | | This patch, an updated version of <https://sourceware.org/ml/libc-alpha/2014-01/msg00195.html>, makes it possible for .test-result files for individual tests to contain XPASS and XFAIL rather than PASS and FAIL in cases where failure is expected. This replaces the marking of two individual tests with "-" to cause them to be expected at makefile level to fail; evaluate-test.sh will ensure it exits with status 0 for an expected failure. Tested x86_64. * scripts/evaluate-test.sh: Take new argument indicating whether failure is expected. * Makeconfig (evaluate-test): Pass argument to evaluate-test.sh indicating whether failure is expected. * conform/Makefile (test-xfail-run-conformtest): New variable. ($(objpfx)run-conformtest.out): Don't expect to fail at makefile level. * posix/Makefile (test-xfail-annexc): New variable. ($(objpfx)annexc.out): Don't expect to fail at makefile level.
* Generate .test-result files for ordinary tests.Tomas Dohnalek2014-02-151-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch, an updated version of <https://sourceware.org/ml/libc-alpha/2014-01/msg00193.html>, starts the process of generating explicit PASS or FAIL status for individual glibc tests. It's based on Tomas Dohnalek's patch <https://sourceware.org/ml/libc-alpha/2012-10/msg00278.html>, but is deliberately more minimal: it doesn't try to cover any tests outside of $(tests) / $(xtests) (that's for a later patch), nor does it put the result together in an overall summary file (again, a later patch): it just generates the .test-result files. Thus, this patch keeps the overall logic for when a testsuite run finishes completely unchanged: a test failing will terminate the run. I think we *should* move to a more conventional approach where plain "make check" does not terminate for an individual test failure, unless e.g. you say "make stop-on-test-failure=y check", but that sort of policy change is best done as a separate patch once the infrastructure is in place to generate summary files for completed test runs (which will entirely consist of PASS and XFAIL lines if the testsuite run reaches the point of generating them, until such a policy change is made). Tested x86_64. 2014-02-14 Tomas Dohnalek <tdohnale@redhat.com> Joseph Myers <joseph@codesourcery.com> * Makeconfig (test-name): New variable. (evaluate-test): Likewise. * Makerules (do-test-clean): Remove .test-result files. (common-mostlyclean): Likewise. * Rules ($(objpfx)%.out): Use $(evaluate-test) in both rules. * scripts/evaluate-test.sh: New file.
* scripts/update-copyrights: adjust configure input file suffixAllan McRae2014-01-011-1/+1
|