aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/Makefile.in
AgeCommit message (Collapse)AuthorFilesLines
2023-01-01Update copyright year range in header of all files managed by GDBJoel Brobecker1-1/+1
This commit is the result of running the gdb/copyright.py script, which automated the update of the copyright year range for all source files managed by the GDB project to be updated to include year 2023.
2022-10-02gdb/testsuite: handle invalid .exp names passed in TESTSAndrew Burgess1-10/+30
I ran some tests like: $ make check-gdb TESTS="gdb.base/break.exp" then, then I went to rerun the tests later, I managed to corrupt the command line, like this: $ make check-gdb TESTS="gdb.base/breakff.exp" the make command did exit with an error, but DejaGnu appeared to report that every test passed! The tail end of the output looks like this: Illegal Argument "no-matching-tests-found" try "runtest --help" for option list === gdb Summary === # of expected passes 115 /tmp/build/gdb/gdb version 13.0.50.20220831-git -nw -nx -iex "set height 0" -iex "set width 0" -data-directory /tmp/build/gdb/testsuite/../data-directory make[3]: *** [Makefile:212: check-single] Error 1 make[3]: Leaving directory '/tmp/build/gdb/testsuite' make[2]: *** [Makefile:161: check] Error 2 make[2]: Leaving directory '/tmp/build/gdb/testsuite' make[1]: *** [Makefile:1916: check] Error 2 make[1]: Leaving directory '/tmp/build/gdb' make: *** [Makefile:13565: check-gdb] Error 2 For a while, I didn't spot that DejaGnu had failed at all, I saw the 115 passes, and thought everything had run correctly - though I was puzzled that make was reporting an error. What happens is that in gdb/testsuite/Makefile, in the check-single rule, we first run DejaGnu, then run the dg-add-core-file-count.sh script, and finally, we use sed to extract the results from the gdb.sum file. In my case, with the invalid test name, DejaGnu fails, but the following steps are still run, the final result, the 115 passes, is then extracted from the pre-existing gdb.sum file. If I use 'make -jN' then the 'check-parallel' rule, rather than the 'check-single' rule is used. In this case the behaviour is slightly different, the tail end of the output now looks like this: No matching tests found. make[4]: Leaving directory '/tmp/build/gdb/testsuite' find: ‘outputs’: No such file or directory Usage: ../../../src/gdb/testsuite/../../contrib/dg-extract-results.py [-t tool] [-l variant-list] [-L] log-or-sum-file ... tool The tool (e.g. g++, libffi) for which to create a new test summary file. If not specified then output is created for all tools. variant-list One or more test variant names. If the list is not specified then one is constructed from all variants in the files for <tool>. sum-file A test summary file with the format of those created by runtest from DejaGnu. If -L is used, merge *.log files instead of *.sum. In this mode the exact order of lines may not be preserved, just different Running *.exp chunks should be in correct order. find: ‘outputs’: No such file or directory Usage: ../../../src/gdb/testsuite/../../contrib/dg-extract-results.py [-t tool] [-l variant-list] [-L] log-or-sum-file ... tool The tool (e.g. g++, libffi) for which to create a new test summary file. If not specified then output is created for all tools. variant-list One or more test variant names. If the list is not specified then one is constructed from all variants in the files for <tool>. sum-file A test summary file with the format of those created by runtest from DejaGnu. If -L is used, merge *.log files instead of *.sum. In this mode the exact order of lines may not be preserved, just different Running *.exp chunks should be in correct order. make[3]: Leaving directory '/tmp/build/gdb/testsuite' make[2]: Leaving directory '/tmp/build/gdb/testsuite' make[1]: Leaving directory '/tmp/build/gdb' Rather than DejaGnu failing, we now get a nice 'No matching tests found' message, followed by some other noise. This other noise is first `find` failing, followed by the dg-extract-results.py script failing. What happens here is that, in the check-parallel rule, the outputs directory is deleted before DejaGnu is invoked. Then we try to run all the tests, and finally we use find and dg-extract-results.py to combine all the separate .sun and .log files together. However, if there are no tests run then the outputs/ directory is never created, so the find command and consequently the dg-extract-results.py script, fail. This commit aims to fix the following issues: (1) For check-single and check-parallel rules, don't run any of the post-processing steps if DejaGnu failed to run. This will avoid all the noise after the initial failure of DejaGnu, (2) For check-single ensure that we don't accidentally report previous results, this is related to the above, but is worth calling out as a separate point, and (3) For check-single, print the 'No matching tests found' message just like we do for a parallel test run. This makes the parallel and non-parallel testing behaviour more similar, and I think is clearer than the current 'Illegal Argument' error message. Points (1) and (2) will be handled by moving the post processing steps inside an if block within the recipe. For check-single I propose deleting the gdb.sum and gdb.log files before running DejaGnu, this is similar (I think) to how we delete the outputs/ directory in the check-parallel rule. For point (3) I plan to split the check-single rule in two, the existing check-single will be renamed do-check-single, then a new check-single rule will be added. The new check-single rule can either depend on the new do-check-single, or will ensure the 'No matching tests found' message is printed when appropriate.
2022-06-24Include count of unexpected core files in gdb.sum summaryPedro Alves1-1/+8
If GDB, GDBserver, a testcase program, Valgrind, etc. unexpectedly crash while running the GDB testsuite, and you've setup your machine such that core files are dumped in the current directory instead of being shoved somewhere by abrt, apport, or similar (as you should for proper GDB testing), you'll end up with an unexpected core file in the $build/gdb/testsuite/ directory. It can happen that GDB, GDBserver, etc. even crashes _after_ gdb_exit, during teardown, and thus such a crash won't be noticed by looking at the gdb.sum file at all. This commit aims at improving that, by including a new "unexpected core files" line in the testrun summary. For example, here's what I get on x86-64 Ubuntu 20.04, with this patch: === gdb Summary === # of unexpected core files 12 << new info # of expected passes 107557 # of unexpected failures 35 # of expected failures 77 # of unknown successes 2 # of known failures 114 # of untested testcases 31 # of unsupported tests 139 I have my core pattern setup like this: $ cat /proc/sys/kernel/core_pattern core.%e.%p.%h.%t That's: %e: executable filename %p: pid %h: hostname %t: UNIX time of dump and so I get these core files: $ ls -1 testsuite/core.* testsuite/core.connect-with-no.216191.nelson.1656002431 testsuite/core.connect-with-no.217729.nelson.1656002431 testsuite/core.gdb.194247.nelson.1656002423 testsuite/core.gdb.226014.nelson.1656002435 testsuite/core.gdb.232078.nelson.1656002438 testsuite/core.gdb.352268.nelson.1656002441 testsuite/core.gdb.4152093.nelson.1656002337 testsuite/core.gdb.4154515.nelson.1656002338 testsuite/core.gdb.4156668.nelson.1656002339 testsuite/core.gdb.4158871.nelson.1656002341 testsuite/core.gdb.468495.nelson.1656002444 testsuite/core.vgdb.4192247.nelson.1656002366 where we can see that GDB crashed a number of times, but also Valgrind's vgdb, and a couple testcase programs. Neither of which is good. If your core_pattern is just "core" (but why??), then I guess that you may end up with just a single core file in testsuite/. Still, that is one core file too many. Above, we see a couple cores for "connect-with-no", which are the result of gdb.server/connect-with-no-symbol-file.exp. This is a case mentioned above -- while the program crashed, that happens during testcase teardown, and it goes unnoticed (without this commit) by gdb.sum results. Vis: $ make check TESTS="gdb.server/connect-with-no-symbol-file.exp" ... === gdb Summary === # of unexpected core files 2 # of expected passes 8 ... $ The tests fully passed, but still the testcase program crashed somehow: $ ls -1 testsuite/core.* testsuite/core.connect-with-no.941561.nelson.1656003317 testsuite/core.connect-with-no.941682.nelson.1656003317 Against --target_board=native-extended-gdbserver it's even worse. I get: # of unexpected core files 26 and note that when GDBserver hits an assertion failure, it exits with error, instead of crashing with SIGABRT. I think that should be changed, at least on development builds, but that would be for another patch. After such patch, I suspect the number of unexpected cores will be higher, as there are likely teardown GDBserver assertions that we're not noticing. I decided to put this new info in the "gdb Summary" section, as that's a place people already are used to looking at, either when looking at the tail of gdb.sum, or when diffing gdb.sum files, and we've already extended this section before, to include the count of DUPLICATE and PATH problems, so there's precedent. Implementation-wise, the new line is appended after DejaGnu is finished, with a shell script that is invoked by the Makefile. It is done this way so that serial and parallel testing work the same way. My initial cut at an implementation was in TCL, straight in testsuite/lib/check-test-names.exp, where DUPLICATES and PATH are handled, like so: @@ -148,6 +159,10 @@ namespace eval ::CheckTestNames { $counts(paths,$which) maybe_show_count "# of duplicate test names\t" \ $counts(duplicates,$which) + + set cores [glob -nocomplain -directory $::objdir core*] + maybe_show_count "# of unexpected core files\t" \ + [llength $cores] } But that would only work for serial testing, as in parallel testing, the final gdb.sum is generated by aggregating the results of all the individual gdb.sum files, and dg-extract-results.sh doesn't know about our new summary line. And I don't think that dg-extract-results.sh should be taught about it, since the count of core files is not something that we want to count many times, once per testcase, and then add up the subcounts at the end. Every time we count the core files, we're already counting the final count. I considered using the Tcl implementation in serial mode, and the script approach for parallel testing, but that has the obvious downside of implementing and maintaining the same thing twice. In the end, I settled on the script approach for serial mode too, which requires making the "check-single" rule print the tail end of the gdb.sum file, with a side effect being that if you look at the terminal after a run (instead of at the gdb.sum file), you'll see the "gdb Summary" section twice, once without the unexpected core lines printed, and then another with. IMO, this isn't an issue; when testing in parallel mode, if you look at the terminal after "make -jN check", you'll also see multiple "gdb Summary" sections printed. Change-Id: I190b8d41856d49ad143854b6e3e6ccd7caa04491
2022-03-01Some "distclean" fixes in gdbTom Tromey1-1/+1
PR build/12440 points out that "make distclean" is broken in gdb. Most of the breakage comes from other projects in the tree, but we can fix some of the issues, which is what this patch does. Note that the yacc output files, like c-exp.c, are left alone. In a source distribution, these are included in the tarball, and if the user builds in-tree, we would not want to remove them. While that seems a bit obscure, it seems to me that "distclean" is only really useful for in-tree builds anyway -- out-of-tree I simply delete the entire build directory and start over. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=12440
2022-01-01Automatic Copyright Year update after running gdb/copyright.pyJoel Brobecker1-1/+1
This commit brings all the changes made by running gdb/copyright.py as per GDB's Start of New Year Procedure. For the avoidance of doubt, all changes in this commits were performed by the script.
2021-10-09[gdb/testsuite] Add check-readmoreTom de Vries1-13/+30
Consider the gdb output: ... 27 return SYSCALL_CANCEL (nanosleep, requested_time, remaining);^M (gdb) ^M Thread 2 "run-attach-whil" stopped.^M ... When trying to match the gdb prompt using gdb_test which uses '$gdb_prompt $', it may pass or fail. This sort of thing needs to be fixed (see commit b0e2f96b56b), but there's currently no way to reliably find this type of FAILs. We have check-read1, but that one actually make the test pass reliably. We need something like the opposite of check-read1: something that makes expect read a bit slower, or more exhaustively. Add a new test target check-readmore that implements this. There are two methods of implementing this in read1.c: - the first method waits a bit before doing a read - the second method does a read and then decides whether to return or to wait a bit and do another read, and so on. The second method is potentially faster, has less risc of timeout and could potentially detect more problems. The first method has a simpler implementation. The second method is enabled by default. The default waiting period is 10 miliseconds. The first method can be enabled using: ... $ export READMORE_METHOD=1 ... and the waiting period can be specified in miliseconds using: ... $ export READMORE_SLEEP=9 ... Also a log file can be specified using: ... $ export READMORE_LOG=$(pwd -P)/LOG ... Tested on x86_64-linux. Testing with check-readmore showed these regressions: ... FAIL: gdb.base/bp-cmds-continue-ctrl-c.exp: run: stop with control-c (continue) FAIL: gdb.base/bp-cmds-continue-ctrl-c.exp: attach: stop with control-c (continue) ... I have not been able to find a problem in the test-case, and I think it's the nature of both the test-case and readmore that makes it run longer. Make these pass by increasing the alarm timeout from 60 to 120 seconds. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27957
2021-07-06gdb/testsuite: restore configure scriptSimon Marchi1-5/+8
Commit f99d1d37496f ("Remove gdb/testsuite/configure") removed gdb/testsuite/configure, as anything gdb/testsuite/configure did could be done by gdb/configure. There is however one use case that popped up when this changed propagated to downstream consumers, to run the testsuite on an already built GDB. In the workflow of ROCm-GDB at AMD, a GDB package is built in a CI job. This GDB package is then tested on different machines / hardware configurations as part of other CI jobs. To achieve this, those CI jobs only configure the testsuite directory and run "make check" with an appropriate board file. In light of this use case, the way I see it is that gdb/testsuite could be considered its own project. It could be stored in a completely different repo if we want to, it just happens to be stored inside gdb/. Since the only downside of having gdb/testsuite/configure is that it takes a few more seconds to run, but on the other hand it's quite useful for some people, I propose re-adding it. In a sense, this is revert of f99d1d37496f, but it's not a direct git-revert, as some things have changed since. gdb/ChangeLog: * configure.ac: Remove things that were moved from testsuite/configure.ac. * configure: Re-generate. gdb/testsuite/ChangeLog: * configure.ac: Restore. * configure: Re-generate. * aclocal.m4: Re-generate. * Makefile.in (distclean): Add config.status. (Makefile): Adjust paths. (lib/pdtrace): Adjust paths. (config.status): Add. Change-Id: Ic38c79485e1835712d9c99649c9dfb59667254f1
2021-06-01Apply silent Makefile rules to gdb/testsuiteTom Tromey1-33/+34
This applies the silent-rules.mk treatment to gdb/testsuite/Makefile. gdb/ChangeLog 2021-06-01 Tom Tromey <tromey@adacore.com> * silent-rules.mk (ECHO_CC): New variable. gdb/testsuite/ChangeLog 2021-06-01 Tom Tromey <tromey@adacore.com> * Makefile.in (all): Don't print anything. ($(abs_builddir)/site.exp site.exp): Use $(ECHO_GEN). (expect-read1): Likewise. (read1.so): Use $(ECHO_CC). Include silent-rules.mk.
2021-06-01Remove gdb/testsuite/configureTom Tromey1-10/+8
I didn't see a strong reason to have a separate configure script in gdb/testsuite, so this patch removes it. The few relevant configury bits are moved into gdb's configure script. Some of the old testsuite/configure script (e.g., the header check) is dead code. This also adds a Makefile rule to rebuild lib/pdtrace. This was missing from the old code. 'read1' is now a dependency of check-read1, rather than extra code at configure time. Finally, the old "ENABLE_LIBCTF" subst in gdb/configure was not used; nor was the variable defined, so this was always empty. However, the lower-case variant was used by the testsuite, so this patch renames the subst. gdb/ChangeLog 2021-06-01 Tom Tromey <tromey@adacore.com> * configure.ac: Copy some code from testsuite/configure.ac. (enable_libctf): Subst this, not ENABLE_LIBCTF. * configure: Rebuild. gdb/testsuite/ChangeLog 2021-06-01 Tom Tromey <tromey@adacore.com> * aclocal.m4, configure.ac, configure: Remove. * Makefile.in (EXTRA_RULES): Remove. ($(abs_builddir)/site.exp site.exp): Don't depend on config.status. (distclean maintainer-clean realclean, Makefile): Update. (config.status): Remove target. (lib/pdtrace): New target. (all): Don't depend on EXTRA_RULES. (check-read1): Depend on read1.so, expect-read1.
2021-01-01Update copyright year range in all GDB filesJoel Brobecker1-1/+1
This commits the result of running gdb/copyright.py as per our Start of New Year procedure... gdb/ChangeLog Update copyright year range in copyright header of all GDB files.
2020-06-26Fix --enable-libctf and --disable-staticNick Alcock1-0/+2
This fixes test runs and compilation when --disable-libctf, --disable-static, or --enable-shared are passed. Changes since v2: Use GCC_ENABLE and fix indentation. Fix prototype using 'void'. Use 'unsupported' and gdb_caching_proc. Changes since v3: Adapt to upstream changes providing skip_ctf_tests. Changes since v4: Adapt to upstream changes in the seven months (!) since I last looked at this. gdb/ChangeLog * configure.ac: Add --enable-libctf: handle --disable-static properly. * acinclude.m4: sinclude ../config/enable.m4. * Makefile.in (aclocal_m4_deps): Adjust accordingly. (LIBCTF): Substitute in. (CTF_DEPS): New, likewise. (CLIBS): libctf needs symbols from libbfd: move earlier. (CDEPS): Use CTF_DEPS, not LIBCTF, now LIBCTF can include rpath flags. * ctfread.c: Surround in ENABLE_LIBCTF. (elfctf_build_psymtabs) [!ENABLE_LIBCTF]: New stub. * configure: Regenerate. * config.in: Likewise. gdb/testsuite/ChangeLog * configure.ac: Add --enable-libctf. * aclocal.m4: sinclude ../config/enable.m4. * Makefile.in (site.exp): Add enable_libctf to site.exp. * lib/gdb.exp (skip_ctf_tests): Use it. * gdb.base/ctf-constvars.exp: Error message tweak. * gdb.base/ctf-ptype.exp: Likewise. * configure: Regenerate.
2020-05-26Use = instead of == for better portabilityChristian Biesinger via Gdb-patches1-2/+2
Reported by sobukus on IRC. gdb/testsuite/ChangeLog: 2020-05-26 Christian Biesinger <cbiesinger@google.com> * Makefile.in: Use = instead of == for the test command for portability. Change-Id: I431ccfa5e5ba15f9af082ffd6aa8cd7046456cd2
2020-01-01Update copyright year range in all GDB files.Joel Brobecker1-1/+1
gdb/ChangeLog: Update copyright year range in all GDB files.
2019-05-17testsuite: Add option to capture GDB debugAlan Hayward1-1/+4
Add both board option and environment variable which enables gdb debug via a comma separated list and sends it to the file gdb.debug, located in the output directory for the current test. Document this. Add support for the environment variable in the Makefile. The testsuite can be run with gdb debug enabled in the following way: make check GDB_DEBUG="infrun,target,remote" A Test with multiple invocations of GDB will all append debug to the same log file. gdb/testsuite/ChangeLog: * Makefile.in: Pass through GDB_DEBUG. * README (Testsuite Parameters): Add GDB_DEBUG. (gdb,debug): Add board setting. * lib/gdb.exp (default_gdb_start): Start debugging. (gdb_debug_enabled): New procedure. (gdb_debug_init): Likewise.
2019-04-25testsuite: Add option to capture gdbserver debugAlan Hayward1-1/+5
Add both board option and environment variable which enables gdbserver debug and sends it to the file gdbserver.debug, located in the output directory for the current test. Document this. Add support for the environment variable in the Makefile. The testsuite can be run with gdbserver debug enabled in the following way: make check GDBSERVER_DEBUG=all Disable tspeed.exp when debugging to prevent the log file filling many gigabytes then timing out. gdb/testsuite/ChangeLog: * Makefile.in: Pass through GDBSERVER_DEBUG. * README (Testsuite Parameters): Add GDBSERVER_DEBUG. (gdbserver,debug): Add board setting. * gdb.trace/tspeed.exp: Skip when debugging. * lib/gdb.exp (gdbserver_debug_enabled): New procedure. * lib/gdbserver-support.exp: Likewise
2019-01-01Update copyright year range in all GDB files.Joel Brobecker1-1/+1
This commit applies all changes made after running the gdb/copyright.py script. Note that one file was flagged by the script, due to an invalid copyright header (gdb/unittests/basic_string_view/element_access/char/empty.cc). As the file was copied from GCC's libstdc++-v3 testsuite, this commit leaves this file untouched for the time being; a patch to fix the header was sent to gcc-patches first. gdb/ChangeLog: Update copyright year range in all GDB files.
2018-11-25Implement timestamp'ed output on "make check"Sergio Durigan Junior1-8/+12
It is unfortunately not uncommon to have tests hanging on some of the BuildBot workers. For example, the ppc64be/ppc64le+gdbserver builders are especially in a bad state when it comes to testing GDB/gdbserver, and we can have builds that take an absurd amount of time to finish (almost 1 week for one single build, for example). It may be hard to diagnose these failures, because sometimes we don't have access to the faulty systems, and other times we're just too busy to wait and check which test is actually hanging. During one of our conversations about the topic, someone proposed that it would be a good idea to have a timestamp put together with stdout output, so that we can come back later and examine which tests are taking too long to complete. Here's my proposal to do this. The very first thing I tried to do was to use "ts(1)" to achieve this feature, and it obviously worked, but the problem is that I'm afraid "ts(1)" may not be widely available on every system we support. Therefore, I decided to implement a *very* simple version of "ts(1)", in Python 3, which basically does the same thing: iterate over the stdin lines, and prepend a timestamp onto them. As for testsuite/Makefile.in, the user can now specify two new variables to enable timestamp'ed output: TS (which enables the output), and TS_FORMAT (optional, used to specify another timestamp format according to "strftime"). Here's an example of how the output looks like: ... [Nov 22 17:07:19] [1234] Running binutils-gdb/gdb/testsuite/gdb.base/call-strs.exp ... [Nov 22 17:07:19] [1234] Running binutils-gdb/gdb/testsuite/gdb.base/step-over-no-symbols.exp ... [Nov 22 17:07:20] [1234] Running binutils-gdb/gdb/testsuite/gdb.base/all-architectures-6.exp ... [Nov 22 17:07:20] [1234] Running binutils-gdb/gdb/testsuite/gdb.base/hashline3.exp ... [Nov 22 17:07:20] [1234] Running binutils-gdb/gdb/testsuite/gdb.base/max-value-size.exp ... [Nov 22 17:07:20] [1234] Running binutils-gdb/gdb/testsuite/gdb.base/quit-live.exp ... [Nov 22 17:07:46] [1234] Running binutils-gdb/gdb/testsuite/gdb.base/paginate-bg-execution.exp ... [Nov 22 17:07:56] [1234] Running binutils-gdb/gdb/testsuite/gdb.base/gcore-buffer-overflow.exp ... [Nov 22 17:07:56] [1234] Running binutils-gdb/gdb/testsuite/gdb.base/gcore-relro.exp ... [Nov 22 17:07:56] [1234] Running binutils-gdb/gdb/testsuite/gdb.base/watchpoint-delete.exp ... [Nov 22 17:07:56] [1234] Running binutils-gdb/gdb/testsuite/gdb.base/breakpoint-in-ro-region.exp ... [Nov 22 17:07:56] [1234] Running binutils-gdb/gdb/testsuite/gdb.base/vla-sideeffect.exp ... [Nov 22 17:07:57] [1234] Running binutils-gdb/gdb/testsuite/gdb.base/unload.exp ... ... (What, gdb.base/quit-live.exp is taking 26 seconds to complete?!) Output to stderr is not timestamp'ed, but I don't think that will be a problem for us. If it is, we can revisit the solution and extend it. gdb/testsuite/ChangeLog: 2018-11-25 Sergio Durigan Junior <sergiodj@redhat.com> * Makefile.in (TIMESTAMP): New variable. (check-single): Add $(TIMESTAMP) to the end of $(DO_RUNTEST) command. (check-single-racy): Likewise. (check/%.exp): Likewise. (check-racy/%.exp): Likewise. (workers/%.worker): Likewise. (build-perf): Likewise. (check-perf): Likewise. * README: Describe new "TS" and "TS_FORMAT" variables. * print-ts.py: New file.
2018-09-13Generate more tags in gdb/testsuite/MakefileTom Tromey1-1/+3
I noticed that the TAGS target in gdb/testsuite/Makefile does not pick up Tcl procs defined with proc_with_prefix or gdb_caching_proc. This patch fixes this by updating the regexp. Tested in Emacs. gdb/testsuite/ChangeLog 2018-09-13 Tom Tromey <tom@tromey.com> * Makefile.in (TAGS): Recognize proc_with_prefix and gdb_caching_proc.
2018-09-11[testsuite] Fix dg-extract-results.sh pathJan Kratochvil1-1/+1
There was a typo in patch: commit 5a6996172e6294ea37054b1a9caa3a923a8fe399 Author: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> Date: Mon Aug 6 16:05:16 2018 +0200 Update dg-extract-results.* from gcc gdb/testsuite/ChangeLog 2018-09-11 Jan Kratochvil <jan.kratochvil@redhat.com> * Makefile.in (check-parallel-racy): Fix dg-extract-results.sh path.
2018-08-07Support parallel make check with GNU make 4.2+Rainer Orth1-4/+5
I noticed that make -jN check would run make check-single when using GNU make 4.2.1. In the end, it turned out that this is due to this change from the make 4.2 NEWS file: * The amount of parallelism can be determined by querying MAKEFLAGS, even when the job server is enabled (previously MAKEFLAGS would always contain only "-j", with no number, when job server was enabled). The fix is trivial: just accept an optional arg to -j in Makefile.in (saw_dash_j). Tested on i386-pc-solaris2.11 with just make and make -j/-jN with both make 3.82 and 4.2.1. * Makefile.in (saw_dash_j): Allow for GNU make 4.2+ passing -jN in MAKEFLAGS.
2018-08-06Update dg-extract-results.* from gccRainer Orth1-4/+4
When looking at the gdb.sum file produced by dg-extract-results.sh on Solaris 11/x86, I noticed some wrong sorting, like this: PASS: gdb.ada/addr_arith.exp: print something'address + 0 PASS: gdb.ada/addr_arith.exp: print 0 + something'address PASS: gdb.ada/addr_arith.exp: print something'address - 0 PASS: gdb.ada/addr_arith.exp: print 0 - something'address Looking closer, I noticed that while dg-extract-results.sh had been copied over from contrib in the gcc repo, the corresponding dg-extract-results.py file had not. The latter not only fixes the sorting problem I'd observed, but is also way faster than the shell version (like a factor of 50 faster). Therefore I propose to update both files from the gcc repo. The changes to the .sh version are trivial, just counting the number of DejaGnu ERROR lines, too. The files are moved to toplevel contrib: * This way, they can easily be used should someone decide to parallelize one or more of the binutils, gas, or ld testsuites. * They are less easily overlooked for updates from the gcc repo when they reside in the same place in both. * The test_summary script needs to live in contrib since the toplevel Makefile's mail-report.log target expects it there. Tested on amd64-pc-solaris2.11 with make -j16 check and make -j16 -k RACY_ITER=5 check gdb/testsuite: * dg-extract-results.sh: Move to toplevel contrib. * Makefile.in (check-parallel): Reflect dg-extract-results.sh move. * Makefile.in (check-parallel-racy): Likewise. contrib: * dg-extract-results.sh: Move from gdb/testsuite. Update from gcc repo. * dg-extract-results.py: New from gcc repo.
2018-01-02Update copyright year range in all GDB filesJoel Brobecker1-1/+1
gdb/ChangeLog: Update copyright year range in all GDB files
2017-01-01update copyright year range in GDB filesJoel Brobecker1-1/+1
This applies the second part of GDB's End of Year Procedure, which updates the copyright year range in all of GDB's files. gdb/ChangeLog: Update copyright year range in all GDB files.
2016-11-30Makefiles: Disable suffix rules and implicit rulesSimon Marchi1-0/+3
Since we don't use suffix rules nor implicit rules in gdb, we can disable them. The advantage is a slightly faster make [1]. Here are some numbers about the speedup. I ran this on my trusty old Intel Q6600, so the time numbers are probably higher than what you'd get on any recent hardware. I ran "make" in the gdb/ directory of an already built repository (configured with --enable-targets=all). I recorded the time of execution (average of 5). I then ran "make -d" and recorded the number of printed lines, which gives a rough idea of the number of operations done. I compared the following configurations, to see the impact of both the empty .SUFFIXES target and the empty pattern rules, as well as running "make -r", which can be considered the "ideal" case. A - baseline B - baseline + .SUFFIXES C - baseline + pattern rules D - baseline + .SUFFIXES + pattern rules E - baseline + make -r config | time (s) | "make -d" ----------------------------- A | 5.74 | 2396643 B | 1.19 | 298469 C | 2.81 | 1266573 D | 1.13 | 245489 E | 1.01 | 163914 We can see that the empty .SUFFIXES target has a bigger impact than the empty pattern rules, but still it doesn't hurt to disable the implicit pattern rules as well. There are still some mentions of implicit rules I can't get rid of in the "make -d" output. For example, it's trying to build .c files from .w files: Looking for an implicit rule for '/home/simark/src/binutils-gdb/gdb/infrun.c'. Trying pattern rule with stem 'infrun'. Trying implicit prerequisite '/home/simark/src/binutils-gdb/gdb/infrun.w'. and trying to build Makefile.in from a bunch of extensions: Looking for an implicit rule for 'Makefile.in'. Trying pattern rule with stem 'Makefile.in'. Trying implicit prerequisite 'Makefile.in.o'. Trying pattern rule with stem 'Makefile.in'. Trying implicit prerequisite 'Makefile.in.c'. Trying pattern rule with stem 'Makefile.in'. Trying implicit prerequisite 'Makefile.in.cc'. ... many more ... If somebody knows how to disable them, we can do it, but at this point the returns are minimal, so it is not that important. I verified that both in-tree and out-of-tree builds work. [1] Switching from explicit rules to pattern rules for files in subdirectories actually made it slower, so this is kind of a way to redeem myself. But it the end it's faster than it was previously, so it was all worth it. :) gdb/ChangeLog: * disable-implicit-rules.mk: New file. * Makefile.in: Include disable-implicit-rules.mk. * data-directory/Makefile.in: Likewise. * gnulib/Makefile.in: Likewise. gdb/doc/ChangeLog: * Makefile.in: Likewise. gdb/gdbserver/ChangeLog: * Makefile.in: Include disable-implicit-rules.mk. gdb/testsuite/ChangeLog: * Makefile.in: Include disable-implicit-rules.mk.
2016-11-17Remove code that checks for GNU/non-GNU makeSimon Marchi1-46/+42
Since GNU make is now required to build GDB, we can remove everything that checks whether the current make implemention is the GNU one or not. I simply removed the @GMAKE_TRUE@ prefixes and removed the whole lines that were prefixed with @GMAKE_FALSE@. I removed the code in the configure scripts that set those variables. I also removed the following bits from the configure scripts: AC_CHECK_PROGS(MAKE, make): GNU make already defines a MAKE variable internally to be used when invoking Makefiles recursively. I don't see this variable being used anywhere else (in scripts for example), so I think it's safe for removal. AC_PROG_MAKE_SET: This macro defines a SET_MAKE output variable, which is meant to be used in Makefiles to define the MAKE variable when using an implementation of make that doesn't already define it. Since we are now requiring GNU make, we don't need it anymore. Plus, I don't see SET_MAKE being used anywhere, so I don't think it was actually doing anything... gdb/ChangeLog: * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines prefixed with @GMAKE_FALSE@. Update comment related to non-GNU make. * configure.ac: Remove checks for the make program. * configure: Re-generate. gdb/gdbserver/ChangeLog: * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines prefixed with @GMAKE_FALSE@. Update comment related to non-GNU make. * configure.ac: Remove checks for the make program. * configure: Re-generate. gdb/testsuite/ChangeLog: * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines prefixed with @GMAKE_FALSE@. Update comment related to non-GNU make. * configure.ac: Remove checks for the make program. * configure: Re-generate.
2016-03-05Improve analysis of racy testcasesSergio Durigan Junior1-3/+64
This is an initial attempt to introduce some mechanisms to identify racy testcases present in our testsuite. As can be seen in previous discussions, racy tests are really bothersome and cause our BuildBot to pollute the gdb-testers mailing list with hundreds of false-positives messages every month. Hopefully, identifying these racy tests in advance (and automatically) will contribute to the reduction of noise traffic to gdb-testers, maybe to the point where we will be able to send the failure messages directly to the authors of the commits. I spent some time trying to decide the best way to tackle this problem, and decided that there is no silver bullet. Racy tests are tricky and it is difficult to catch them, so the best solution I could find (for now?) is to run our testsuite a number of times in a row, and then compare the results (i.e., the gdb.sum files generated during each run). The more times you run the tests, the more racy tests you are likely to detect (at the expense of waiting longer and longer). You can also run the tests in parallel, which makes things faster (and contribute to catching more racy tests, because your machine will have less resources for each test and some of them are likely to fail when this happens). I did some tests in my machine (8-core i7, 16GB RAM), and running the whole GDB testsuite 5 times using -j6 took 23 minutes. Not bad. In order to run the racy test machinery, you need to specify the RACY_ITER environment variable. You will assign a number to this variable, which represents the number of times you want to run the tests. So, for example, if you want to run the whole testsuite 3 times in parallel (using 2 cores), you will do: make check RACY_ITER=3 -j2 It is also possible to use the TESTS variable and specify which tests you want to run: make check TEST='gdb.base/default.exp' RACY_ITER=3 -j2 And so on. The output files will be put at the directory gdb/testsuite/racy_outputs/. After make invokes the necessary rules to run the tests, it finally runs a Python script that will analyze the resulting gdb.sum files. This Python script will read each file, and construct a series of sets based on the results of the tests (one set for FAIL's, one for PASS'es, one for KFAIL's, etc.). It will then do some set operations and come up with a list of unique, sorted testcases that are racy. The algorithm behind this is: for state in PASS, FAIL, XFAIL, XPASS...; do if a test's state in every sumfile is $state; then it is not racy else it is racy (The algorithm is actually a bit more complex than that, because it takes into account other things in order to decide whether the test should be ignored or not). IOW, a test must have the same state in every sumfile. After processing everything, the script prints the racy tests it could identify on stdout. I am redirecting this to a file named racy.sum. Something else that I wasn't sure how to deal with was non-unique messages in our testsuite. I decided to do the same thing I do in our BuildBot: include a unique identifier in the end of message, like: gdb.base/xyz.exp: non-unique message gdb.base/xyz.exp: non-unique message <<2>> This means that you will have to be careful about them when you use the racy.sum file. I ran the script several times here, and it did a good job catching some well-known racy tests. Overall, I am satisfied with this approach and I think it will be helpful to have it upstream'ed. I also intend to extend our BuildBot and create new, specialized builders that will be responsible for detecting the racy tests every X number of days. 2016-03-05 Sergio Durigan Junior <sergiodj@redhat.com> * Makefile.in (DEFAULT_RACY_ITER): New variable. (CHECK_TARGET_TMP): Likewise. (check-single-racy): New rule. (check-parallel-racy): Likewise. (TEST_TARGETS): Adjust rule to account for RACY_ITER. (do-check-parallel-racy): New rule. (check-racy/%.exp): Likewise. * README (Racy testcases): New section. * analyze-racy-logs.py: New file.
2016-02-08Always organize test artifacts in a directory hierarchySimon Marchi1-24/+0
When running tests in parallel, each test puts its generated files in a different directory, under "outputs". I think it would be nice if it was always the case, as it would isolate the test cases a bit more. An artifact created by a test wouldn't get overwritten by another test. Also, it makes it easier to clean up. A lot of executables are left all over the place because their names do not appear in gdb.*/Makefile. If everything is in "outputs", then we just have to delete that directory (which we already do). At the same time it makes the gdb.foo directories and their Makefiles useless in the build directory, since they are pretty much only used for cleaning. What do you think? gdb/testsuite/ChangeLog: * Makefile.in (ALL_SUBDIRS): Remove. (clean mostlyclean): Do not recurse in ALL_SUBDIRS. (distclean maintainer-clean realclean): Likewise. * configure.ac (AC_OUTPUT): Remove gdb.*/Makefile. * configure: Regenerate. * gdb.ada/Makefile.in: Delete. * gdb.arch/Makefile.in: Likewise. * gdb.asm/Makefile.in: Likewise. * gdb.base/Makefile.in: Likewise. * gdb.btrace/Makefile.in: Likewise. * gdb.cell/Makefile.in: Likewise. * gdb.compile/Makefile.in: Likewise. * gdb.cp/Makefile.in: Likewise. * gdb.disasm/Makefile.in: Likewise. * gdb.dlang/Makefile.in: Likewise. * gdb.dwarf2/Makefile.in: Likewise. * gdb.fortran/Makefile.in: Likewise. * gdb.gdb/Makefile.in: Likewise. * gdb.go/Makefile.in: Likewise. * gdb.guile/Makefile.in: Likewise. * gdb.java/Makefile.in: Likewise. * gdb.linespec/Makefile.in: Likewise. * gdb.mi/Makefile.in: Likewise. * gdb.modula2/Makefile.in: Likewise. * gdb.multi/Makefile.in: Likewise. * gdb.objc/Makefile.in: Likewise. * gdb.opencl/Makefile.in: Likewise. * gdb.opt/Makefile.in: Likewise. * gdb.pascal/Makefile.in: Likewise. * gdb.perf/Makefile.in: Likewise. * gdb.python/Makefile.in: Likewise. * gdb.reverse/Makefile.in: Likewise. * gdb.server/Makefile.in: Likewise. * gdb.stabs/Makefile.in: Likewise. * gdb.threads/Makefile.in: Likewise. * gdb.trace/Makefile.in: Likewise. * gdb.xml/Makefile.in: Likewise. * lib/gdb.exp (make_gdb_parallel_path): Add check for GDB_PARALLEL. (standard_output_file): Remove check for GDB_PARALLEL, always return path in outputs/$subdir/$testname.
2016-02-08Fix in-tree, parallel running of Ada testsSimon Marchi1-1/+2
While testing the following patch, [PATCH] Always organize test artifacts in a directory hierarchy https://sourceware.org/ml/gdb-patches/2016-01/msg00133.html I noticed that it broke Ada testing. This lead me to think that parallel testing when building in-tree didn't work previously in Ada. It is confirmed by this test: $ make check TESTS="gdb.ada/fun_addr.exp" -j 2 ... Running ./gdb.ada/fun_addr.exp ... FAIL: gdb.ada/fun_addr.exp: compilation foo.adb ... This patch fixes in-tree parallel testing for Ada, and consequently serial and parallel testing when the aforementioned patch is applied. The problem originates from the fact that Ada support code cd's to the builddir before compiling. In itself it's not a problem, it allows to place intermediate auto-generated files in that directory. The Ada compilation refers to the source file, which is in another directory, only by its base name (e.g. foo.adb). In serial mode, that worked because builddir was the same as the source directory (e.g. gdb.ada/fun_addr/). In an out-of-tree build, it works because the source directory is added as an include directory (note: this is not the same $srcdir as autoconf's): set srcdir [file dirname $source] additional_flags=-I$srcdir which becomes: additional_flags=-I/home/emaisin/build/binutils-gdb/gdb/testsuite/gdb.ada/fun_addr However, when building in-tree, srcdir is relative: ./gdb.ada/fun_addr. When using parallel or always-in-outputs-directory mode, we are cd'ed in the outputs directory. So -I$srcdir is relative to the current directory, which is wrong. To fix it, I made the TCL variable srcdir (set in site.exp, from which everything else is derived) always absolute. It is done by assigning autoconf's abs_srcdir instead of autoconf's srcdir. This way -I$srcdir will always be good, regardless of where we cd'ed to. A small apparent change is that when running tests, DejaGnu will say: Running /tmp/binutils-gdb/gdb/testsuite/gdb.ada/fun_addr.exp ... instead of Running ./gdb.ada/fun_addr.exp ... I hope it's not too much of an annoyance. I think that it should make the testsuite a tiny bit more robust against other bugs of the same class. Regtested in & out of tree, only with native target. gdb/testsuite/ChangeLog: * Makefile.in (abs_srcdir): Assign @abs_srcdir@. (site.exp): Assign abs_srcdir to tcl's srcdir.
2016-01-19testsuite: Factor out --status in DO_RUNTESTSimon Marchi1-6/+6
gdb/testsuite/ChangeLog: * Makefile.in (DO_RUNTEST): Add --status and update usages.
2016-01-19testsuite: Add --status to runtest invocationSimon Marchi1-2/+2
By default, if a test driver (a test .exp) ends with an uncaught error/exception, the runtest command will still have a return code of 0 (success). However, if a test (or the environment) is broken and does not work properly, it should be considered as failed so that we can notice it and fix it. Passing the --status flag to runtest will make it return an error if one of the test it runs ends up with an uncaught error. gdb/testsuite/ChangeLog: * Makefile.in (check-single): Pass --status to runtest. (check/%.exp): Likewise.
2016-01-19testsuite: Make check-parallel return non-zero if a test failedSimon Marchi1-2/+4
When using the check-parallel target, the return code of make is always 0, regardless of test results. This patch makes it return the same code as the "make do-check-parallel" sub-command. So if there is a FAIL somewhere, non-zero will be returned by make. For the sake of example, I introduced a failure in gdb.base/break.exp. $ make check-single TESTS="gdb.base/break.exp gdb.python/py-value.exp" && echo 'Success :D' || echo 'Fail :(' ... FAIL: gdb.base/break.exp: allo ... Fail :( I think the parallel run should do the same. Currently: $ make check-parallel TESTS="gdb.base/break.exp gdb.python/py-value.exp" && echo 'Success :D' || echo 'Fail :(' ... FAIL: gdb.base/break.exp: allo ... Success :D And with the patch (no big surprises there): $ make check-parallel TESTS="gdb.base/break.exp gdb.python/py-value.exp" && echo 'Success :D' || echo 'Fail :(' ... FAIL: gdb.base/break.exp: allo ... Fail :( What do you think? gdb/testsuite/ChangeLog: * Makefile.in (check-parallel): Propagate return code from make do-check-parallel.
2016-01-01GDB copyright headers update after running GDB's copyright.py script.Joel Brobecker1-1/+1
gdb/ChangeLog: Update year range in copyright notice of all files.
2015-08-03Add parallel build support for perf tests.Doug Evans1-1/+34
gdb/testsuite/ChangeLog: * Makefile.in (workers/%.worker, build-perf): New rule. (GDB_PERFTEST_MODE): New variable. (check-perf): Use it. (clean): Clean up gdb.perf parallel build subdirs. * lib/build-piece.exp: New file. * lib/gdb.exp (make_gdb_parallel_path): New function (standard_output_file, standard_temp_file): Call it. (GDB_PARALLEL handling): Make outputs,temp,cache directories as subdirs of $GDB_PARALLEL. * lib/cache.exp (gdb_do_cache): Call make_gdb_parallel_path.
2015-07-25Revert: * Makefile.in (check/%.exp): Pass directory for GDB_PARALLEL.Doug Evans1-35/+2
Regressions, e.g., http://gdb-build.sergiodj.net/builders/Fedora-x86_64-m32/builds/1501 gdb/testsuite/ChangeLog: Revert: * Makefile.in (check/%.exp): Pass directory for GDB_PARALLEL. (workers/%.worker, build-perf): New rule. (GDB_PERFTEST_MODE): New variable. (check-perf): Use it. (clean): Clean up gdb.perf parallel build subdirs. * lib/build-piece.exp: New file. * lib/cache.exp (gdb_do_cache): Include $GDB_PARALLEL in path name. * lib/gdb.exp (standard_output_file): Include $GDB_PARALLEL in path name. (standard_temp_file): Ditto. (GDB_PARALLEL handling): Make outputs,temp,cache directories as subdirs of $GDB_PARALLEL.
2015-07-24Add parallel build support for perf tests.Doug Evans1-2/+35
gdb/testsuite/ChangeLog: * Makefile.in (check/%.exp): Pass directory for GDB_PARALLEL. (workers/%.worker, build-perf): New rule. (GDB_PERFTEST_MODE): New variable. (check-perf): Use it. (clean): Clean up gdb.perf parallel build subdirs. * lib/build-piece.exp: New file. * lib/cache.exp (gdb_do_cache): Include $GDB_PARALLEL in path name. * lib/gdb.exp (standard_output_file): Include $GDB_PARALLEL in path name. (standard_temp_file): Ditto. (GDB_PARALLEL handling): Make outputs,temp,cache directories as subdirs of $GDB_PARALLEL.
2015-03-20Remove gdb.hpJan Kratochvil1-1/+1
gdb/ChangeLog 2015-03-20 Jan Kratochvil <jan.kratochvil@redhat.com> * config/djgpp/README: Remove gdb.hp. gdb/testsuite/ChangeLog 2015-03-20 Jan Kratochvil <jan.kratochvil@redhat.com> * Makefile.in (ALL_SUBDIRS): Remove gdb.hp. * README: Remove HP-UX and gdb.hp. (configuration): * configure: Regenerate. * configure.ac (AC_OUTPUT): Remove gdb.hp/Makefile, gdb.hp/gdb.objdbg/Makefile, gdb.hp/gdb.base-hp/Makefile, gdb.hp/gdb.aCC/Makefile, gdb.hp/gdb.compat/Makefile, gdb.hp/gdb.defects/Makefile. * gdb.hp/Makefile.in: File deleted. * gdb.hp/gdb.aCC/Makefile.in: File deleted. * gdb.hp/gdb.aCC/optimize.c: File deleted. * gdb.hp/gdb.aCC/optimize.exp: File deleted. * gdb.hp/gdb.aCC/run.c: File deleted. * gdb.hp/gdb.aCC/watch-cmd.exp: File deleted. * gdb.hp/gdb.base-hp/Makefile.in: File deleted. * gdb.hp/gdb.base-hp/callfwmall.c: File deleted. * gdb.hp/gdb.base-hp/callfwmall.exp: File deleted. * gdb.hp/gdb.base-hp/dollar.c: File deleted. * gdb.hp/gdb.base-hp/dollar.exp: File deleted. * gdb.hp/gdb.base-hp/genso-thresh.c: File deleted. * gdb.hp/gdb.base-hp/hwwatchbus.c: File deleted. * gdb.hp/gdb.base-hp/hwwatchbus.exp: File deleted. * gdb.hp/gdb.base-hp/pxdb.c: File deleted. * gdb.hp/gdb.base-hp/pxdb.exp: File deleted. * gdb.hp/gdb.base-hp/reg-pa64.exp: File deleted. * gdb.hp/gdb.base-hp/reg-pa64.s: File deleted. * gdb.hp/gdb.base-hp/reg.exp: File deleted. * gdb.hp/gdb.base-hp/reg.s: File deleted. * gdb.hp/gdb.base-hp/sized-enum.c: File deleted. * gdb.hp/gdb.base-hp/sized-enum.exp: File deleted. * gdb.hp/gdb.base-hp/so-thresh.exp: File deleted. * gdb.hp/gdb.base-hp/so-thresh.mk: File deleted. * gdb.hp/gdb.base-hp/so-thresh.sh: File deleted. * gdb.hp/gdb.compat/Makefile.in: File deleted. * gdb.hp/gdb.compat/average.c: File deleted. * gdb.hp/gdb.compat/sum.c: File deleted. * gdb.hp/gdb.compat/xdb.c: File deleted. * gdb.hp/gdb.compat/xdb0.c: File deleted. * gdb.hp/gdb.compat/xdb0.h: File deleted. * gdb.hp/gdb.compat/xdb1.c: File deleted. * gdb.hp/gdb.compat/xdb1.exp: File deleted. * gdb.hp/gdb.compat/xdb2.exp: File deleted. * gdb.hp/gdb.compat/xdb3.exp: File deleted. * gdb.hp/gdb.defects/Makefile.in: File deleted. * gdb.hp/gdb.defects/bs14602.c: File deleted. * gdb.hp/gdb.defects/bs14602.exp: File deleted. * gdb.hp/gdb.defects/solib-d.c: File deleted. * gdb.hp/gdb.defects/solib-d.exp: File deleted. * gdb.hp/gdb.defects/solib-d1.c: File deleted. * gdb.hp/gdb.defects/solib-d2.c: File deleted. * gdb.hp/gdb.objdbg/Makefile.in: File deleted. * gdb.hp/gdb.objdbg/objdbg01.exp: File deleted. * gdb.hp/gdb.objdbg/objdbg01/x1.cc: File deleted. * gdb.hp/gdb.objdbg/objdbg01/x2.cc: File deleted. * gdb.hp/gdb.objdbg/objdbg01/x3.cc: File deleted. * gdb.hp/gdb.objdbg/objdbg01/x3.h: File deleted. * gdb.hp/gdb.objdbg/objdbg02.exp: File deleted. * gdb.hp/gdb.objdbg/objdbg02/x1.cc: File deleted. * gdb.hp/gdb.objdbg/objdbg02/x2.cc: File deleted. * gdb.hp/gdb.objdbg/objdbg02/x3.cc: File deleted. * gdb.hp/gdb.objdbg/objdbg03.exp: File deleted. * gdb.hp/gdb.objdbg/objdbg03/x1.cc: File deleted. * gdb.hp/gdb.objdbg/objdbg03/x2.cc: File deleted. * gdb.hp/gdb.objdbg/objdbg03/x3.cc: File deleted. * gdb.hp/gdb.objdbg/objdbg04.exp: File deleted. * gdb.hp/gdb.objdbg/objdbg04/x.h: File deleted. * gdb.hp/gdb.objdbg/objdbg04/x1.cc: File deleted. * gdb.hp/gdb.objdbg/objdbg04/x2.cc: File deleted. * gdb.hp/gdb.objdbg/tools/symaddr: File deleted. * gdb.hp/gdb.objdbg/tools/symaddr.pa64: File deleted. * gdb.hp/gdb.objdbg/tools/test-objdbg.cc: File deleted. * gdb.hp/tools/odump: File deleted.
2015-01-13gdb/testsuite: Make clean mostlyclean should not delete *.py.Joel Brobecker1-1/+1
A sanity-check in my release scripts caught something: After having created the tarballs, I verify that no checked-in file disappeared in the process, and lo and behod, it found that the following file got wiped: - gdb/testsuite/dg-extract-results.py: And it's not part of the tarball either. I don't understand while we delete all *.py files in gdb/testsuite, since I don't see a rule that expected to create one. A run of the testsuite also doesn't seem to be creating .py files there. I traced this to the following commit, which unfortunately provided no explanation. Perhaps we used to run some tests in the gdb/testsuite directory and caused files to be left behind there. Perhaps we still do today? In the meantime, Executive Decision: In order to allow me to create tarballs without losing files, I removed it. It's easy to put something back if we find out why it might still be needed. gdb/testsuite/ChangeLog: * Makefile.in (clean mostlyclean): Do not delete *.py. Tested on x86_64-linux by running the src-release.sh script again, and this time, dg-extract-results.py no longer gets wiped.
2015-01-01Update year range in copyright notice of all files owned by the GDB project.Joel Brobecker1-1/+1
gdb/ChangeLog: Update year range in copyright notice of all files.
2014-12-15 * Makefile.in (check-gdb.%): Restore.Jason Merrill1-0/+4
* README: Mention it.
2014-08-20Integrate PR 12649's race detector directly in the testsuite machineryPedro Alves1-4/+40
This integrates Jan Kratochvil's nice race reproducer from PR testsuite/12649 into the testsuite infrustructure directly. With this, one only has to do either 'make check-read1' or 'make check READ1="1"' to preload the read1.so library into expect. Currently only enabled for glibc/GNU systems, and if build==host==target. gdb/testsuite/ChangeLog: * Makefile.in (EXTRA_RULES, CC): New variables, get from configure. (EXPECT): Handle READ1 being set. (all): Depend on EXTRA_RULES. (check-read1, expect-read1, read1.so, read1): New rules. * README (Testsuite Parameters): Document the READ1 make variable. (Race detection): New section. * configure: Regenerate. * configure.ac: If build==host==target, and running under a GNU/glibc system, add read1 to the extra Makefile rules. (EXTRA_RULES): AC_SUBST it. * lib/read1.c: New file. gdb/ChangeLog: * Makefile.in (check-read1): New rule.
2014-02-18New TESTS variable to run a subset of tests in parallel.Doug Evans1-1/+27
* Makefile.in (TESTS): New variable. (expanded_tests, expanded_tests_or_none): New variables (check-single): Pass $(expanded_tests_or_none) to runtest. (check-parallel): Only run tests in $(TESTS) if non-empty. (check/no-matching-tests-found): New rule. * README: Document TESTS makefile variable.
2014-02-18* Makefile.in (check-parallel): rm -rf outputs temp.Doug Evans1-1/+1
2014-01-18Add gdb.dlang to the gdb testsuite for the purpose of creating DIain Buclaw1-1/+1
specific tests. gdb/testsuite/ChangeLog: 2014-01-17 Iain Buclaw <ibuclaw@gdcproject.org> * configure.ac: Create gdb.dlang/Makefile. * configure: Regenerate. * Makefile.in (ALL_SUBDIRS): Add gdb.dlang. * gdb.dlang/Makefile.in: New file. * lib/d-support.exp: New file. * lib/gdb.exp (skip_d_tests): New proc.
2014-01-01Update Copyright year range in all files maintained by GDB.Joel Brobecker1-1/+1
2013-11-14print summary from "make check"Tom Tromey1-0/+1
Pedro pointed out that it is handy for "make check" to print a summary of the results. This happens in the check-single case and also if you invoke runtest by hand. This patch implements the same thing for check-parallel. 2013-11-14 Tom Tromey <tromey@redhat.com> * Makefile.in (check-parallel): Print summary from gdb.sum.
2013-11-06New make target 'check-perf' and new dir gdb.perfYao Qi1-0/+4
We add a new dir gdb.perf in testsuite for all performance tests. However, current 'make check' logic will either run dejagnu in directory testsuite or iterate all gdb.* directories which has *.exp files. Both of them will run tests in gdb.perf. We want to achieve: 1) typical 'make check' should not run performance tests. In each perf test case, GDB_PERFTEST_MODE is checked. If it doesn't exist, return. 2) run perf tests easily. We add a new makefile target 'check-perf'. gdb: 2013-11-06 Yao Qi <yao@codesourcery.com> * Makefile.in (check-perf): New target. gdb/testsuite: 2013-11-06 Yao Qi <yao@codesourcery.com> * Makefile.in (check-perf): New target. * configure.ac (AC_OUTPUT): Output Makefile in gdb.perf. * configure: Re-generated. * gdb.perf/Makefile.in: New.
2013-11-04switch to fully parallel modeTom Tromey1-58/+42
This switches "make check" to fully parallel mode. One primary issue facing full parallelization is the overhead of "runtest". On my machine, if I "touch gdb.base/empty.exp", making a new file, and then "time runtest.exp", it takes 0.08 seconds. Multiply this by the 1008 (in my configuration) tests and you get ~80 seconds. This is the overhead that would theoretically be present if all tests were run in parallel. However, the problem isn't nearly as bad as this, for two reasons. First, you must divide by the number of jobs, assuming perfect parallelization -- reasonably true for small -j numbers, based on the results I see. Second, the current test suite parallelization approach bundles the tests, largely by directory, but also splitting up gdb.base into two halves. I was curious to see how the current bundling played out in practice, so I ran "make -j1 check RUNTEST='/bin/time runtest'". This invokes the parallel mode (thus the bundling) and then shows the time taken by each invocation of runtest. Then, I ran "/bin/time make -j3 check". (See below about -j2.) The time for the entire -j3 test run was the same as the time for "gdb.base1". What this means is that gdb.base1 is currently the time-limiting run, preventing further parallelization gains. So, I reason, whatever overhead we see from full parallelization will only be seen by "-j1" and "-j2". I then tried a -j2 test run. This does take longer than a -j3 build, meaning that the gdb.base1 job finishes and then proceeds to other runtest invocations. Finally I tried a -j2 test run with the appended patch. This was 9% slower than the -j2 run without the patch. I think that is a reasonable slowdown for what is probably a rare case. I believe this patch will yield faster test results for all -j values greater than 2. For -j3 on my machine, the test suite is a few seconds faster; I didn't try any larger -j values. For -j1, I went ahead and changed the Makefile so that, if no -j option is given, then the "check-single" mode is used. You can still use "make -j1 check" to get single-job parallel-mode, though of course there's no good reason to do so. This change is likely to speed up the plain "make check" scenario a little as we will now bypass dg-extract-results.sh. One drawback of this change is that "make -jN check" is now much more verbose. I generally only look at the .sum and .log files, but perhaps this will bother some. Another interesting question is scalability of the result. The slowest test, which limits the scalability, took 80.78 seconds. The mean of the remaining tests is 1.08 seconds. (Note that this is just a rough estimate, since there are still outliers.) This means we can run 80.78 / 1.08 =~ 74 tests in the time available. And, in this data set (slightly older than the above, but materially the same) there were 948 tests. So, I think the current test suite should scale ok up to about -j12. We could improve this number if need be by breaking up the biggest tests. 2013-11-04 Tom Tromey <tromey@redhat.com> * Makefile.in (TEST_DIRS): Remove. (TEST_TARGETS, check-parallel): Rewrite. (check-gdb.%, BASE1_FILES, BASE2_FILES, check-gdb.base%) (subdir_do, subdirs): Remove. (do-check-parallel, check/%): New targets. (clean): Remove outputs, temp, and cache directories. (saw_dash_j): New variable. (CHECK_TARGET): Use it. (check): Depend on all, site.exp. Rewrite. (check-single): Remove dependencies. (slow_tests, all_tests, reordered_tests): New variables.
2013-08-12 * Makefile.in (ALL_SUBDIRS): Add gdb.go.Tom Tromey1-1/+1
2013-03-11Add tests for the new record-btrace target.Markus Metzger1-2/+2
testsuite/ * Makefile.in: Add btrace testsuite. * configure: Regenerated. * configure.ac: Add btrace testsuite. * gdb.btrace/Makefile.in: New file. * gdb.btrace/enable.c: New file. * gdb.btrace/enable.exp: New file. * gdb.btrace/function_call_history.c: New file. * gdb.btrace/function_call_history.exp: New file. * gdb.btrace/instruction_history.c: New file. * gdb.btrace/instruction_history.exp: New file. * gdb.btrace/instruction_history.S: New file. * lib/gdb.exp: Add btrace skip proc.
2013-01-01Update years in copyright notice for the GDB files.Joel Brobecker1-2/+1
Two modifications: 1. The addition of 2013 to the copyright year range for every file; 2. The use of a single year range, instead of potentially multiple year ranges, as approved by the FSF.