summaryrefslogtreecommitdiff
path: root/src/test/test-parse-util.c
Commit message (Collapse)AuthorAge
* Prep v239: Uncomment header inclusions that are new or needed now.Sven Eden2018-08-24
|
* tree-wide: drop copyright headers from frequent contributorsZbigniew Jędrzejewski-Szmek2018-08-24
| | | | | | | | Fixes #9320. for p in Shapovalov Chevalier Rozhkov Sievers Mack Herrmann Schmidt Rudenberg Sahani Landden Andersen Watanabe; do git grep -e 'Copyright.*'$p -l|xargs perl -i -0pe 's|/([*][*])?[*]\s+([*#]\s+)?Copyright[^\n]*'$p'[^\n]*\s*[*]([*][*])?/\n*|\n|gms; s|\s+([*#]\s+)?Copyright[^\n]*'$p'[^\n]*\n*|\n|gms' done
* tree-wide: beautify remaining copyright statementsLennart Poettering2018-08-24
| | | | | | Let's unify an beautify our remaining copyright statements, with a unicode ©. This means our copyright statements are now always formatted the same way. Yay.
* tree-wide: remove Lennart's copyright linesLennart Poettering2018-08-24
| | | | | | | | | | | 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-08-24
| | | | | | | | | | | | | | | | 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.
* parse-util: add permille parser + testsMarc Kleine-Budde2018-08-24
|
* parse-util: add explicit parsers for MTU valuesLennart Poettering2018-08-24
| | | | | | | | | We use MTUs all over the place, let's add a unified, strict parser for it, that takes MTU ranges into account. We already have parse_ifindex() close-by, hence this appears to be a natural addition, in particular as the range checking is not entirely trivial to do, as it depends on the protocol used.
* tree-wide: drop spurious newlines (#8764)Lennart Poettering2018-08-24
| | | | | | | | | Double newlines (i.e. one empty lines) are great to structure code. But let's avoid triple newlines (i.e. two empty lines), quadruple newlines, quintuple newlines, …, that's just spurious whitespace. It's an easy way to drop 121 lines of code, and keeps the coding style of our sources a bit tigther.
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-08-24
| | | | | | | | | | 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.
* Prep v238: Uncomment now needed headers and unmask now needed functions in ↵Sven Eden2018-06-05
| | | | src/test (6/6)
* Fix format-truncation compile failure by typecasting USB IDs (#8250)Patrick Uiterwijk2018-05-30
| | | | | | | | | | | | | | | This patch adds safe_atoux16 for parsing an unsigned hexadecimal 16bit int, and uses that for parsing USB device and vendor IDs. This fixes a compile error with gcc-8 because while we know that USB IDs are 2 bytes, the compiler does not know that. ../src/udev/udev-builtin-hwdb.c:80:38: error: '%04X' directive output may be truncated writing between 4 and 8 bytes into a region of size between 2 and 6 [-Werror=format-truncation=] Signed-off-by: Adam Williamson <awilliam@redhat.com> Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* log: minimize includes in log.hLennart Poettering2018-05-30
| | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* Prep v236 : Add missing SPDX-License-Identifier (8/9) src/testSven Eden2018-03-26
|
* test/test-parse-util.c: Masked the test of strtod() with set germanSven Eden2018-01-25
| | | | | | | | locale to be only used with __GLIBC__. It seems that the strtod() function in stdlib.h from musl_libc does not heed the set locale. It fails with a german floating point number.
* test-parse-util: verify that ato[ui] actually rejects trailing garbageZbigniew Jędrzejewski-Szmek2017-07-25
|
* parse-util: introduce parse_dev() helperFranck Bui2017-07-25
|
* Prep v233.3: Add all possible coverage tests for elogindSven Eden2017-07-20