Merge lp:~serge-hallyn/upstart/upstart-fix-cgm-env-tests into lp:upstart
Proposed by
Serge Hallyn
Status: | Merged |
---|---|
Merged at revision: | 1659 |
Proposed branch: | lp:~serge-hallyn/upstart/upstart-fix-cgm-env-tests |
Merge into: | lp:upstart |
Diff against target: |
82 lines (+34/-13) 2 files modified
test/test_util_common.c (+17/-7) test/tests/test_util_check_env.c (+17/-6) |
To merge this branch: | bzr merge lp:~serge-hallyn/upstart/upstart-fix-cgm-env-tests |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
James Hunt | Approve | ||
Review via email: mp+227976@code.launchpad.net |
Description of the change
This allows 'make check' by an unprivileged user to succeed if they do not own their current cgroups.
The commit message forgets to point out that this also fixes segv bugs by cleaning up the NihErrors after failed cgmanager client calls.
To post a comment you must log in.
Hi Serge,
Thanks for doing this. There is a small problem in that even on a correctly configured system, test_checks() still displays "Skipping CGManager tests, CGManager not properly configured".
A minimal fix may be something like the following:
=== modified file 'test/tests/ test_util_ check_env. c' test_util_ check_env. c 2014-07-23 18:34:26 +0000 test_util_ check_env. c 2014-07-24 07:39:49 +0000
disconnect_ cgmanager( );
--- test/tests/
+++ test/tests/
@@ -190,7 +190,8 @@
}
out_skip:
- nih_warn ("Skipping CGManager tests, CGManager not properly configured");
+ if (ret)
+ nih_warn ("Skipping CGManager tests, CGManager not properly configured");
#endif /* ENABLE_CGROUPS */
}