summaryrefslogtreecommitdiff
path: root/src/test/test-rlimit-util.c
Commit message (Collapse)AuthorAgeFilesLines
* Return -EINVAL from _from_string() functionsZbigniew Jędrzejewski-Szmek2021-02-101-6/+6
| | | | | | | | | | | | We'd return -1 (-EPERM), even though we have a general rule to use real errno values. The particular case that caught my attention was: $ sudo udevadm control -l asdf Failed to parse log priority 'asdf': Operation not permitted ... but "git grep 'r =.*_from_string' src/" return 110 hits. Confusingly, some of the _from_string functions already return a proper errno value, so not all of those are broken, but probably quite a few.
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* tree-wide: drop missing.hYu Watanabe2019-10-311-1/+1
|
* headers: remove unneeded includes from util.hZbigniew Jędrzejewski-Szmek2019-03-271-1/+1
| | | | | This means we need to include many more headers in various files that simply included util.h before, but it seems cleaner to do it this way.
* util: drop missing.h from util.hYu Watanabe2018-12-041-0/+1
|
* tree-wide: drop 'This file is part of systemd' blurbLennart Poettering2018-06-141-3/+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.
* rlimit-util: rework rlimit_{from|to}_string() to work without "Limit" prefixLennart Poettering2018-05-171-2/+34
| | | | | let's make the call more generic, so that we can also easily use it for parsing "RLIMIT_xyz" style constants.
* 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.
* 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.
* core: make parsing of RLIMIT_NICE aware of actual nice levelsLennart Poettering2016-04-291-0/+12
|
* basic: add new rlimit_format() callLennart Poettering2016-02-011-0/+35
| | | | This formats a struct rlimit the way rlimit_parse() expects it.
* tests: don't change hard limit in test-rlimit-utilEvgeny Vereshchagin2016-01-041-2/+2
| | | | | | | | | | | | | | Fixes: $ make valgrind-tests TESTS=test-rlimit-util ... Running test-rlimit-util Assertion 'setrlimit(RLIMIT_NOFILE, &new) >= 0' failed at src/test/test-rlimit-util.c:41, function main(). Aborting. See http://valgrind.org/docs/manual/dist.news.old.html The setrlimit system call now simply updates the emulated limits as best as possible - the hard limit is not allowed to move at all and just returns EPERM if you try and change it.
* tests: add test-rlimit-utilEvgeny Vereshchagin2015-12-071-0/+69