[systemd-commits] 3 commits - shell-completion/zsh src/test
Ronny Chevalier
rchevalier at kemper.freedesktop.org
Wed Jan 14 16:13:23 PST 2015
shell-completion/zsh/_sd_outputmodes | 2 +-
src/test/test-execute.c | 26 ++++++++++++++++++++------
src/test/test-path.c | 4 ----
3 files changed, 21 insertions(+), 11 deletions(-)
New commits:
commit d31f44e2818eb00213ca718e05b9bc624e7bfe3f
Author: Moez Bouhlel <bmoez.j at gmail.com>
Date: Wed Jan 14 14:33:32 2015 +0000
fix zsh completion typo
json-see => json-sse
diff --git a/shell-completion/zsh/_sd_outputmodes b/shell-completion/zsh/_sd_outputmodes
index 2ce84a7..3836f79 100644
--- a/shell-completion/zsh/_sd_outputmodes
+++ b/shell-completion/zsh/_sd_outputmodes
@@ -1,5 +1,5 @@
#autoload
local -a _output_opts
-_output_opts=(short short-iso short-precise short-monotonic verbose export json json-pretty json-see cat)
+_output_opts=(short short-iso short-precise short-monotonic verbose export json json-pretty json-sse cat)
_describe -t output 'output mode' _output_opts || compadd "$@"
commit 78a8e158da95aa144982f2c8aed354ef91c095b8
Author: Ronny Chevalier <chevalier.ronny at gmail.com>
Date: Thu Jan 15 00:07:15 2015 +0100
test-path: do not skip tests if we are not root
We can properly run the tests without being root
diff --git a/src/test/test-path.c b/src/test/test-path.c
index 2063ed2..1512ae2 100644
--- a/src/test/test-path.c
+++ b/src/test/test-path.c
@@ -248,10 +248,6 @@ int main(int argc, char *argv[]) {
log_parse_environment();
log_open();
- /* It is needed otherwise cgroup creation fails */
- if (getuid() != 0)
- return EXIT_TEST_SKIP;
-
assert_se(set_unit_path(TEST_DIR ":") >= 0);
for (test = tests; test && *test; test++) {
commit 68e68ca8106e7cd874682ae425843b48579c6539
Author: Ronny Chevalier <chevalier.ronny at gmail.com>
Date: Thu Jan 15 00:07:11 2015 +0100
test-exec: do not skip all the tests
Only 5 tests cannot be executed if we are not root, so just skip them
but not the whole set.
diff --git a/src/test/test-execute.c b/src/test/test-execute.c
index 91ccaf7..69368b1 100644
--- a/src/test/test-execute.c
+++ b/src/test/test-execute.c
@@ -90,6 +90,10 @@ static void test_exec_ignoresigpipe(Manager *m) {
}
static void test_exec_privatetmp(Manager *m) {
+ if (getuid() != 0) {
+ printf("Skipping test_exec_privatetmp: not root\n");
+ return;
+ }
assert_se(touch("/tmp/test-exec_privatetmp") >= 0);
test(m, "exec-privatetmp-yes.service", 0, CLD_EXITED);
@@ -99,6 +103,10 @@ static void test_exec_privatetmp(Manager *m) {
}
static void test_exec_privatedevices(Manager *m) {
+ if (getuid() != 0) {
+ printf("Skipping test_exec_privatedevices: not root\n");
+ return;
+ }
test(m, "exec-privatedevices-yes.service", 0, CLD_EXITED);
test(m, "exec-privatedevices-no.service", 0, CLD_EXITED);
}
@@ -119,10 +127,18 @@ static void test_exec_systemcallerrornumber(Manager *m) {
}
static void test_exec_user(Manager *m) {
+ if (getuid() != 0) {
+ printf("Skipping test_exec_user: not root\n");
+ return;
+ }
test(m, "exec-user.service", 0, CLD_EXITED);
}
static void test_exec_group(Manager *m) {
+ if (getuid() != 0) {
+ printf("Skipping test_exec_group: not root\n");
+ return;
+ }
test(m, "exec-group.service", 0, CLD_EXITED);
}
@@ -133,6 +149,10 @@ static void test_exec_environment(Manager *m) {
}
static void test_exec_umask(Manager *m) {
+ if (getuid() != 0) {
+ printf("Skipping test_exec_umask: not root\n");
+ return;
+ }
test(m, "exec-umask-default.service", 0, CLD_EXITED);
test(m, "exec-umask-0177.service", 0, CLD_EXITED);
}
@@ -159,12 +179,6 @@ int main(int argc, char *argv[]) {
log_parse_environment();
log_open();
- /* It is needed otherwise cgroup creation fails */
- if (getuid() != 0) {
- printf("Skipping test: not root\n");
- return EXIT_TEST_SKIP;
- }
-
assert_se(set_unit_path(TEST_DIR ":") >= 0);
r = manager_new(SYSTEMD_USER, true, &m);
More information about the systemd-commits
mailing list