summaryrefslogtreecommitdiff
path: root/src/test/test-watchdog.c
Commit message (Collapse)AuthorAgeFilesLines
* test-watchdog: set timeout to 2 seconds by defaultMike Gilbert2022-01-061-1/+1
| | | | | | Some hardware/drivers do not handle a 1 second timeout properly. Fixes: https://github.com/systemd/systemd/issues/22001
* test-watchdog: use watchdog_runtime_wait() to determine sleep intervalMike Gilbert2022-01-061-2/+3
| | | | | As sugggested in https://github.com/systemd/systemd/issues/22001#issuecomment-1006755438.
* watchdog: rename watchdog_set_timeout() into watchdog_setup()Franck Bui2021-09-151-1/+1
| | | | | "watchdog_set_timeout()" was misleading as the function is not just a setter - it must be called for activating the watchdog device.
* core: watchdog_set_timeout() doesn't need to return the timeout value used ↵Franck Bui2021-09-151-1/+1
| | | | | | | by the HW The manager currently doesn't need it and if it does in the future an helper should probably be introduced instead.
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* tests: use a helper function to parse environment and open loggingZbigniew Jędrzejewski-Szmek2018-09-141-3/+1
| | | | | The advantages are that we save a few lines, and that we can override logging using environment variables in more test executables.
* tests: centralize check for slow testsZbigniew Jędrzejewski-Szmek2018-09-131-3/+3
|
* tree-wide: remove Lennart's copyright linesLennart Poettering2018-06-141-3/+0
| | | | | | | | | | | These lines are generally out-of-date, incomplete and unnecessary. With SPDX and git repository much more accurate and fine grained information about licensing and authorship is available, hence let's drop the per-file copyright notice. Of course, removing copyright lines of others is problematic, hence this commit only removes my own lines and leaves all others untouched. It might be nicer if sooner or later those could go away too, making git the only and accurate source of authorship information.
* tree-wide: drop 'This file is part of systemd' blurbLennart Poettering2018-06-141-2/+0
| | | | | | | | | | | | | | | | This part of the copyright blurb stems from the GPL use recommendations: https://www.gnu.org/licenses/gpl-howto.en.html The concept appears to originate in times where version control was per file, instead of per tree, and was a way to glue the files together. Ultimately, we nowadays don't live in that world anymore, and this information is entirely useless anyway, as people are very welcome to copy these files into any projects they like, and they shouldn't have to change bits that are part of our copyright header for that. hence, let's just get rid of this old cruft, and shorten our codebase a bit.
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-04-061-13/+0
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* log: minimize includes in log.hLennart Poettering2018-01-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | log.h really should only include the bare minimum of other headers, as it is really pulled into pretty much everything else and already in itself one of the most basic pieces of code we have. Let's hence drop inclusion of: 1. sd-id128.h because it's entirely unneeded in current log.h 2. errno.h, dito. 3. sys/signalfd.h which we can replace by a simple struct forward declaration 4. process-util.h which was needed for getpid_cached() which we now hide in a funciton log_emergency_level() instead, which nicely abstracts the details away. 5. sys/socket.h which was needed for struct iovec, but a simple struct forward declaration suffices for that too. Ultimately this actually makes our source tree larger (since users of the functionality above must now include it themselves, log.h won't do that for them), but I think it helps to untangle our web of includes a tiny bit. (Background: I'd like to isolate the generic bits of src/basic/ enough so that we can do a git submodule import into casync for it)
* Add SPDX license identifiers to source files under the LGPLZbigniew Jędrzejewski-Szmek2017-11-191-0/+1
| | | | | This follows what the kernel is doing, c.f. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5fd54ace4721fc5ce2bb5aef6318fcf17f421460.
* test-watchdog: wait just one cycle unless $SYSTEMD_SLOW_TESTSZbigniew Jędrzejewski-Szmek2017-07-131-3/+13
| | | | | | Also, if we fail to set the watchdog, run through the rest of the test without waiting. I think it's useful to still start the commands to test the error paths, but we can do it quickly.
* tree-wide: remove Emacs lines from all filesDaniel Mack2016-02-101-2/+0
| | | | | This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
* tree-wide: sort includesThomas Hindoe Paaboel Andersen2015-11-161-1/+1
| | | | Sort the includes accoding to the new coding style.
* remove unused includesThomas Hindoe Paaboel Andersen2015-02-231-1/+0
| | | | | | This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
* treewide: no need to negate errno for log_*_errno()Michal Schmidt2014-11-281-2/+2
| | | | It corrrectly handles both positive and negative errno values.
* treewide: auto-convert the simple cases to log_*_errno()Michal Schmidt2014-11-281-2/+2
| | | | | | | | | | | | | As a followup to 086891e5c1 "log: add an "error" parameter to all low-level logging calls and intrdouce log_error_errno() as log calls that take error numbers", use sed to convert the simple cases to use the new macros: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/' Multi-line log_*() invocations are not covered. And we also should add log_unit_*_errno().
* test: test tools should still be in the src/ directoryLennart Poettering2012-04-121-0/+51