-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Libcperciva import and trivial fixes #376
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add find_system() to the "public API", which should have been part of: 2023-06-29 scripts: misc fixes ed4c19ad5a55963e69792209a1eafc12f14c068d find_system() is not used by any other scripts in libcperciva, but other projects make use of it. - Fix the API comment for run_scenarios(), which should have been part of: 2021-03-24 tests: add `make test N=` to shared framework acea39b8aeaeb88a8fa86edb1e8e7c59c200585f - Fix the API comment for valgrind_check_optional(), which was incorrect from the very beginning: 2017-10-28 tests: import shared_test_functions.sh d486415352a2c95a98cc4935fd4ca6861ff8ed9c - Use {} for $USE_VALGRIND and $PATH in comments. This should have been part of: 2023-08-06 scripts: always use double quotes and curly braces a1e8ac785558b317de84d3821be27fa525d359ef
- document the public variables - define them in a single place - instead of recording the number of open file descriptors (as a public variable), just keep the relevant filename; we can extract the actual number every time we need it. This simplifies the logic of USE_VALGRIND_NO_REGEN.
In POSIX sh, there's no such thing as "public" or "private" functions. However, functions are allowed to contain underscores [1], so we're adopting the convention of leading underscores indicating a function which is not intended to be called by code in a different file. [1] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_235 Private functions in shared_test_functions.sh: prepare_directory notify_success_or_fail scenario_runner Private functions in shared_valgrind_functions.sh: valgrind_prepare_directory valgrind_check_optional valgrind_process_suppression_file valgrind_ensure_suppression valgrind_get_basename valgrind_check_logfile
- Fix single space after period - Add "Success!" where appropriate
Includes function pointer style fixes to |
gperciva
force-pushed
the
libcperciva-import
branch
from
October 2, 2023 02:53
38ef7fc
to
97ff1c8
Compare
- use trace-children=yes. (This actually means "trace exec"; the valgrind man page even admits that the option is badly named!) - allow our tests to only check the parent pid In more detail, in our tests/??-*.sh, we would set up: scenario_cmd() { ... c_valgrind_cmd=$(valgrind_setup_cmd "valgrind-parent") ${c_valgrind_cmd} ./test_something_with_forks If we have two pids from a single binary, then our valgrind test will assume that we're using daemonize() and ignore any leaks from the parent pid. (This is exactly what we want for daemonize().) However, if we use fork() but keep the parent, then we want the opposite: we should check for leaks in the parent, and ignore leaks from the children. We need to explicitly add something to the log filename beacuse if we didn't, then a valgrind check with two pids wouldn't know whether to complain about leaks in the parent or child.
- fix missing space between return type and opening parenthesis - fix missing space after * or **
gperciva
force-pushed
the
libcperciva-import
branch
from
October 2, 2023 02:54
97ff1c8
to
442cf00
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.