about summary refs log tree commit diff
path: root/nptl
Commit message (Collapse)AuthorAgeFilesLines
* Fix lll_unlock twice in pthread_cond_broadcastYang Yingliang2014-04-301-0/+1
| | | | | | | | | | lll_unlock() will be called again if it goes to "wake_all" in pthread_cond_broadcast(). This may make another thread which is waiting for lock in pthread_cond_timedwait() unlock. So there are more than one threads get the lock, it will break the shared data. It's introduced by commit 8313cb997d2d("FUTEX_*_REQUEUE_PI support for non-x86 code")
* Use test-skeleton.c in tst-sem3 and tst-sem4Siddhesh Poyarekar2014-04-232-15/+21
|
* Include atomic.h in sem_wait.c and sem_trywait.cSiddhesh Poyarekar2014-04-222-0/+2
|
* PowerPC: Sync pthread_once with default implementationAdhemerval Zanella2014-04-171-110/+0
| | | | | | | | This patch removes the arch specific powerpc implementation and instead uses the linux default one. Although the current powerpc implementation already constains the required memory barriers for correct initialization, the default implementation shows a better performance on newer chips.
* Fixed and unified pthread_once.Torvald Riegel2014-04-112-93/+131
| | | | | | | [BZ #15215] This unifies various pthread_once architecture-specific implementations which were using the same algorithm with slightly different implementations. It also adds missing memory barriers that are required for correctness.
* Move __PTHREAD_SPINS definition to architecture specific headerAdhemerval Zanella2014-04-096-13/+15
| | | | | | | This patch moves the __PTHREAD_SPINS definition to arch specific header since pthread_mutex_t layout is also arch specific. This leads to no need to defining __PTHREAD_MUTEX_HAVE_ELISION and thus removing of the undefined compiler warning.
* Check for syscall error in the SETXID implementation in NPTL (bug 13347).Florian Weimer2014-04-013-3/+154
| | | | | | | | At this point, we can only abort the process because we have already switched credentials on other threads. Returning an error would still leave the process in an inconsistent state. The new xtest needs root privileges to run.
* Fix dwarf2 unwinding through futex functions.Andi Kleen2014-03-262-336/+40
| | | | | | | | | | | | | | | | | | | When profiling programs with lock problems with perf record -g dwarf, libunwind can currently not backtrace through the futex and unlock functions in pthread. This is because they use out of line sections, and those are not correctly described in dwarf2 (I believe needs dwarf3 or 4). This patch first removes the out of line sections. They only save a single jump, but cause a lot of pain. Then it converts the now inline lock code to use the now standard gas .cfi_* commands. With these changes libunwind/perf can backtrace through the futex functions now. Longer term it would be likely better to just use C futex() functions on x86 like all the other architectures. This would clean the code up even more.
* PowerPC: Revert __PTHREAD_MUTEX_HAVE_ELISION changeAdhemerval Zanella2014-03-251-2/+0
| | | | This patch revert 449282f2e0e850c29f6a9666058503d4734964f0.
* PowerPC: Fix -Wundef warning for __PTHREAD_MUTEX_HAVE_ELISION.Adhemerval Zanella2014-03-251-0/+2
|
* S390: Fix -Wundef warning for __PTHREAD_MUTEX_HAVE_ELISION.Stefan Liebler2014-03-241-0/+2
|
* Revert "Fix __PTHREAD_MUTEX_HAVE_ELISION -Wundef warning"Will Newton2014-03-171-9/+5
| | | | This reverts commit 788bba368c2eaf8aa3fd2ca18d269395d6bc8afb.
* Fix __PTHREAD_MUTEX_HAVE_ELISION -Wundef warningWill Newton2014-03-171-5/+9
| | | | | | | | | | ChangeLog: 2014-03-17 Will Newton <will.newton@linaro.org> * nptl/sysdeps/pthread/pthread.h: Check __PTHREAD_MUTEX_HAVE_ELISION is defined before testing its value.
* Get rid of __LT_SPINLOCK_INITSiddhesh Poyarekar2014-03-171-6/+1
| | | | | | | | | We got rid of LinuxThreads in 2005, but we didn't remove __LT_SPINLOCK_INIT back then. Do it now. * nptl/sysdeps/pthread/bits/libc-lockP.h [defined NOT_IN_libc && !defined IS_IN_libpthread && __LT_SPINNOCK_INIT != 0]: Remove.
* Compile with -Wundef.Roland McGrath2014-03-146-13/+19
|
* Fix two stray cases using #ifdef vs #if for TLS_TCB_AT_TP.Roland McGrath2014-03-142-2/+2
|
* hppa: Add _STACK_GROWS_* cases to pthread_attr_[sg]etstack.Carlos O'Donell2014-03-132-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | This is one of a several NPTL patches to build glibc on hppa. The pthread_attr_[sg]etstack functions are defined by POSIX as taking a stackaddr that is the lowest addressable byte of the storage used for the stack. However, the internal iattr variable of the same name in NPTL is actually the final stack address as usable in the stack pointer for the machine. Therefore the NPTL implementation must add and subtract stacksize for _STACK_GROWS_DOWN architectures. HPPA is a _STACK_GROWS_UP architecture and doesn't need to add or subtract anything, the stack address *is* the lowest addressable byte of the storage. Tested on hppa-linux-gnu, with no regressions. Can't impact any other targets because of the conditionals. If nobody objects I'll check this in at the end of the week. I can't see there being any objections to this patch except that it introduces more code to maintain for an old architecture (perhaps we'll get another _S_G_U target in the future?).
* Make tests consistently use *.out output files.Joseph Myers2014-03-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch systematically renames miscellaneous tests so their outputs use a *.out name (unless the test is just running some glibc program with its conventional output file name, rather than a special program at all, as in catgets tests generating *.cat). In the case of the iconv test test-iconvconfig, output is redirected where it wasn't before. In various places the "generated" variable is updated to reflect the revised test names; in iconvdata/Makefile a typo (mmtrace-tst-loading) is also fixed. resolv/Makefile sets both "generate" (which appears unused) and "generated". Bitrot in the settings of these variables could no doubt be fixed so that "make clean" after build and testing leaves results the same as after configure (and indeed the tests-special / xtests-special variables could be used to simplify things, by removing those files automatically rather than listing them manually in these variables), and "make distclean" leaves an empty build directory, but right now it appears various files don't get deleted. I think they are liable to continue to bitrot in the absence of routine testing that these targets actually work, given that building in the source directory isn't supported and that was the main use of such makefile targets. Tested x86_64. * elf/Makefile (tests-special): Rename tests to end with .out. ($(objpfx)noload-mem): Likewise. ($(objpfx)tst-leaks1-mem): Likewise. ($(objpfx)tst-leaks1-static-mem.out): Likewise. * iconv/Makefile (xtests-special): Change test-iconvconfig to $(objpfx)test-iconvconfig.out. (test-iconvconfig): Change to $(objpfx)test-iconvconfig.out. Use set -e inside subshell and redirect output to file. * iconvdata/Makefile (generated): Rename tests to end with .out. Correct type. (tests-special): Rename tests to end with .out. ($(objpfx)mtrace-tst-loading): Likewise. * intl/Makefile (generated): Likewise. (tests-special): Likewise. ($(objpfx)mtrace-tst-gettext): Likewise. * misc/Makefile (generated): Likewise. (tests-special): Likewise. ($(objpfx)tst-error1-mem): Likewise. * nptl/Makefile (tests-special): Likewise. ($(objpfx)tst-stack3-mem): Likewise. (generated): Likewise. * posix/Makefile (generated): Likewise. (tests-special): Likewise. (xtests-special): Likewise. ($(objpfx)tst-fnmatch-mem): Likewise. ($(objpfx)bug-regex2-mem): Likewise. ($(objpfx)bug-regex14-mem): Likewise. ($(objpfx)bug-regex21-mem): Likewise. ($(objpfx)bug-regex31-mem): Likewise. ($(objpfx)tst-vfork3-mem): Likewise. ($(objpfx)tst-rxspencer-no-utf8-mem): Likewise. ($(objpfx)tst-pcre-mem): Likewise. ($(objpfx)tst-boost-mem): Likewise. ($(objpfx)bug-ga2-mem): Likewise. ($(objpfx)bug-glob2-mem): Likewise. * resolv/Makefile (generate): Likewise. (tests-special): Likewise. (xtests-special): Likewise. (generated): Likewise. ($(objpfx)mtrace-tst-leaks): Likewise. ($(objpfx)mtrace-tst-leaks2): Likewise. localedata: * Makefile (generated): Rename tests to end with .out. (tests-special): Likewise. ($(objpfx)mtrace-tst-leaks): Likewise.
* Enumerate tests with special rules in tests-special variable.Joseph Myers2014-03-061-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is a revised and updated version of <https://sourceware.org/ml/libc-alpha/2014-01/msg00196.html>. In order to generate overall summaries of the results of all tests in the glibc testsuite, we need to identify and concatenate the files with the results of individual tests. Tomas Dohnalek's patch used $(common-objpfx)*/*.test-result for this. However, the normal glibc approach is explicit enumeration of the expected set of files with a given property, rather than all files matching some pattern like that. Furthermore, we would like to be able to mark tests as UNRESOLVED if the file with their results is for some reason missing, and in future we would like to be able to mark tests as UNSUPPORTED if they are disabled for a particular configuration (rather than simply having them missing from the list of tests as at present). Such handling of tests that were not run or did not record results requires an explicit enumeration of tests. For the tests following the default makefile rules, $(tests) (and $(xtests)) provides such an enumeration. Others, however, are added directly as dependencies of the "tests" and "xtests" makefile targets. This patch changes the makefiles to put them in variables tests-special and xtests-special, with appropriate dependencies on the tests listed there then being added centrally. Those variables are used in Rules and so need to be set before Rules is included in a subdirectory makefile, which is often earlier in the makefile than the dependencies were present before. We previously discussed the question of where to include Rules; see the question at <https://sourceware.org/ml/libc-alpha/2012-11/msg00798.html>, and a discussion in <https://sourceware.org/ml/libc-alpha/2013-01/msg00337.html> of why Rules is included early rather than late in subdirectory makefiles. It was necessary to avoid an indirection through the check-abi target and get the check-abi-* targets for individual libraries into the tests-special variable. The intl/ test $(objpfx)tst-gettext.out, previously built only because of dependencies from other tests, was also added to tests-special for the same reason. The entries in tests-special are the full makefile targets, complete with $(objpfx) and .out. If a future change causes tests to be named consistently with a .out suffix, this can be changed to include just the path relative to $(objpfx), without .out. Tested x86_64, including that the same set of files is generated in the build directory by a build and testsuite run both before and after the patch (except for changes to the elf/tst-null-argv.debug.out.<number> file name), and a build with run-built-tests=no to verify there aren't any more obvious instances of the issue Marcus Shawcroft reported with a previous version in <https://sourceware.org/ml/libc-alpha/2014-01/msg00462.html>. * Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. (tests): Depend on $(tests-special). * Makerules (check-abi-list): New variable. (check-abi): Depend on $(check-abi-list). [$(subdir) = elf] (tests-special): Add $(objpfx)check-abi-libc.out. [$(build-shared) = yes && subdir] (tests-special): Add $(check-abi-list). [$(build-shared) = yes && subdir] (tests): Do not depend on check-abi. * Rules (tests): Depend on $(tests-special). (xtests): Depend on $(xtests-special). * catgets/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * conform/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * elf/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * grp/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * iconv/Makefile (xtests): Change dependencies to .... (xtests-special): ... additions to this variable. * iconvdata/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * intl/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. Also add $(objpfx)tst-gettext.out. * io/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * libio/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * malloc/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * misc/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * nptl/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * nptl_db/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * posix/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. (xtests): Change dependencies to .... (xtests-special): ... additions to this variable. * resolv/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. (xtests): Change dependencies to .... (xtests-special): ... additions to this variable. * stdio-common/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. (do-tst-unbputc): Remove target. (do-tst-printf): Likewise. * stdlib/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * string/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * sysdeps/x86/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. localedata: * Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable.
* Retire the separate ChangeLog files in nptl/ and nptl_db/ subdirs.Roland McGrath2014-03-031-0/+5
|
* Fix fallout from Joseph's untested Makeconfig change.Roland McGrath2014-02-282-1/+5
|
* Consistently include Makeconfig after defining subdir.Joseph Myers2014-02-262-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In <https://sourceware.org/ml/libc-alpha/2014-01/msg00196.html> I noted it was necessary to add includes of Makeconfig early in various subdirectory makefiles for the tests-special variable settings added by that patch to be conditional on configuration information. No-one commented on the general question there of whether Makeconfig should always be included immediately after the definition of subdir. This patch implements that early inclusion of Makeconfig in each directory (which is a lot easier than consistent placement of includes of Rules). Includes are added if needed, or moved up if already present. Subdirectory "all:" targets are removed, since Makeconfig provides one. There is potential for further cleanups I haven't done. Rules and Makerules have code such as ifneq "$(findstring env,$(origin headers))" "" headers := endif to override to empty any value of various variables that came from the environment. I think there is a case for Makeconfig setting all the subdirectory variables (other than subdir) to empty to ensure no outside value is going to take effect if a subdirectory fails to define a variable. (A list of such variables, possibly out of date and incomplete, is in manual/maint.texi.) Rules and Makerules would give errors if Makeconfig hadn't already been included, instead of including it themselves. The special code to override values coming from the environment would then be obsolete and could be removed. Tested x86_64, including that installed binaries are identical before and after the patch. * argp/Makefile: Include Makeconfig immediately after defining subdir. * assert/Makefile: Likewise. * benchtests/Makefile: Likewise. * catgets/Makefile: Likewise. * conform/Makefile: Likewise. * crypt/Makefile: Likewise. * csu/Makefile: Likewise. (all): Remove target. * ctype/Makefile: Include Makeconfig immediately after defining subdir. * debug/Makefile: Likewise. * dirent/Makefile: Likewise. * dlfcn/Makefile: Likewise. * gmon/Makefile: Likewise. * gnulib/Makefile: Likewise. * grp/Makefile: Likewise. * gshadow/Makefile: Likewise. * hesiod/Makefile: Likewise. * hurd/Makefile: Likewise. (all): Remove target. * iconvdata/Makefile: Include Makeconfig immediately after defining subdir. * inet/Makefile: Likewise. * intl/Makefile: Likewise. * io/Makefile: Likewise. * libio/Makefile: Likewise. (all): Remove target. * locale/Makefile: Include Makeconfig immediately after defining subdir. * login/Makefile: Likewise. * mach/Makefile: Likewise. (all): Remove target. * malloc/Makefile: Include Makeconfig immediately after defining subdir. (all): Remove target. * manual/Makefile: Include Makeconfig immediately after defining subdir. * math/Makefile: Likewise. * misc/Makefile: Likewise. * nis/Makefile: Likewise. * nss/Makefile: Likewise. * po/Makefile: Likewise. (all): Remove target. * posix/Makefile: Include Makeconfig immediately after defining subdir. * pwd/Makefile: Likewise. * resolv/Makefile: Likewise. * resource/Makefile: Likewise. * rt/Makefile: Likewise. * setjmp/Makefile: Likewise. * shadow/Makefile: Likewise. * signal/Makefile: Likewise. * socket/Makefile: Likewise. * soft-fp/Makefile: Likewise. * stdio-common/Makefile: Likewise. * stdlib/Makefile: Likewise. * streams/Makefile: Likewise. * string/Makefile: Likewise. * sunrpc/Makefile: Likewise. (all): Remove target. * sysvipc/Makefile: Include Makeconfig immediately after defining subdir. * termios/Makefile: Likewise. * time/Makefile: Likewise. * timezone/Makefile: Likewise. (all): Remove target. * wcsmbs/Makefile: Include Makeconfig immediately after defining subdir. * wctype/Makefile: Likewise. libidn/ChangeLog: * Makefile: Include Makeconfig immediately after defining subdir. localedata/ChangeLog: * Makefile: Include Makeconfig immediately after defining subdir. (all): Remove target. nptl/ChangeLog: * Makefile: Include Makeconfig immediately after defining subdir. nptl_db/ChangeLog: * Makefile: Include Makeconfig immediately after defining subdir.
* Generate .test-result files for tests with special rules.Joseph Myers2014-02-212-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch, an updated version of <https://sourceware.org/ml/libc-alpha/2014-01/msg00194.html> now proposed for inclusion in glibc, extends the generation of PASS and FAIL status in .test-result files for individual tests to cover tests with their own custom makefile rules. This is just adding $(evaluate-test) calls to all such rules, since tests with multiple commands were previously split into separate tests. Note that the tests the makefiles expect to fail (posix/annexc and conformtest) currently get FAIL listed in the .test-result file, rather than XFAIL; a subsequent patch will introduce a better XFAIL mechanism. Tested x86_64. * Makefile ($(objpfx)c++-types-check.out): Use $(evaluate-test). ($(objpfx)check-local-headers.out): Likewise. ($(objpfx)begin-end-check.out): Likewise. * Makerules (check-abi-%.out): Likewise. * catgets/Makefile ($(objpfx)test1.cat): Likewise. ($(objpfx)test2.cat): Likewise. ($(objpfx)de/libc.cat): Likewise. ($(objpfx)test-gencat.out): Likewise. * conform/Makefile ($(objpfx)run-conformtest.out): Likewise. * elf/Makefile ($(objpfx)order-cmp.out): Likewise. ($(objpfx)noload-mem): Likewise. ($(objpfx)tst-pathopt.out): Likewise. ($(objpfx)tst-rtld-load-self.out): Likewise. ($(objpfx)tst-array1-cmp.out): Likewise. ($(objpfx)tst-array1-static-cmp.out): Likewise. ($(objpfx)tst-array2-cmp.out): Likewise. ($(objpfx)tst-array3-cmp.out): Likewise. ($(objpfx)tst-array4-cmp.out): Likewise. ($(objpfx)tst-array5-cmp.out): Likewise. ($(objpfx)tst-array5-static-cmp.out): Likewise. ($(objpfx)check-textrel.out): Likewise. ($(objpfx)check-execstack.out): Likewise. ($(objpfx)check-localplt.out): Likewise. ($(objpfx)order2-cmp.out): Likewise. ($(objpfx)tst-leaks1-mem): Likewise. ($(objpfx)tst-leaks1-static-mem): Likewise. ($(objpfx)tst-initorder-cmp.out): Likewise. ($(objpfx)tst-initorder2-cmp.out): Likewise. ($(objpfx)tst-unused-dep.out): Likewise. ($(objpfx)tst-unused-dep-cmp.out): Likewise. * grp/Makefile ($(objpfx)tst_fgetgrent.out): Likewise. * iconv/Makefile (test-iconvconfig): Likewise. * iconvdata/Makefile ($(objpfx)mtrace-tst-loading): Likewise. ($(objpfx)iconv-test.out): Likewise. ($(objpfx)tst-tables.out): Likewise. * intl/Makefile ($(objpfx)mtrace-tst-gettext): Likewise. ($(objpfx)tst-gettext.out): Likewise. ($(objpfx)tst-translit.out): Likewise. ($(objpfx)tst-gettext2.out): Likewise. ($(objpfx)tst-gettext4.out): Likewise. ($(objpfx)tst-gettext6.out): Likewise. * io/Makefile ($(objpfx)ftwtest.out): Likewise. * libio/Makefile ($(objpfx)test-freopen.out): Likewise. ($(objpfx)tst-fopenloc-cmp.out): Likewise. ($(objpfx)tst-fopenloc-mem.out): Likewise. * malloc/Makefile ($(objpfx)tst-mtrace.out): Likewise. * misc/Makefile ($(objpfx)tst-error1-mem): Likewise. * posix/Makefile ($(objpfx)globtest.out): Likewise. ($(objpfx)wordexp-tst.out): Likewise. ($(objpfx)annexc.out): Likewise. ($(objpfx)tst-fnmatch-mem): Likewise. ($(objpfx)bug-regex2-mem): Likewise. ($(objpfx)bug-regex14-mem): Likewise. ($(objpfx)bug-regex21-mem): Likewise. ($(objpfx)bug-regex31-mem): Likewise. ($(objpfx)tst-vfork3-mem): Likewise. ($(objpfx)tst-rxspencer-no-utf8-mem): Likewise. ($(objpfx)tst-pcre-mem): Likewise. ($(objpfx)tst-boost-mem): Likewise. ($(objpfx)tst-getconf.out): Likewise. ($(objpfx)bug-ga2-mem): Likewise. ($(objpfx)bug-glob2-mem): Likewise. * resolv/Makefile ($(objpfx)mtrace-tst-leaks): Likewise. ($(objpfx)mtrace-tst-leaks2): Likewise. * stdio-common/Makefile ($(objpfx)tst-unbputc.out): Likewise. ($(objpfx)tst-printf.out): Likewise. ($(objpfx)tst-setvbuf1.out): Likewise. ($(objpfx)tst-setvbuf1-cmp.out): Likewise. * stdlib/Makefile ($(objpfx)isomac.out): Likewise. ($(objpfx)tst-fmtmsg.out): Likewise. * string/Makefile ($(objpfx)tst-svc-cmp.out): Likewise. * sysdeps/x86/Makefile ($(objpfx)tst-xmmymm.out): Likewise. localedata: * Makefile ($(objpfx)sort-test.out): Use $(evaluate-test). ($(objpfx)tst-fmon.out): Likewise. ($(objpfx)tst-numeric.out): Likewise. ($(objpfx)tst-locale.out): Likewise. ($(objpfx)tst-rpmatch.out): Likewise. ($(objpfx)tst-trans.out): Likewise. ($(objpfx)tst-mbswcs.out): Likewise. ($(objpfx)tst-ctype.out): Likewise. ($(objpfx)tst-wctype.out): Likewise. ($(objpfx)tst-langinfo.out): Likewise. ($(objpfx)mtrace-tst-leaks): Likewise. nptl: * Makefile ($(objpfx)tst-stack3-mem): Use $(evaluate-test). ($(objpfx)tst-tls6.out): Likewise. ($(objpfx)tst-cleanup0.out): Likewise. ($(objpfx)tst-cleanup0-cmp.out): Likewise. ($(objpfx)tst-cancel-wrappers.out): Likewise. ($(objpfx)tst-oddstacklimit.out): Likewise. nptl_db: * Makefile ($(objpfx)db-symbols.out): Use $(evaluate-test).
* Split up rules for tests that compare output with baselines.Joseph Myers2014-02-142-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch splits makefile rules that generate a file then run cmp to check the contents of that file into separate rules to generate and compare the file. This simplifies making those tests generate PASS / FAIL results, by removing the need to insert && between commands in the test so that a $(evaluate-test) call is reached. It also avoids the oddity of the .out file being an intermediate file rather than the final result generated, as noted for some of these tests in <https://sourceware.org/ml/libc-alpha/2012-10/msg00894.html>. In many cases, the rule to run the program was no longer needed because the default rules for running test programs on the host to generate a .out file sufficed. (I'm not asserting the commands run after this patch are *exactly* the same as before, simply that the rules did nothing special that appeared deliberate or relevant to anything about what the tests were testing. In cases where the rules redirected stderr as well as stdout, I left the existing rule's redirection in place to avoid changing what gets compared with the expected results.) It's clear there is a lot in common between the various -cmp.out rules and it might be possible in future to refactor them into more generic support for the case of comparing test output against a baseline. (Some baselines are *.exp, some *.expect, some directly embedded in the makefiles, and nptl/tst-cleanupx0.expect appears unused.) Tested x86_64. * elf/Makefile ($(objpfx)order.out): Remove rule. [$(run-built-tests) = yes] (tests): Depend on $(objpfx)order-cmp.out. ($(objpfx)order-cmp.out): New rule. [$(run-built-tests) = yes] (tests): Depend on $(objpfx)tst-array1-cmp.out, $(objpfx)tst-array1-static-cmp.out, $(objpfx)tst-array2-cmp.out, $(objpfx)tst-array3-cmp.out, $(objpfx)tst-array4-cmp.out, $(objpfx)tst-array5-cmp.out and $(objpfx)tst-array5-static-cmp.out. ($(objpfx)tst-array1.out): Remove rule. ($(objpfx)tst-array1-cmp.out): New rule. ($(objpfx)tst-array1-static.out): Remove rule. ($(objpfx)tst-array1-static-cmp.out): New rule. ($(objpfx)tst-array2.out): Remove rule. ($(objpfx)tst-array2-cmp.out): New rule. ($(objpfx)tst-array3.out): Remove rule. ($(objpfx)tst-array3-cmp.out): New rule. ($(objpfx)tst-array4.out): Remove rule. ($(objpfx)tst-array4-cmp.out): New rule. ($(objpfx)tst-array5.out): Remove rule. ($(objpfx)tst-array5-cmp.out): New rule. ($(objpfx)tst-array5-static.out): Remove rule. ($(objpfx)tst-array5-static-cmp.out): New rule. [$(run-built-tests) = yes] (tests): Depend on $(objpfx)order2-cmp.out. ($(objpfx)order2.out): Remove rule. ($(objpfx)order2-cmp.out): New rule. ($(objpfx)tst-initorder.out): Remove rule. [$(run-built-tests) = yes] (tests): Depend on $(objpfx)tst-initorder-cmp.out. ($(objpfx)tst-initorder-cmp.out): New rule. ($(objpfx)tst-initorder2.out): Remove rule. [$(run-built-tests) = yes] (tests): Depend on $(objpfx)tst-initorder2-cmp.out. ($(objpfx)tst-initorder2-cmp.out): New rule. [$(run-built-tests) = yes] (tests): Depend on $(objpfx)tst-unused-dep-cmp.out. ($(objpfx)tst-unused-dep-cmp.out): Do not run cmp. ($(objpfx)tst-unused-dep-cmp.out): New rule. * stdio-common/Makefile [$(run-built-tests) = yes] (tests): Depend on $(objpfx)tst-setvbuf1-cmp.out. ($(objpfx)tst-setvbuf1.out): Do not run cmp. ($(objpfx)tst-setvbuf1-cmp.out): New rule. * string/Makefile [$(run-built-tests) = yes] (tests): Depend $(objpfx)tst-svc-cmp.out instead of $(objpfx)tst-svc.out. ($(objpfx)tst-svc.out): Remove rule. ($(objpfx)tst-svc-cmp.out): New rule. nptl: * Makefile ($(objpfx)tst-cleanup0.out): Do not run cmp. [$(run-built-tests) = yes] (tests): Depend on $(objpfx)tst-cleanup0-cmp.out. ($(objpfx)tst-cleanup0-cmp.out): New rule.
* Use glibc_likely instead __builtin_expect.Ondřej Bílka2014-02-1054-129/+202
|
* sem_open: allow RAMFS_MAGIC for mount pointsMike Frysinger2014-02-082-2/+8
| | | | | | | A ramfs mount supports the same requirements as a tmpfs, so accept that as a magic type too. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Revert "Patch 3/4 of the effort to make TLS access async-signal-safe."Allan McRae2014-02-061-1/+5
| | | | This reverts commit 35e8f7ab94c910659de9d507aa0f3e1f8973d914.
* Revert "Async-signal safe TLS."Allan McRae2014-02-065-210/+7
| | | | | | | | | This reverts commit 7f507ee17aee720fa423fa38502bc3caa0dd03d7. Conflicts: ChangeLog nptl/tst-tls7.c nptl/tst-tls7mod.c
* Fix tst-setgetname for Linux kernels < 2.6.33.Carlos O'Donell2014-02-052-0/+20
| | | | | | | | Support for /proc/self/task/$tid/comm as added in Linux 2.6.33, therefore since the test tst-setgetname relies on this functionality to operate we must skip the test in kernels < 2.6.33. We wrap the checks with __ASSUME_PROC_PID_TASK_COMM such that in the future when we move arch_minimum_kernel to 2.6.33 we can remove this code.
* PowerPC: Change powerpc64le start ABI to 2.17.Adhemerval Zanella2014-02-041-1/+1
|
* S/390: Increase tst-tls7 test case timeoutStefan Liebler2014-01-232-1/+5
| | | | | | | | TLS in a dlopened object works fine when accessed from a signal handler. The default kernel scheduling parameters prevents the testcase to finish within the 4 seconds. Tested the bigger timeout on s390 and s390x.
* Don't check asynchronous cancellation on systemH.J. Lu2014-01-182-1/+5
| | | | | | | | | | | | | | | | | | | | Since asynchronous cancellation was removed from system by commit c4dd57c300aa05ab2f957d571c321237a58d0368 Author: Ondřej Bílka <neleai@seznam.cz> Date: Tue Jan 14 16:07:50 2014 +0100 Do not enable asynchronous cancellation in system. Fixes bug 14782. We needlessly enabled thread cancellation before it was necessary. As only call that needs to be guarded is waitpid which is cancellation point we could remove cancellation altogether. we shouldn't check asynchronous cancellation on system. [BZ #14782] * tst-cancel-wrappers.sh: Remove system.
* Fix a race in tst-tls7, which caused crashes on ppc32.Paul Pluzhnikov2014-01-113-5/+31
|
* S/390: Make jmp_buf extendible.Andreas Krebbel2014-01-072-0/+68
|
* Async-signal safe TLS.Andrew Hunter2014-01-035-7/+190
| | | | | | | | | | | | | | | | | | | | | | ChangeLog: 2014-01-03 Andrew Hunter <ahh@google.com> * elf/dl-open.c (): New comment. * elf/dl-reloc.c (_dl_try_allocate_static_tls): Use atomic_compare_and_exchange_bool_acq (_dl_allocate_static_tls): Block signals. * elf/dl-tls.c (allocate_and_init): Return void. (_dl_update_slotinfo): Block signals, use atomic update. nptl/ChangeLog: 2014-01-03 Andrew Hunter <ahh@google.com> * nptl/Makefile (tst-tls7): New test. * nptl/tst-tls7.c: New file. * nptl/tst-tls7mod.c: New file. * nptl/allocatestack.c (init_one_static_tls): Use atomic barrier.
* Update copyright notices with scripts/update-copyrightsAllan McRae2014-01-01664-664/+664
|
* Patch 3/4 of the effort to make TLS access async-signal-safe.Paul Pluzhnikov2013-12-181-5/+1
| | | | | | | | | | | Factor out _dl_clear_dtv. 2013-12-18 Andrew Hunter <ahh@google.com> * elf/Versions (ld): Add _dl_clear_dtv. * sysdeps/generic/ldsodefs.h (_dl_clear_dtv): New prototype. * elf/dl-tls.c (_dl_clear_dtv): New function. * nptl/allocatestack.c (get_cached_stack): Call _dl_clear_dtv.
* PowerPC: Add DSO and TAR fields to TLSAdhemerval Zanella2013-12-123-0/+13
|
* Add test case for pthread_[sg]etname_np.Carlos O'Donell2013-12-123-0/+307
| | | | | | | | | This commit adds a testcase for pthread_setname_np and pthread_getname_np. The testcase itself has four tests to validate that these functions work as expected. The test is only enabled for Linux since it requires access to an alternate method for validating the functions work.
* ChangeLog whitespace fix.Roland McGrath2013-12-111-0/+1
|
* Fix CFI annotations in pthread_cond_timedwait for i486+Andreas Schwab2013-12-092-2/+8
|
* PowerPC64 ELFv2 ABI 4/6: Stack frame layout changesUlrich Weigand2013-12-042-26/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This updates glibc for the changes in the ELFv2 relating to the stack frame layout. These are described in more detail here: http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01149.html http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01146.html Specifically, the "compiler and linker doublewords" were removed, which has the effect that the save slot for the TOC register is now at offset 24 rather than 40 to the stack pointer. In addition, a function may now no longer necessarily assume that its caller has set up a 64-byte register save area its use. To address the first change, the patch goes through all assembler files and replaces immediate offsets in instructions accessing the ABI-defined stack slots by symbolic offsets. Those already were defined in ucontext_i.sym and used in some of the context routines, but that doesn't really seem like the right place for those defines. The patch instead defines those symbolic offsets in sysdeps.h, in two variants for the old and new ABI, and uses them systematically in all assembler files, not just the context routines. The second change only affected a few assembler files that used the save area to temporarily store some registers. In those cases where this happens within a leaf function, this patch changes the code to store those registers to the "red zone" below the stack pointer. Otherwise, the functions already allocate a stack frame, and the patch changes them to add extra space in these frames as temporary space for the ELFv2 ABI.
* PowerPC64: Add __private_ss field to TCB headerUlrich Weigand2013-12-041-0/+2
| | | | | | | | | | | | | | | The TCB header on Intel contains a field __private_ss that is used to efficiently implement the -fsplit-stack GCC feature. In order to prepare for a possible future implementation of that feature on powerpc64, we'd like to reserve a similar field in the TCB header as well. (It would be good if this went in with or before the ELFv2 patches to ensure that this field will be available always in the ELFv2 environment.) The field needs to be added at the front of tcbhead_t structure to avoid changing the ABI; see the recent discussion when adding the EBB fields.
* Use __glibc_reserved instead __unused.Ondřej Bílka2013-11-263-3/+7
|
* Fix intermittent failure in tst-getpid2.Paul Pluzhnikov2013-11-252-0/+10
| | | | | | | 2013-11-25 Paul Pluzhnikov <ppluzhnikov@google.com> [BZ #11214] * Makefile (tst-getpid2-ENV): New variable.
* Fix missing > on email.Paul Pluzhnikov2013-11-201-1/+1
|
* Fix failure in tst-cleanup2 and tst-cleanupx2 with gcc-4.9Paul Pluzhnikov2013-11-202-0/+8
| | | | | | | | gcc (GCC) 4.9.0 20131114 (experimental) 2013-11-20 Paul Pluzhnikov <ppluzhnikov@google.com * Makefile (tst-cleanup2, tst-cleanupx2): Add -fno-builtin
* Revert "Fix failure in nptl/tst-cleanup when building with"Paul Pluzhnikov2013-11-201-6/+0
| | | | | | This reverts commit 78271fa91a1e6902222e892068750059ec21f396. Actually, a different fix is needed.
* Fix failure in nptl/tst-cleanup when building withPaul Pluzhnikov2013-11-201-0/+6
| | | | | | | | gcc (GCC) 4.9.0 20131114 (experimental) 2013-11-20 Paul Pluzhnikov <ppluzhnikov@google.com> * nptl/tst-cleanup2.c (do_test): Handle SIGILL as well.
* rename configure.in to configure.acMike Frysinger2013-10-305-2/+11
| | | | | | | Autoconf has been deprecating configure.in for quite a long time. Rename all our configure.in and preconfigure.in files to .ac. Signed-off-by: Mike Frysinger <vapier@gentoo.org>