summaryrefslogtreecommitdiff
path: root/src/test/test-sysctl-util.c
Commit message (Collapse)AuthorAgeFilesLines
* tree-wide: drop de-constifying casts for strv iterationZbigniew Jędrzejewski-Szmek2022-05-081-1/+1
| | | | | | | When the the iterator variable is declared automatically, it "inherits" the const/non-const status from the argument. We don't need to cast a const table to non-const. If we had a programming error and tried to modify the string, the compiler could now catch this.
* strv: make iterator in STRV_FOREACH() declaread in the loopYu Watanabe2022-03-191-1/+0
| | | | This also avoids multiple evaluations in STRV_FOREACH_BACKWARDS()
* hostname-util: drop GET_HOSTNAME_ALLOW_NONE flag and always refuse "(none)"Yu Watanabe2021-12-311-3/+6
| | | | | | The flag is now only used in test-sysctl-util.c, and it should be replaced with uname(), because of the same reason as the previous commit.
* test: Use TEST macroJan Janssen2021-11-251-12/+3
| | | | | | | | | This converts to TEST macro where it is trivial. Some additional notable changes: - simplify HAVE_LIBIDN #ifdef in test-dns-domain.c - use saved_argc/saved_argv in test-copy.c, test-path-util.c, test-tmpfiles.c and test-unit-file.c
* test: add test case for sysctl-util.[ch]Lennart Poettering2021-09-151-0/+38
|
* test: make array in test-sysctl fully read-onlyLennart Poettering2021-09-151-2/+2
|
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* shared/sysctl-util: normalize repeated slashes or dots to a single valueZbigniew Jędrzejewski-Szmek2020-01-301-0/+44
We use those strings as hash keys. While writing "a...b" looks strange, "a///b" does not look so strange. Both syntaxes would actually result in the value being correctly written to the file, but they would confuse our de-deplication over keys. So let's normalize. Output also becomes nicer. Add test.