aboutsummaryrefslogtreecommitdiff
path: root/gprofng/testsuite
AgeCommit message (Collapse)AuthorFilesLines
2024-05-08Fix hard-coded bash path in gprofngVladimir Mezentsev1-1/+1
When running 'make check', the default gprofng test suite creates a shell script for which it used a hardcoded shebang of '/usr/bin/bash' this script would not run if bash is in a different location, like /bin/bash This commit adds 'AC_PATH_PROG(BASH, bash)' to configure.ac so the installation path of bash is detected at configuration time. The configuration is propagated to the runtest command line where it is needed.
2024-01-22Fix 31252 gprofng causes testsuite parallel jobs failVladimir Mezentsev2-13/+28
Before running our tests, we made a fake installation into ./tmpdir. This installation changes libopcodes.la in the build area. Gas testing may fail if gas and gprofng tests are run in parallel. I create a script to run gprofng. Inside this script, LD_LIBRARY_PATH, GPROFNG_SYSCONFDIR are set. putenv_libcollector_ld_misc() first uses $GPROFNG_PRELOAD_LIBDIRS to create directories for SP_COLLECTOR_LIBRARY_PATH ($SP_COLLECTOR_LIBRARY_PATH is used to set up LD_PRELOAD). gprofng/ChangeLog 2024-01-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR gprofng/31252 PR gprofng/30808 * src/envsets.cc (putenv_libcollector_ld_misc): Use $GPROFNG_PRELOAD_LIBDIRS first to build SP_COLLECTOR_LIBRARY_PATH. * testsuite/config/default.exp: Create a script to run gprofng. * testsuite/lib/display-lib.exp: Fix typo.
2024-01-04Update year range in copyright notice of binutils filesAlan Modra41-41/+41
Adds two new external authors to etc/update-copyright.py to cover bfd/ax_tls.m4, and adds gprofng to dirs handled automatically, then updates copyright messages as follows: 1) Update cgen/utils.scm emitted copyrights. 2) Run "etc/update-copyright.py --this-year" with an extra external author I haven't committed, 'Kalray SA.', to cover gas testsuite files (which should have their copyright message removed). 3) Build with --enable-maintainer-mode --enable-cgen-maint=yes. 4) Check out */po/*.pot which we don't update frequently.
2023-09-05Fix 30808 gprofng tests failedVladimir Mezentsev2-11/+14
In gprofng testing, we need a tempory gprofng installation to resolve run-time dependencies on libraries (libgprofng, libopcodes, libbfd, etc). We set LD_LIBRARY_PATH and GPROFNG_SYSCONFDIR to find our libraries and configuration file. These variables must be set for all gprofng tests. Tested on aarch64 and x86_64 with and without --enable-shared and --target=<>. gprofng/ChangeLog 2023-08-31 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR gprofng/30808 * testsuite/config/default.exp: Make a temporary install dir. Set LD_LIBRARY_PATH, GPROFNG_SYSCONFDIR. * testsuite/lib/Makefile.skel: Move LD_LIBRARY_PATH and GPROFNG_SYSCONFDIR setting in testsuite/config/default.exp.
2023-08-07gprofng: 30700 tmpdir/gp-collect-app_F test failsVladimir Mezentsev1-2/+2
gprofng/ChangeLog 2023-08-03 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR gprofng/30700 * testsuite/gprofng.display/gp-collect-app_F.exp: Fix -name argument for sub-experiment filtering.
2023-07-13gprofng: 30602 [2.41] gprofng test hangs on i686-linux-gnuVladimir Mezentsev7-31/+32
There were several problems in the gprofng testing: - we did not catch a timeout for each test. - we used exit() to stop a failed test. But this stops all other tests. - we used a time_t (long) type in smalltest.c instead of a long long type. PR gprofng/30602 * configure.ac: Launch only native testing. * configure: Rebuild. * testsuite/config/default.exp: Set TEST_TIMEOUT. * testsuite/gprofng.display/setpath_map.exp: Use return instead of exit. * testsuite/gprofng.display/gp-archive.exp: Likewise. * testsuite/gprofng.display/gp-collect-app_F.exp: Likewise. * testsuite/gprofng.display/display.exp: Delete an unnecessary test for native testing. * testsuite/lib/display-lib.exp (run_native_host_cmd): Add timeout. * testsuite/lib/smalltest.c: Use a long long type instead of time_t.
2023-06-28gprofng: Add new testsVladimir Mezentsev4-0/+236
gprofng/ChangeLog 2023-06-26 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * Makefile.am: Pass CLOCK_GETTIME_LINK to the testsuite * Makefile.in: Rebuild. * testsuite/gprofng.display/gp-archive.exp: New file. * testsuite/gprofng.display/gp-collect-app_F.exp: New file. * testsuite/gprofng.display/setpath_map.exp: New file. * testsuite/lib/smalltest.c: New file.
2023-05-31gprofng: 29470 The test suite should be made more flexibleVladimir Mezentsev15-115/+297
I add two new targets (check-extra, check-install) for gprofng testing: `make check` runs sanity testing for gprofng and takes ~30 secunds. `make check-extra` runs all gprofng tests and takes ~20 minutus. `make check-install` runs all gprofng tests and uses gprofng installation. On aarch64, there are unwind problems in libgp-collector.so. I set ACCT_FILTER to temporarily ignore problematic functions. gprofng/ChangeLog 2023-05-25 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR gprofng/29470 * Makefile.am: Add check-extra, check-install. * Makefile.in: Rebuild * testsuite/config/default.exp: Set the GPROFNG variable. * testsuite/gprofng.display/display.exp: Updated the test list. * testsuite/gprofng.display/jsynprog/Intface.java: Correct copyright. * testsuite/gprofng.display/jsynprog/Launcher.java: Likewise. * testsuite/gprofng.display/jsynprog/Makefile: Likewise. * testsuite/gprofng.display/jsynprog/Routine.java: Likewise. * testsuite/gprofng.display/jsynprog/Sub_Routine.java: Likewise. * testsuite/gprofng.display/jsynprog/cloop.cc: Likewise. * testsuite/gprofng.display/jsynprog/jsynprog.h: Likewise. * testsuite/gprofng.display/jsynprog/jsynprog.java: Correct copyright. Add the -j option to run the selected functions. * testsuite/gprofng.display/synprog/check_results.pl: Remove unused environment variable. * testsuite/gprofng.display/synprog/synprog.c: Updated DEFAULT_COMMAND. * testsuite/lib/Makefile.skel: Apply $(ACCT_FILTER). * testsuite/lib/acct.pm: Ignore errors when $(ACCT_FILTER) is set. * testsuite/lib/display-lib.exp: Add TARGET_FLAGS in make_args.
2023-01-01Update year range in gprofng copyright noticesAlan Modra31-31/+31
This adds 'Innovative Computing Labs' as an external author to update-copyright.py, to cover the copyright notice in gprofng/common/opteron_pcbe.c, and uses that plus another external author 'Oracle and' to update gprofng copyright dates. I'm not going to commit 'Oracle and' as an accepted author, but that covers the string "Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved." found in gprofng/testsuite/gprofng.display/jsynprog files.
2022-12-21gprofng/testsuite: restrict testing to native configurationsJan Beulich1-0/+7
The binaries involved in testing gprofng are native ones, and hence a cross build of binutils won't really test intended functionality. Since this testing takes quite a bit of time (typically more than running all of binutils, gas, and ld testsuites together), restrict the testing to native configurations only.
2022-12-19gprofng/testsuite: skip Java test without JDKJan Beulich1-1/+3
There's no point in even trying the Java test when gprofng was built without Java support, and when the building of the constituents of the testcase also would fail. On such systems this converts the respective tests from "unresolved" to "unsupported", making the overall testsuite run no longer report failure just because of this.
2022-12-19gprofng/testsuite: eliminate bogus castsJan Beulich2-2/+2
Casting pointers to unsigned int is generally problematic and hence compilers tend to warn about such. While here they're used only in fprintf(), it still seems better to omit such casts, even if only to avoid setting bad precedents.
2022-12-19gprofng/testsuite: correct line continuation in endcases.cJan Beulich1-1/+1
A backslash used to indicate line continuation (in a macro definition here) is not supposed to be followed by blanks or other white space; the end-of-line indicator is to follow immediately.
2022-12-19gprofng/testsuite: correct names for signal handling testsJan Beulich1-2/+2
The signal handling tests spend most of their time in the signal handlers, and hence for profile output to match anything in program output, the respective name fields need to hold the handler function names. This converts both respective tests from "unresolved" to actually succeeding.
2022-12-19gprofng/testsuite: adjust linking of synprogJan Beulich1-1/+1
In order for so_syn.so and so_syx.so to be able to access the main program's "testtime" variable, that variable needs exposing in the dynamic symbol table. Since this is a test program only, do it the brute force way and simply expose all global symbols.
2022-10-11gprofng: run tests without installationVladimir Mezentsev3-5/+6
gprofng/ChangeLog 2022-10-10 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR gprofng/29107 * testsuite/config/default.exp: Set up environment to run gprofng tests without installation. * testsuite/lib/Makefile.skel: Likewise. * testsuite/lib/display-lib.exp: Likewise.
2022-07-07gprofng: fix regression in testing for not yet installed versionVladimir Mezentsev2-18/+7
gprofng/ChangeLog 2022-07-07 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * src/Settings.cc (Settings::read_rc): Read environment variable GPROFNG_SYSCONFDIR. * testsuite/lib/Makefile.skel: Export GPROFNG_SYSCONFDIR. * testsuite/gprofng.display/display.exp: Shorten the list of tests.
2022-04-27gprofng: test suite problemsVladimir Mezentsev1-2/+2
gprofng/ChangeLog 2022-04-27 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR gprofng/29065 * testsuite/lib/Makefile.skel: Search parent dir for libs too.
2022-03-18Fix Build issues due to patch "gprofng: a new GNU profiler"Nick Clifton1-0/+5
Find and fix more places where clock_gettime() and CLOCK_MONOTONIC_RAW are used.
2022-03-17gprofng: Skip jsynprog with a broken javacH.J. Lu1-1/+7
On CET enabled Linux/x86-64 machines, one can get $ javac simple.java Error: dl failure on line 894 Error: failed /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-6.fc35.x86_64/jre/lib/amd64/server/libjvm.so, because /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-6.fc35.x86_64/jre/lib/amd64/server/libjvm.so: rebuild shared object with SHSTK support enabled Set GPROFNG_BROKEN_JAVAC to "yes" only with a broken javac and skip the jsynprog test with a broken javac. PR gprofng/28965 * Makefile.am (GPROFNG_BROKEN_JAVAC): New. (check-DEJAGNU): Pass GPROFNG_BROKEN_JAVAC to runtest. * configure.ac (GPROFNG_BROKEN_JAVAC): New AC_SUBST. Set to yes with a broken javac. * Makefile.in: Regenerate. * configure: Likewise. * testsuite/gprofng.display/display.exp: Skip jsynprog with a broken javac.
2022-03-11gprofng: a new GNU profilerVladimir Mezentsev38-0/+7489
top-level * Makefile.def: Add gprofng module. * configure.ac: Add --enable-gprofng option. * src-release.sh: Add gprofng. * Makefile.in: Regenerate. * configure: Regenerate. * gprofng: New directory. binutils * MAINTAINERS: Add gprofng maintainer. * README-how-to-make-a-release: Add gprofng. include. * collectorAPI.h: New file. * libcollector.h: New file. * libfcollector.h: New file.