1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-08 02:57:16 +03:00
Commit Graph

9 Commits

Author SHA1 Message Date
Thomas Hindoe Paaboel Andersen
8354c34e14 tests: more tests
tests for:
 parse_boolean
 env_name_is_valid

Also convert assert to assert_se to make sure they are run even with
optimization. (see commit 9b5d6bd909)
2013-02-11 22:22:40 +01:00
Lennart Poettering
9b5d6bd909 test-env-replace: better user assert_se() everywhere
For test tools it's better to use assert_se() rather than assert(),
since the former is not optimized away, even if -DNDEBUG is used. That
means the test program now retains its usefulness even if -DNDEBUG is
used.

This also adds in some OOM checks, to be extra anal...
2013-02-11 03:55:07 +01:00
Lennart Poettering
4d1a690438 env: considerably beef up environment cleaning logic
Now, actually check if the environment variable names and values used
are valid, before accepting them. With this in place are at some places
more rigid than POSIX, and less rigid at others. For example, this code
allows lower-case environment variables (which POSIX suggests not to
use), but it will not allow non-UTF8 variable values.

All in all this should be a good middle ground of what to allow and what
not to allow as environment variables.

(This also splits out all environment related calls into env-util.[ch])
2013-02-11 03:54:50 +01:00
Thomas Hindoe Paaboel Andersen
940bd4738b tests: add more tests
Adds tests of:
 strv_env_delete
 strv_env_unset
 strv_env_set
2013-02-08 00:25:37 +01:00
Thomas Hindoe Paaboel Andersen
1f28b2deb4 test-env-replace: assert results instead of printing them
Also code cleanup and split into functions in preparation for more tests
to come.
2013-02-07 21:14:36 +01:00
Thomas Hindoe Paaboel Andersen
10ddd913f0 tests: move strv_parse_nulstr to test-strv, and actually test it
The test was originally added with this commit message:
"ask-password: supported plymouth cached passwords"
2013-02-07 00:38:16 +01:00
Thomas Hindoe Paaboel Andersen
7c2d80944a strv: add strv_print
Clearer, and spares the temp variable.
2013-02-07 00:38:09 +01:00
Lennart Poettering
57f3067825 util: fix bad strstrip() return value in normalize_env_assignment()
https://bugzilla.redhat.com/show_bug.cgi?id=858780
2012-09-19 22:01:31 +02:00
Lennart Poettering
379079ba6b test: test tools should still be in the src/ directory 2012-04-12 13:48:01 +02:00