Skip to content
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 #288

Merged
merged 5 commits into from
Aug 16, 2023
Merged

Libcperciva import #288

merged 5 commits into from
Aug 16, 2023

Conversation

gperciva
Copy link
Member

@gperciva gperciva commented Aug 8, 2023

No description provided.

This has two benefits:
- we can wait for any function, rather than the existence of a filename.
- if the project has ${msleep}, we use it to wait in 100ms increments
  instead of 1 second.

Also, allow wait_while to work for valgrind with servers.
- POSIX/posix-cflags.sh: replace ${NEED_STD_C99} with ${CFLAGS_C99} to
  better represent what this variable means.  In particular, since it's
  going to be used to construct a command line, it should not be quoted.

  (At the moment, the only possible values of that variable are "" or
  "-std=c99", so it wouldn't matter if we double-quoted it.  However,
  in theory there might be some compiler which required additional
  arguments in order to set it to c99 mode.)

- tests/shared_test_functions.sh: add ${s_count_str} as a "global"
  variable.  Add a list of "public API" functions.

- tests/shared_valgrind_functions.sh: use ${s_count_str}.  Also, import
  valgrind_incomplete() to support wait_while with servers.

- tests/18-warnp.sh: don't use $(...), because we don't want to run the
  output of check_output.  All we want is the exit code, so (...) is the
  correct construct.

- apisupport/, cpusupport/, release-tools/: add newlines to separate
  code paragraphs.
This should have been part of:
    2022-08-21 build: add compile-time support for apisupport-config.h
    7a72e7df6393cd02bde6dfc52e2ea0a297b9d47e
This should have been part of
    2020-09-22 entropy: add & use _init(), _fill(), _done()
    3d8879d8ce0e27e0a0145e8f9948896dbab0f244
and
    2020-08-06 warnp: clean up with closelog()
    56b1c9192669add070e7cd73403d6e4c03c1efdd
Command line:
shellcheck -s sh -i SC2248,SC2250 -o quote-safe-variables,require-variable-braces $(git ls-files "*.sh")

(There will be two complaints about wanting to double-quote
${CFLAGS_C99}, but it's constructing a command-line, so ignore those
warnings.)

Explanation:
- Prefer double quoting even when variables don't contain special
  characters.
  https://www.shellcheck.net/wiki/SC2248

- Prefer putting braces around variable references even when not
  strictly required.
  https://github.com/koalaman/shellcheck/wiki/SC2250

Reported by:	shellcheck 0.9.0
fi
"${msleep}" 100
done
wait_while has_pid "lbs/lbs"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using wait_while in tests/kivaloo_servers.sh is in addition to the libcperciva import.

@cperciva cperciva merged commit 4ae827a into master Aug 16, 2023
2 checks passed
@gperciva gperciva deleted the libcperciva-import branch August 16, 2023 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants