Merge lp:~thomas-voss/process-cpp/refactor-namespace-to-core into lp:process-cpp
- refactor-namespace-to-core
- Merge into trunk
Proposed by
Thomas Voß
Status: | Merged |
---|---|
Approved by: | Timo Jyrinki |
Approved revision: | 27 |
Merged at revision: | 25 |
Proposed branch: | lp:~thomas-voss/process-cpp/refactor-namespace-to-core |
Merge into: | lp:process-cpp |
Diff against target: |
2640 lines (+678/-587) 42 files modified
debian/libprocess-cpp-dev.install (+1/-1) debian/libprocess-cpp0.symbols.amd64 (+60/-60) debian/libprocess-cpp0.symbols.armhf (+60/-60) debian/libprocess-cpp0.symbols.i386 (+60/-60) include/CMakeLists.txt (+2/-2) include/core/posix/child_process.h (+13/-10) include/core/posix/exec.h (+9/-6) include/core/posix/exit.h (+6/-3) include/core/posix/fork.h (+11/-8) include/core/posix/linux/proc/process/oom_adj.h (+12/-9) include/core/posix/linux/proc/process/oom_score.h (+15/-12) include/core/posix/linux/proc/process/oom_score_adj.h (+12/-9) include/core/posix/linux/proc/process/stat.h (+16/-13) include/core/posix/linux/proc/process/state.h (+7/-4) include/core/posix/process.h (+13/-10) include/core/posix/process_group.h (+11/-8) include/core/posix/signal.h (+5/-2) include/core/posix/signalable.h (+11/-8) include/core/posix/standard_stream.h (+9/-6) include/core/posix/this_process.h (+19/-16) include/core/posix/visibility.h (+7/-7) include/core/posix/wait.h (+11/-8) include/core/testing/fork_and_run.h (+14/-12) src/CMakeLists.txt (+16/-16) src/core/posix/child_process.cpp (+4/-1) src/core/posix/exec.cpp (+6/-3) src/core/posix/fork.cpp (+5/-2) src/core/posix/linux/proc/process/oom_adj.cpp (+5/-2) src/core/posix/linux/proc/process/oom_score.cpp (+5/-2) src/core/posix/linux/proc/process/oom_score_adj.cpp (+5/-2) src/core/posix/linux/proc/process/stat.cpp (+5/-2) src/core/posix/linux/proc/process/state.cpp (+5/-2) src/core/posix/process.cpp (+5/-2) src/core/posix/process_group.cpp (+4/-2) src/core/posix/signalable.cpp (+4/-1) src/core/posix/standard_stream.cpp (+4/-1) src/core/posix/this_process.cpp (+5/-2) src/core/posix/wait.cpp (+4/-1) src/core/testing/fork_and_run.cpp (+33/-33) tests/fork_and_run_test.cpp (+25/-25) tests/linux_process_test.cpp (+47/-47) tests/posix_process_test.cpp (+107/-107) |
To merge this branch: | bzr merge lp:~thomas-voss/process-cpp/refactor-namespace-to-core |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Timo Jyrinki | Approve | ||
PS Jenkins bot | continuous-integration | Approve | |
Review via email: mp+197395@code.launchpad.net |
Commit message
Refactor to namespace core.
Description of the change
Refactor to namespace core.
To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : | # |
review:
Approve
(continuous-integration)
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote : | # |
Looks consistent, builds fine.
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'debian/libprocess-cpp-dev.install' |
2 | --- debian/libprocess-cpp-dev.install 2013-11-05 12:51:17 +0000 |
3 | +++ debian/libprocess-cpp-dev.install 2013-12-02 14:48:12 +0000 |
4 | @@ -1,3 +1,3 @@ |
5 | -usr/include/process-cpp/* |
6 | +usr/include/core/* |
7 | usr/lib/*/libprocess-cpp.so |
8 | usr/lib/*/pkgconfig/* |
9 | |
10 | === modified file 'debian/libprocess-cpp0.symbols.amd64' |
11 | --- debian/libprocess-cpp0.symbols.amd64 2013-11-14 07:45:17 +0000 |
12 | +++ debian/libprocess-cpp0.symbols.amd64 2013-12-02 14:48:12 +0000 |
13 | @@ -1,46 +1,46 @@ |
14 | libprocess-cpp.so.0 libprocess-cpp0 #MINVER# |
15 | - (c++)"posix::Signalable::send_signal(posix::Signal, std::error_code&)@Base" 0replaceme |
16 | - (c++)"posix::Signalable::send_signal_or_throw(posix::Signal)@Base" 0replaceme |
17 | - (c++)"posix::ChildProcess::invalid()@Base" 0replaceme |
18 | - (c++)"posix::ChildProcess::wait_for(posix::wait::Flags const&)@Base" 0replaceme |
19 | - (c++)"posix::exec(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, posix::StandardStream const&)@Base" 0replaceme |
20 | - (c++)"posix::fork(std::function<posix::exit::Status ()> const&, posix::StandardStream const&)@Base" 0replaceme |
21 | - (c++)"posix::wait::operator|(posix::wait::Flags, posix::wait::Flags)@Base" 0replaceme |
22 | - (c++)"posix::vfork(std::function<posix::exit::Status ()> const&, posix::StandardStream const&)@Base" 0replaceme |
23 | - (c++)"posix::Process::Process(int)@Base" 0replaceme |
24 | - (c++)"posix::Process::invalid()@Base" 0replaceme |
25 | - (c++)"posix::operator&(posix::StandardStream, posix::StandardStream)@Base" 0replaceme |
26 | - (c++)"posix::operator|(posix::StandardStream, posix::StandardStream)@Base" 0replaceme |
27 | - (c++)"posix::ProcessGroup::id() const@Base" 0replaceme |
28 | - (c++)"posix::Process::process_group(std::error_code&) const@Base" 0replaceme |
29 | - (c++)"posix::Process::process_group_or_throw() const@Base" 0replaceme |
30 | - (c++)"typeinfo for posix::Signalable@Base" 0replaceme |
31 | - (c++)"typeinfo for posix::ProcessGroup@Base" 0replaceme |
32 | - (c++)"typeinfo name for posix::Signalable@Base" 0replaceme |
33 | - (c++)"typeinfo name for posix::ProcessGroup@Base" 0replaceme |
34 | - (c++)"vtable for posix::Signalable@Base" 0replaceme |
35 | - (c++)"vtable for posix::ProcessGroup@Base" 0replaceme |
36 | - (c++)"posix::ChildProcess::cin()@Base" 0replaceme |
37 | - (c++)"posix::ChildProcess::cerr()@Base" 0replaceme |
38 | - (c++)"posix::ChildProcess::cout()@Base" 0replaceme |
39 | - (c++)"posix::ChildProcess::~ChildProcess()@Base" 0replaceme |
40 | - (c++)"posix::linux::proc::process::OomScoreAdj::max_value()@Base" 0replaceme |
41 | - (c++)"posix::linux::proc::process::OomScoreAdj::min_value()@Base" 0replaceme |
42 | - (c++)"posix::linux::proc::process::OomAdj::disable_value()@Base" 0replaceme |
43 | - (c++)"posix::linux::proc::process::OomAdj::max_value()@Base" 0replaceme |
44 | - (c++)"posix::linux::proc::process::OomAdj::min_value()@Base" 0replaceme |
45 | - (c++)"posix::linux::proc::process::operator<<(posix::Process const&, posix::linux::proc::process::OomScoreAdj const&)@Base" 0replaceme |
46 | - (c++)"posix::linux::proc::process::operator<<(posix::Process const&, posix::linux::proc::process::OomAdj const&)@Base" 0replaceme |
47 | - (c++)"posix::linux::proc::process::operator>>(posix::Process const&, posix::linux::proc::process::OomScoreAdj&)@Base" 0replaceme |
48 | - (c++)"posix::linux::proc::process::operator>>(posix::Process const&, posix::linux::proc::process::Stat&)@Base" 0replaceme |
49 | - (c++)"posix::linux::proc::process::operator>>(posix::Process const&, posix::linux::proc::process::OomAdj&)@Base" 0replaceme |
50 | - (c++)"posix::linux::proc::process::operator>>(posix::Process const&, posix::linux::proc::process::OomScore&)@Base" 0replaceme |
51 | - (c++)"posix::Process::~Process()@Base" 0replaceme |
52 | - (c++)"posix::Process::pid() const@Base" 0replaceme |
53 | - (c++)"testing::fork_and_run(std::function<posix::exit::Status ()> const&, std::function<posix::exit::Status ()> const&)@Base" 0replaceme |
54 | - (c++)"testing::operator&(testing::ForkAndRunResult, testing::ForkAndRunResult)@Base" 0replaceme |
55 | - (c++)"testing::operator|(testing::ForkAndRunResult, testing::ForkAndRunResult)@Base" 0replaceme |
56 | - (c++)"std::function<posix::exit::Status ()>::operator()() const@Base" 0replaceme |
57 | + (c++)"core::posix::Signalable::send_signal(core::posix::Signal, std::error_code&)@Base" 0replaceme |
58 | + (c++)"core::posix::Signalable::send_signal_or_throw(core::posix::Signal)@Base" 0replaceme |
59 | + (c++)"core::posix::ChildProcess::invalid()@Base" 0replaceme |
60 | + (c++)"core::posix::ChildProcess::wait_for(core::posix::wait::Flags const&)@Base" 0replaceme |
61 | + (c++)"core::posix::exec(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, core::posix::StandardStream const&)@Base" 0replaceme |
62 | + (c++)"core::posix::fork(std::function<core::posix::exit::Status ()> const&, core::posix::StandardStream const&)@Base" 0replaceme |
63 | + (c++)"core::posix::wait::operator|(core::posix::wait::Flags, core::posix::wait::Flags)@Base" 0replaceme |
64 | + (c++)"core::posix::vfork(std::function<core::posix::exit::Status ()> const&, core::posix::StandardStream const&)@Base" 0replaceme |
65 | + (c++)"core::posix::Process::Process(int)@Base" 0replaceme |
66 | + (c++)"core::posix::Process::invalid()@Base" 0replaceme |
67 | + (c++)"core::posix::operator&(core::posix::StandardStream, core::posix::StandardStream)@Base" 0replaceme |
68 | + (c++)"core::posix::operator|(core::posix::StandardStream, core::posix::StandardStream)@Base" 0replaceme |
69 | + (c++)"core::posix::ProcessGroup::id() const@Base" 0replaceme |
70 | + (c++)"core::posix::Process::process_group(std::error_code&) const@Base" 0replaceme |
71 | + (c++)"core::posix::Process::process_group_or_throw() const@Base" 0replaceme |
72 | + (c++)"typeinfo for core::posix::Signalable@Base" 0replaceme |
73 | + (c++)"typeinfo for core::posix::ProcessGroup@Base" 0replaceme |
74 | + (c++)"typeinfo name for core::posix::Signalable@Base" 0replaceme |
75 | + (c++)"typeinfo name for core::posix::ProcessGroup@Base" 0replaceme |
76 | + (c++)"vtable for core::posix::Signalable@Base" 0replaceme |
77 | + (c++)"vtable for core::posix::ProcessGroup@Base" 0replaceme |
78 | + (c++)"core::posix::ChildProcess::cin()@Base" 0replaceme |
79 | + (c++)"core::posix::ChildProcess::cerr()@Base" 0replaceme |
80 | + (c++)"core::posix::ChildProcess::cout()@Base" 0replaceme |
81 | + (c++)"core::posix::ChildProcess::~ChildProcess()@Base" 0replaceme |
82 | + (c++)"core::posix::linux::proc::process::OomScoreAdj::max_value()@Base" 0replaceme |
83 | + (c++)"core::posix::linux::proc::process::OomScoreAdj::min_value()@Base" 0replaceme |
84 | + (c++)"core::posix::linux::proc::process::OomAdj::disable_value()@Base" 0replaceme |
85 | + (c++)"core::posix::linux::proc::process::OomAdj::max_value()@Base" 0replaceme |
86 | + (c++)"core::posix::linux::proc::process::OomAdj::min_value()@Base" 0replaceme |
87 | + (c++)"core::posix::linux::proc::process::operator<<(core::posix::Process const&, core::posix::linux::proc::process::OomScoreAdj const&)@Base" 0replaceme |
88 | + (c++)"core::posix::linux::proc::process::operator<<(core::posix::Process const&, core::posix::linux::proc::process::OomAdj const&)@Base" 0replaceme |
89 | + (c++)"core::posix::linux::proc::process::operator>>(core::posix::Process const&, core::posix::linux::proc::process::OomScoreAdj&)@Base" 0replaceme |
90 | + (c++)"core::posix::linux::proc::process::operator>>(core::posix::Process const&, core::posix::linux::proc::process::Stat&)@Base" 0replaceme |
91 | + (c++)"core::posix::linux::proc::process::operator>>(core::posix::Process const&, core::posix::linux::proc::process::OomAdj&)@Base" 0replaceme |
92 | + (c++)"core::posix::linux::proc::process::operator>>(core::posix::Process const&, core::posix::linux::proc::process::OomScore&)@Base" 0replaceme |
93 | + (c++)"core::posix::Process::~Process()@Base" 0replaceme |
94 | + (c++)"core::posix::Process::pid() const@Base" 0replaceme |
95 | + (c++)"core::testing::fork_and_run(std::function<core::posix::exit::Status ()> const&, std::function<core::posix::exit::Status ()> const&)@Base" 0replaceme |
96 | + (c++)"core::testing::operator&(core::testing::ForkAndRunResult, core::testing::ForkAndRunResult)@Base" 0replaceme |
97 | + (c++)"core::testing::operator|(core::testing::ForkAndRunResult, core::testing::ForkAndRunResult)@Base" 0replaceme |
98 | + (c++)"std::function<core::posix::exit::Status ()>::operator()() const@Base" 0replaceme |
99 | (c++)"char* std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_construct<char*>(char*, char*, std::allocator<char> const&, std::forward_iterator_tag)@Base" 0replaceme |
100 | (c++)"std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::~basic_stringbuf()@Base" 0replaceme |
101 | (c++)"std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::~basic_stringbuf()@Base" 0replaceme |
102 | @@ -62,32 +62,32 @@ |
103 | (c++)"bool std::binary_search<char const*, char>(char const*, char const*, char const&)@Base" 0replaceme |
104 | (c++)"void std::__insertion_sort<char*>(char*, char*)@Base" 0replaceme |
105 | (c++)"void std::__introsort_loop<char*, long>(char*, char*, long)@Base" 0replaceme |
106 | - (c++)"typeinfo for posix::ChildProcess@Base" 0replaceme |
107 | - (c++)"typeinfo for posix::Process@Base" 0replaceme |
108 | + (c++)"typeinfo for core::posix::ChildProcess@Base" 0replaceme |
109 | + (c++)"typeinfo for core::posix::Process@Base" 0replaceme |
110 | (c++)"typeinfo for std::_Mutex_base<(__gnu_cxx::_Lock_policy)2>@Base" 0replaceme |
111 | (c++)"typeinfo for std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>@Base" 0replaceme |
112 | - (c++)"typeinfo name for posix::ChildProcess@Base" 0replaceme |
113 | - (c++)"typeinfo name for posix::Process@Base" 0replaceme |
114 | + (c++)"typeinfo name for core::posix::ChildProcess@Base" 0replaceme |
115 | + (c++)"typeinfo name for core::posix::Process@Base" 0replaceme |
116 | (c++)"typeinfo name for std::_Mutex_base<(__gnu_cxx::_Lock_policy)2>@Base" 0replaceme |
117 | (c++)"typeinfo name for std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>@Base" 0replaceme |
118 | - (c++)"vtable for posix::ChildProcess@Base" 0replaceme |
119 | - (c++)"vtable for posix::Process@Base" 0replaceme |
120 | + (c++)"vtable for core::posix::ChildProcess@Base" 0replaceme |
121 | + (c++)"vtable for core::posix::Process@Base" 0replaceme |
122 | (c++)"vtable for std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>@Base" 0replaceme |
123 | (c++)"boost::exception_detail::error_info_injector<std::ios_base::failure>::~error_info_injector()@Base" 0replaceme |
124 | (c++)"boost::exception_detail::error_info_injector<std::ios_base::failure>::~error_info_injector()@Base" 0replaceme |
125 | (c++)"boost::exception_detail::error_info_injector<std::ios_base::failure>::~error_info_injector()@Base" 0replaceme |
126 | - (c++)"posix::this_process::cin()@Base" 0replaceme |
127 | - (c++)"posix::this_process::env::set_or_throw(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0replaceme |
128 | - (c++)"posix::this_process::env::unset_or_throw(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0replaceme |
129 | - (c++)"posix::this_process::env::get_or_throw(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0replaceme |
130 | - (c++)"posix::this_process::env::get(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0replaceme |
131 | - (c++)"posix::this_process::env::set(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::error_code&)@Base" 0replaceme |
132 | - (c++)"posix::this_process::env::unset(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::error_code&)@Base" 0replaceme |
133 | - (c++)"posix::this_process::env::for_each(std::function<void (std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)> const&)@Base" 0replaceme |
134 | - (c++)"posix::this_process::cerr()@Base" 0replaceme |
135 | - (c++)"posix::this_process::cout()@Base" 0replaceme |
136 | - (c++)"posix::this_process::parent()@Base" 0replaceme |
137 | - (c++)"posix::this_process::instance()@Base" 0replaceme |
138 | + (c++)"core::posix::this_process::cin()@Base" 0replaceme |
139 | + (c++)"core::posix::this_process::env::set_or_throw(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0replaceme |
140 | + (c++)"core::posix::this_process::env::unset_or_throw(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0replaceme |
141 | + (c++)"core::posix::this_process::env::get_or_throw(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0replaceme |
142 | + (c++)"core::posix::this_process::env::get(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0replaceme |
143 | + (c++)"core::posix::this_process::env::set(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::error_code&)@Base" 0replaceme |
144 | + (c++)"core::posix::this_process::env::unset(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::error_code&)@Base" 0replaceme |
145 | + (c++)"core::posix::this_process::env::for_each(std::function<void (std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)> const&)@Base" 0replaceme |
146 | + (c++)"core::posix::this_process::cerr()@Base" 0replaceme |
147 | + (c++)"core::posix::this_process::cout()@Base" 0replaceme |
148 | + (c++)"core::posix::this_process::parent()@Base" 0replaceme |
149 | + (c++)"core::posix::this_process::instance()@Base" 0replaceme |
150 | (c++)"typeinfo for boost::exception_detail::clone_base@Base" 0replaceme |
151 | (c++)"typeinfo for boost::exception_detail::error_info_injector<std::ios_base::failure>@Base" 0replaceme |
152 | (c++)"typeinfo for boost::exception@Base" 0replaceme |
153 | |
154 | === modified file 'debian/libprocess-cpp0.symbols.armhf' |
155 | --- debian/libprocess-cpp0.symbols.armhf 2013-11-14 07:45:17 +0000 |
156 | +++ debian/libprocess-cpp0.symbols.armhf 2013-12-02 14:48:12 +0000 |
157 | @@ -1,46 +1,46 @@ |
158 | libprocess-cpp.so.0 libprocess-cpp0 #MINVER# |
159 | - (c++)"posix::Signalable::send_signal(posix::Signal, std::error_code&)@Base" 0replaceme |
160 | - (c++)"posix::Signalable::send_signal_or_throw(posix::Signal)@Base" 0replaceme |
161 | - (c++)"posix::ChildProcess::invalid()@Base" 0replaceme |
162 | - (c++)"posix::ChildProcess::wait_for(posix::wait::Flags const&)@Base" 0replaceme |
163 | - (c++)"posix::exec(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, posix::StandardStream const&)@Base" 0replaceme |
164 | - (c++)"posix::fork(std::function<posix::exit::Status ()> const&, posix::StandardStream const&)@Base" 0replaceme |
165 | - (c++)"posix::wait::operator|(posix::wait::Flags, posix::wait::Flags)@Base" 0replaceme |
166 | - (c++)"posix::vfork(std::function<posix::exit::Status ()> const&, posix::StandardStream const&)@Base" 0replaceme |
167 | - (c++)"posix::Process::Process(int)@Base" 0replaceme |
168 | - (c++)"posix::Process::invalid()@Base" 0replaceme |
169 | - (c++)"posix::operator&(posix::StandardStream, posix::StandardStream)@Base" 0replaceme |
170 | - (c++)"posix::operator|(posix::StandardStream, posix::StandardStream)@Base" 0replaceme |
171 | - (c++)"posix::ProcessGroup::id() const@Base" 0replaceme |
172 | - (c++)"posix::Process::process_group(std::error_code&) const@Base" 0replaceme |
173 | - (c++)"posix::Process::process_group_or_throw() const@Base" 0replaceme |
174 | - (c++)"typeinfo for posix::Signalable@Base" 0replaceme |
175 | - (c++)"typeinfo for posix::ProcessGroup@Base" 0replaceme |
176 | - (c++)"typeinfo name for posix::Signalable@Base" 0replaceme |
177 | - (c++)"typeinfo name for posix::ProcessGroup@Base" 0replaceme |
178 | - (c++)"vtable for posix::Signalable@Base" 0replaceme |
179 | - (c++)"vtable for posix::ProcessGroup@Base" 0replaceme |
180 | - (c++)"posix::ChildProcess::cin()@Base" 0replaceme |
181 | - (c++)"posix::ChildProcess::cerr()@Base" 0replaceme |
182 | - (c++)"posix::ChildProcess::cout()@Base" 0replaceme |
183 | - (c++)"posix::ChildProcess::~ChildProcess()@Base" 0replaceme |
184 | - (c++)"posix::linux::proc::process::OomScoreAdj::max_value()@Base" 0replaceme |
185 | - (c++)"posix::linux::proc::process::OomScoreAdj::min_value()@Base" 0replaceme |
186 | - (c++)"posix::linux::proc::process::OomAdj::disable_value()@Base" 0replaceme |
187 | - (c++)"posix::linux::proc::process::OomAdj::max_value()@Base" 0replaceme |
188 | - (c++)"posix::linux::proc::process::OomAdj::min_value()@Base" 0replaceme |
189 | - (c++)"posix::linux::proc::process::operator<<(posix::Process const&, posix::linux::proc::process::OomScoreAdj const&)@Base" 0replaceme |
190 | - (c++)"posix::linux::proc::process::operator<<(posix::Process const&, posix::linux::proc::process::OomAdj const&)@Base" 0replaceme |
191 | - (c++)"posix::linux::proc::process::operator>>(posix::Process const&, posix::linux::proc::process::OomScoreAdj&)@Base" 0replaceme |
192 | - (c++)"posix::linux::proc::process::operator>>(posix::Process const&, posix::linux::proc::process::Stat&)@Base" 0replaceme |
193 | - (c++)"posix::linux::proc::process::operator>>(posix::Process const&, posix::linux::proc::process::OomAdj&)@Base" 0replaceme |
194 | - (c++)"posix::linux::proc::process::operator>>(posix::Process const&, posix::linux::proc::process::OomScore&)@Base" 0replaceme |
195 | - (c++)"posix::Process::~Process()@Base" 0replaceme |
196 | - (c++)"posix::Process::pid() const@Base" 0replaceme |
197 | - (c++)"testing::fork_and_run(std::function<posix::exit::Status ()> const&, std::function<posix::exit::Status ()> const&)@Base" 0replaceme |
198 | - (c++)"testing::operator&(testing::ForkAndRunResult, testing::ForkAndRunResult)@Base" 0replaceme |
199 | - (c++)"testing::operator|(testing::ForkAndRunResult, testing::ForkAndRunResult)@Base" 0replaceme |
200 | - (c++)"std::function<posix::exit::Status ()>::operator()() const@Base" 0replaceme |
201 | + (c++)"core::posix::Signalable::send_signal(core::posix::Signal, std::error_code&)@Base" 0replaceme |
202 | + (c++)"core::posix::Signalable::send_signal_or_throw(core::posix::Signal)@Base" 0replaceme |
203 | + (c++)"core::posix::ChildProcess::invalid()@Base" 0replaceme |
204 | + (c++)"core::posix::ChildProcess::wait_for(core::posix::wait::Flags const&)@Base" 0replaceme |
205 | + (c++)"core::posix::exec(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, core::posix::StandardStream const&)@Base" 0replaceme |
206 | + (c++)"core::posix::fork(std::function<core::posix::exit::Status ()> const&, core::posix::StandardStream const&)@Base" 0replaceme |
207 | + (c++)"core::posix::wait::operator|(core::posix::wait::Flags, core::posix::wait::Flags)@Base" 0replaceme |
208 | + (c++)"core::posix::vfork(std::function<core::posix::exit::Status ()> const&, core::posix::StandardStream const&)@Base" 0replaceme |
209 | + (c++)"core::posix::Process::Process(int)@Base" 0replaceme |
210 | + (c++)"core::posix::Process::invalid()@Base" 0replaceme |
211 | + (c++)"core::posix::operator&(core::posix::StandardStream, core::posix::StandardStream)@Base" 0replaceme |
212 | + (c++)"core::posix::operator|(core::posix::StandardStream, core::posix::StandardStream)@Base" 0replaceme |
213 | + (c++)"core::posix::ProcessGroup::id() const@Base" 0replaceme |
214 | + (c++)"core::posix::Process::process_group(std::error_code&) const@Base" 0replaceme |
215 | + (c++)"core::posix::Process::process_group_or_throw() const@Base" 0replaceme |
216 | + (c++)"typeinfo for core::posix::Signalable@Base" 0replaceme |
217 | + (c++)"typeinfo for core::posix::ProcessGroup@Base" 0replaceme |
218 | + (c++)"typeinfo name for core::posix::Signalable@Base" 0replaceme |
219 | + (c++)"typeinfo name for core::posix::ProcessGroup@Base" 0replaceme |
220 | + (c++)"vtable for core::posix::Signalable@Base" 0replaceme |
221 | + (c++)"vtable for core::posix::ProcessGroup@Base" 0replaceme |
222 | + (c++)"core::posix::ChildProcess::cin()@Base" 0replaceme |
223 | + (c++)"core::posix::ChildProcess::cerr()@Base" 0replaceme |
224 | + (c++)"core::posix::ChildProcess::cout()@Base" 0replaceme |
225 | + (c++)"core::posix::ChildProcess::~ChildProcess()@Base" 0replaceme |
226 | + (c++)"core::posix::linux::proc::process::OomScoreAdj::max_value()@Base" 0replaceme |
227 | + (c++)"core::posix::linux::proc::process::OomScoreAdj::min_value()@Base" 0replaceme |
228 | + (c++)"core::posix::linux::proc::process::OomAdj::disable_value()@Base" 0replaceme |
229 | + (c++)"core::posix::linux::proc::process::OomAdj::max_value()@Base" 0replaceme |
230 | + (c++)"core::posix::linux::proc::process::OomAdj::min_value()@Base" 0replaceme |
231 | + (c++)"core::posix::linux::proc::process::operator<<(core::posix::Process const&, core::posix::linux::proc::process::OomScoreAdj const&)@Base" 0replaceme |
232 | + (c++)"core::posix::linux::proc::process::operator<<(core::posix::Process const&, core::posix::linux::proc::process::OomAdj const&)@Base" 0replaceme |
233 | + (c++)"core::posix::linux::proc::process::operator>>(core::posix::Process const&, core::posix::linux::proc::process::OomScoreAdj&)@Base" 0replaceme |
234 | + (c++)"core::posix::linux::proc::process::operator>>(core::posix::Process const&, core::posix::linux::proc::process::Stat&)@Base" 0replaceme |
235 | + (c++)"core::posix::linux::proc::process::operator>>(core::posix::Process const&, core::posix::linux::proc::process::OomAdj&)@Base" 0replaceme |
236 | + (c++)"core::posix::linux::proc::process::operator>>(core::posix::Process const&, core::posix::linux::proc::process::OomScore&)@Base" 0replaceme |
237 | + (c++)"core::posix::Process::~Process()@Base" 0replaceme |
238 | + (c++)"core::posix::Process::pid() const@Base" 0replaceme |
239 | + (c++)"core::testing::fork_and_run(std::function<core::posix::exit::Status ()> const&, std::function<core::posix::exit::Status ()> const&)@Base" 0replaceme |
240 | + (c++)"core::testing::operator&(core::testing::ForkAndRunResult, core::testing::ForkAndRunResult)@Base" 0replaceme |
241 | + (c++)"core::testing::operator|(core::testing::ForkAndRunResult, core::testing::ForkAndRunResult)@Base" 0replaceme |
242 | + (c++)"std::function<core::posix::exit::Status ()>::operator()() const@Base" 0replaceme |
243 | (c++)"char* std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_construct<char*>(char*, char*, std::allocator<char> const&, std::forward_iterator_tag)@Base" 0replaceme |
244 | (c++)"std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::~basic_stringbuf()@Base" 0replaceme |
245 | (c++)"std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::~basic_stringbuf()@Base" 0replaceme |
246 | @@ -62,32 +62,32 @@ |
247 | (c++)"bool std::binary_search<char const*, char>(char const*, char const*, char const&)@Base" 0replaceme |
248 | (c++)"void std::__insertion_sort<char*>(char*, char*)@Base" 0replaceme |
249 | (c++)"void std::__introsort_loop<char*, int>(char*, char*, int)@Base" 0replaceme |
250 | - (c++)"typeinfo for posix::ChildProcess@Base" 0replaceme |
251 | - (c++)"typeinfo for posix::Process@Base" 0replaceme |
252 | + (c++)"typeinfo for core::posix::ChildProcess@Base" 0replaceme |
253 | + (c++)"typeinfo for core::posix::Process@Base" 0replaceme |
254 | (c++)"typeinfo for std::_Mutex_base<(__gnu_cxx::_Lock_policy)2>@Base" 0replaceme |
255 | (c++)"typeinfo for std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>@Base" 0replaceme |
256 | - (c++)"typeinfo name for posix::ChildProcess@Base" 0replaceme |
257 | - (c++)"typeinfo name for posix::Process@Base" 0replaceme |
258 | + (c++)"typeinfo name for core::posix::ChildProcess@Base" 0replaceme |
259 | + (c++)"typeinfo name for core::posix::Process@Base" 0replaceme |
260 | (c++)"typeinfo name for std::_Mutex_base<(__gnu_cxx::_Lock_policy)2>@Base" 0replaceme |
261 | (c++)"typeinfo name for std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>@Base" 0replaceme |
262 | - (c++)"vtable for posix::ChildProcess@Base" 0replaceme |
263 | - (c++)"vtable for posix::Process@Base" 0replaceme |
264 | + (c++)"vtable for core::posix::ChildProcess@Base" 0replaceme |
265 | + (c++)"vtable for core::posix::Process@Base" 0replaceme |
266 | (c++)"vtable for std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>@Base" 0replaceme |
267 | (c++)"boost::exception_detail::error_info_injector<std::ios_base::failure>::~error_info_injector()@Base" 0replaceme |
268 | (c++)"boost::exception_detail::error_info_injector<std::ios_base::failure>::~error_info_injector()@Base" 0replaceme |
269 | (c++)"boost::exception_detail::error_info_injector<std::ios_base::failure>::~error_info_injector()@Base" 0replaceme |
270 | - (c++)"posix::this_process::cin()@Base" 0replaceme |
271 | - (c++)"posix::this_process::env::set_or_throw(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0replaceme |
272 | - (c++)"posix::this_process::env::unset_or_throw(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0replaceme |
273 | - (c++)"posix::this_process::env::get_or_throw(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0replaceme |
274 | - (c++)"posix::this_process::env::get(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0replaceme |
275 | - (c++)"posix::this_process::env::set(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::error_code&)@Base" 0replaceme |
276 | - (c++)"posix::this_process::env::unset(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::error_code&)@Base" 0replaceme |
277 | - (c++)"posix::this_process::env::for_each(std::function<void (std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)> const&)@Base" 0replaceme |
278 | - (c++)"posix::this_process::cerr()@Base" 0replaceme |
279 | - (c++)"posix::this_process::cout()@Base" 0replaceme |
280 | - (c++)"posix::this_process::parent()@Base" 0replaceme |
281 | - (c++)"posix::this_process::instance()@Base" 0replaceme |
282 | + (c++)"core::posix::this_process::cin()@Base" 0replaceme |
283 | + (c++)"core::posix::this_process::env::set_or_throw(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0replaceme |
284 | + (c++)"core::posix::this_process::env::unset_or_throw(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0replaceme |
285 | + (c++)"core::posix::this_process::env::get_or_throw(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0replaceme |
286 | + (c++)"core::posix::this_process::env::get(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0replaceme |
287 | + (c++)"core::posix::this_process::env::set(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::error_code&)@Base" 0replaceme |
288 | + (c++)"core::posix::this_process::env::unset(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::error_code&)@Base" 0replaceme |
289 | + (c++)"core::posix::this_process::env::for_each(std::function<void (std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)> const&)@Base" 0replaceme |
290 | + (c++)"core::posix::this_process::cerr()@Base" 0replaceme |
291 | + (c++)"core::posix::this_process::cout()@Base" 0replaceme |
292 | + (c++)"core::posix::this_process::parent()@Base" 0replaceme |
293 | + (c++)"core::posix::this_process::instance()@Base" 0replaceme |
294 | (c++)"typeinfo for boost::exception_detail::clone_base@Base" 0replaceme |
295 | (c++)"typeinfo for boost::exception_detail::error_info_injector<std::ios_base::failure>@Base" 0replaceme |
296 | (c++)"typeinfo for boost::exception@Base" 0replaceme |
297 | |
298 | === modified file 'debian/libprocess-cpp0.symbols.i386' |
299 | --- debian/libprocess-cpp0.symbols.i386 2013-11-14 07:45:17 +0000 |
300 | +++ debian/libprocess-cpp0.symbols.i386 2013-12-02 14:48:12 +0000 |
301 | @@ -1,46 +1,46 @@ |
302 | libprocess-cpp.so.0 libprocess-cpp0 #MINVER# |
303 | - (c++)"posix::Signalable::send_signal(posix::Signal, std::error_code&)@Base" 0replaceme |
304 | - (c++)"posix::Signalable::send_signal_or_throw(posix::Signal)@Base" 0replaceme |
305 | - (c++)"posix::ChildProcess::invalid()@Base" 0replaceme |
306 | - (c++)"posix::ChildProcess::wait_for(posix::wait::Flags const&)@Base" 0replaceme |
307 | - (c++)"posix::exec(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, posix::StandardStream const&)@Base" 0replaceme |
308 | - (c++)"posix::fork(std::function<posix::exit::Status ()> const&, posix::StandardStream const&)@Base" 0replaceme |
309 | - (c++)"posix::wait::operator|(posix::wait::Flags, posix::wait::Flags)@Base" 0replaceme |
310 | - (c++)"posix::vfork(std::function<posix::exit::Status ()> const&, posix::StandardStream const&)@Base" 0replaceme |
311 | - (c++)"posix::Process::Process(int)@Base" 0replaceme |
312 | - (c++)"posix::Process::invalid()@Base" 0replaceme |
313 | - (c++)"posix::operator&(posix::StandardStream, posix::StandardStream)@Base" 0replaceme |
314 | - (c++)"posix::operator|(posix::StandardStream, posix::StandardStream)@Base" 0replaceme |
315 | - (c++)"posix::ProcessGroup::id() const@Base" 0replaceme |
316 | - (c++)"posix::Process::process_group(std::error_code&) const@Base" 0replaceme |
317 | - (c++)"posix::Process::process_group_or_throw() const@Base" 0replaceme |
318 | - (c++)"typeinfo for posix::Signalable@Base" 0replaceme |
319 | - (c++)"typeinfo for posix::ProcessGroup@Base" 0replaceme |
320 | - (c++)"typeinfo name for posix::Signalable@Base" 0replaceme |
321 | - (c++)"typeinfo name for posix::ProcessGroup@Base" 0replaceme |
322 | - (c++)"vtable for posix::Signalable@Base" 0replaceme |
323 | - (c++)"vtable for posix::ProcessGroup@Base" 0replaceme |
324 | - (c++)"posix::ChildProcess::cin()@Base" 0replaceme |
325 | - (c++)"posix::ChildProcess::cerr()@Base" 0replaceme |
326 | - (c++)"posix::ChildProcess::cout()@Base" 0replaceme |
327 | - (c++)"posix::ChildProcess::~ChildProcess()@Base" 0replaceme |
328 | - (c++)"posix::linux::proc::process::OomScoreAdj::max_value()@Base" 0replaceme |
329 | - (c++)"posix::linux::proc::process::OomScoreAdj::min_value()@Base" 0replaceme |
330 | - (c++)"posix::linux::proc::process::OomAdj::disable_value()@Base" 0replaceme |
331 | - (c++)"posix::linux::proc::process::OomAdj::max_value()@Base" 0replaceme |
332 | - (c++)"posix::linux::proc::process::OomAdj::min_value()@Base" 0replaceme |
333 | - (c++)"posix::linux::proc::process::operator<<(posix::Process const&, posix::linux::proc::process::OomScoreAdj const&)@Base" 0replaceme |
334 | - (c++)"posix::linux::proc::process::operator<<(posix::Process const&, posix::linux::proc::process::OomAdj const&)@Base" 0replaceme |
335 | - (c++)"posix::linux::proc::process::operator>>(posix::Process const&, posix::linux::proc::process::OomScoreAdj&)@Base" 0replaceme |
336 | - (c++)"posix::linux::proc::process::operator>>(posix::Process const&, posix::linux::proc::process::Stat&)@Base" 0replaceme |
337 | - (c++)"posix::linux::proc::process::operator>>(posix::Process const&, posix::linux::proc::process::OomAdj&)@Base" 0replaceme |
338 | - (c++)"posix::linux::proc::process::operator>>(posix::Process const&, posix::linux::proc::process::OomScore&)@Base" 0replaceme |
339 | - (c++)"posix::Process::~Process()@Base" 0replaceme |
340 | - (c++)"posix::Process::pid() const@Base" 0replaceme |
341 | - (c++)"testing::fork_and_run(std::function<posix::exit::Status ()> const&, std::function<posix::exit::Status ()> const&)@Base" 0replaceme |
342 | - (c++)"testing::operator&(testing::ForkAndRunResult, testing::ForkAndRunResult)@Base" 0replaceme |
343 | - (c++)"testing::operator|(testing::ForkAndRunResult, testing::ForkAndRunResult)@Base" 0replaceme |
344 | - (c++)"std::function<posix::exit::Status ()>::operator()() const@Base" 0replaceme |
345 | + (c++)"core::posix::Signalable::send_signal(core::posix::Signal, std::error_code&)@Base" 0replaceme |
346 | + (c++)"core::posix::Signalable::send_signal_or_throw(core::posix::Signal)@Base" 0replaceme |
347 | + (c++)"core::posix::ChildProcess::invalid()@Base" 0replaceme |
348 | + (c++)"core::posix::ChildProcess::wait_for(core::posix::wait::Flags const&)@Base" 0replaceme |
349 | + (c++)"core::posix::exec(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, core::posix::StandardStream const&)@Base" 0replaceme |
350 | + (c++)"core::posix::fork(std::function<core::posix::exit::Status ()> const&, core::posix::StandardStream const&)@Base" 0replaceme |
351 | + (c++)"core::posix::wait::operator|(core::posix::wait::Flags, core::posix::wait::Flags)@Base" 0replaceme |
352 | + (c++)"core::posix::vfork(std::function<core::posix::exit::Status ()> const&, core::posix::StandardStream const&)@Base" 0replaceme |
353 | + (c++)"core::posix::Process::Process(int)@Base" 0replaceme |
354 | + (c++)"core::posix::Process::invalid()@Base" 0replaceme |
355 | + (c++)"core::posix::operator&(core::posix::StandardStream, core::posix::StandardStream)@Base" 0replaceme |
356 | + (c++)"core::posix::operator|(core::posix::StandardStream, core::posix::StandardStream)@Base" 0replaceme |
357 | + (c++)"core::posix::ProcessGroup::id() const@Base" 0replaceme |
358 | + (c++)"core::posix::Process::process_group(std::error_code&) const@Base" 0replaceme |
359 | + (c++)"core::posix::Process::process_group_or_throw() const@Base" 0replaceme |
360 | + (c++)"typeinfo for core::posix::Signalable@Base" 0replaceme |
361 | + (c++)"typeinfo for core::posix::ProcessGroup@Base" 0replaceme |
362 | + (c++)"typeinfo name for core::posix::Signalable@Base" 0replaceme |
363 | + (c++)"typeinfo name for core::posix::ProcessGroup@Base" 0replaceme |
364 | + (c++)"vtable for core::posix::Signalable@Base" 0replaceme |
365 | + (c++)"vtable for core::posix::ProcessGroup@Base" 0replaceme |
366 | + (c++)"core::posix::ChildProcess::cin()@Base" 0replaceme |
367 | + (c++)"core::posix::ChildProcess::cerr()@Base" 0replaceme |
368 | + (c++)"core::posix::ChildProcess::cout()@Base" 0replaceme |
369 | + (c++)"core::posix::ChildProcess::~ChildProcess()@Base" 0replaceme |
370 | + (c++)"core::posix::linux::proc::process::OomScoreAdj::max_value()@Base" 0replaceme |
371 | + (c++)"core::posix::linux::proc::process::OomScoreAdj::min_value()@Base" 0replaceme |
372 | + (c++)"core::posix::linux::proc::process::OomAdj::disable_value()@Base" 0replaceme |
373 | + (c++)"core::posix::linux::proc::process::OomAdj::max_value()@Base" 0replaceme |
374 | + (c++)"core::posix::linux::proc::process::OomAdj::min_value()@Base" 0replaceme |
375 | + (c++)"core::posix::linux::proc::process::operator<<(core::posix::Process const&, core::posix::linux::proc::process::OomScoreAdj const&)@Base" 0replaceme |
376 | + (c++)"core::posix::linux::proc::process::operator<<(core::posix::Process const&, core::posix::linux::proc::process::OomAdj const&)@Base" 0replaceme |
377 | + (c++)"core::posix::linux::proc::process::operator>>(core::posix::Process const&, core::posix::linux::proc::process::OomScoreAdj&)@Base" 0replaceme |
378 | + (c++)"core::posix::linux::proc::process::operator>>(core::posix::Process const&, core::posix::linux::proc::process::Stat&)@Base" 0replaceme |
379 | + (c++)"core::posix::linux::proc::process::operator>>(core::posix::Process const&, core::posix::linux::proc::process::OomAdj&)@Base" 0replaceme |
380 | + (c++)"core::posix::linux::proc::process::operator>>(core::posix::Process const&, core::posix::linux::proc::process::OomScore&)@Base" 0replaceme |
381 | + (c++)"core::posix::Process::~Process()@Base" 0replaceme |
382 | + (c++)"core::posix::Process::pid() const@Base" 0replaceme |
383 | + (c++)"core::testing::fork_and_run(std::function<core::posix::exit::Status ()> const&, std::function<core::posix::exit::Status ()> const&)@Base" 0replaceme |
384 | + (c++)"core::testing::operator&(core::testing::ForkAndRunResult, core::testing::ForkAndRunResult)@Base" 0replaceme |
385 | + (c++)"core::testing::operator|(core::testing::ForkAndRunResult, core::testing::ForkAndRunResult)@Base" 0replaceme |
386 | + (c++)"std::function<core::posix::exit::Status ()>::operator()() const@Base" 0replaceme |
387 | (c++)"char* std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_construct<char*>(char*, char*, std::allocator<char> const&, std::forward_iterator_tag)@Base" 0replaceme |
388 | (c++)"std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::~basic_stringbuf()@Base" 0replaceme |
389 | (c++)"std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::~basic_stringbuf()@Base" 0replaceme |
390 | @@ -62,32 +62,32 @@ |
391 | (c++)"bool std::binary_search<char const*, char>(char const*, char const*, char const&)@Base" 0replaceme |
392 | (c++)"void std::__insertion_sort<char*>(char*, char*)@Base" 0replaceme |
393 | (c++)"void std::__introsort_loop<char*, int>(char*, char*, int)@Base" 0replaceme |
394 | - (c++)"typeinfo for posix::ChildProcess@Base" 0replaceme |
395 | - (c++)"typeinfo for posix::Process@Base" 0replaceme |
396 | + (c++)"typeinfo for core::posix::ChildProcess@Base" 0replaceme |
397 | + (c++)"typeinfo for core::posix::Process@Base" 0replaceme |
398 | (c++)"typeinfo for std::_Mutex_base<(__gnu_cxx::_Lock_policy)2>@Base" 0replaceme |
399 | (c++)"typeinfo for std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>@Base" 0replaceme |
400 | - (c++)"typeinfo name for posix::ChildProcess@Base" 0replaceme |
401 | - (c++)"typeinfo name for posix::Process@Base" 0replaceme |
402 | + (c++)"typeinfo name for core::posix::ChildProcess@Base" 0replaceme |
403 | + (c++)"typeinfo name for core::posix::Process@Base" 0replaceme |
404 | (c++)"typeinfo name for std::_Mutex_base<(__gnu_cxx::_Lock_policy)2>@Base" 0replaceme |
405 | (c++)"typeinfo name for std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>@Base" 0replaceme |
406 | - (c++)"vtable for posix::ChildProcess@Base" 0replaceme |
407 | - (c++)"vtable for posix::Process@Base" 0replaceme |
408 | + (c++)"vtable for core::posix::ChildProcess@Base" 0replaceme |
409 | + (c++)"vtable for core::posix::Process@Base" 0replaceme |
410 | (c++)"vtable for std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>@Base" 0replaceme |
411 | (c++)"boost::exception_detail::error_info_injector<std::ios_base::failure>::~error_info_injector()@Base" 0replaceme |
412 | (c++)"boost::exception_detail::error_info_injector<std::ios_base::failure>::~error_info_injector()@Base" 0replaceme |
413 | (c++)"boost::exception_detail::error_info_injector<std::ios_base::failure>::~error_info_injector()@Base" 0replaceme |
414 | - (c++)"posix::this_process::cin()@Base" 0replaceme |
415 | - (c++)"posix::this_process::env::set_or_throw(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0replaceme |
416 | - (c++)"posix::this_process::env::unset_or_throw(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0replaceme |
417 | - (c++)"posix::this_process::env::get_or_throw(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0replaceme |
418 | - (c++)"posix::this_process::env::get(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0replaceme |
419 | - (c++)"posix::this_process::env::set(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::error_code&)@Base" 0replaceme |
420 | - (c++)"posix::this_process::env::unset(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::error_code&)@Base" 0replaceme |
421 | - (c++)"posix::this_process::env::for_each(std::function<void (std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)> const&)@Base" 0replaceme |
422 | - (c++)"posix::this_process::cerr()@Base" 0replaceme |
423 | - (c++)"posix::this_process::cout()@Base" 0replaceme |
424 | - (c++)"posix::this_process::parent()@Base" 0replaceme |
425 | - (c++)"posix::this_process::instance()@Base" 0replaceme |
426 | + (c++)"core::posix::this_process::cin()@Base" 0replaceme |
427 | + (c++)"core::posix::this_process::env::set_or_throw(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0replaceme |
428 | + (c++)"core::posix::this_process::env::unset_or_throw(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0replaceme |
429 | + (c++)"core::posix::this_process::env::get_or_throw(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0replaceme |
430 | + (c++)"core::posix::this_process::env::get(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0replaceme |
431 | + (c++)"core::posix::this_process::env::set(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::error_code&)@Base" 0replaceme |
432 | + (c++)"core::posix::this_process::env::unset(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::error_code&)@Base" 0replaceme |
433 | + (c++)"core::posix::this_process::env::for_each(std::function<void (std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)> const&)@Base" 0replaceme |
434 | + (c++)"core::posix::this_process::cerr()@Base" 0replaceme |
435 | + (c++)"core::posix::this_process::cout()@Base" 0replaceme |
436 | + (c++)"core::posix::this_process::parent()@Base" 0replaceme |
437 | + (c++)"core::posix::this_process::instance()@Base" 0replaceme |
438 | (c++)"typeinfo for boost::exception_detail::clone_base@Base" 0replaceme |
439 | (c++)"typeinfo for boost::exception_detail::error_info_injector<std::ios_base::failure>@Base" 0replaceme |
440 | (c++)"typeinfo for boost::exception@Base" 0replaceme |
441 | |
442 | === modified file 'include/CMakeLists.txt' |
443 | --- include/CMakeLists.txt 2013-10-21 10:15:06 +0000 |
444 | +++ include/CMakeLists.txt 2013-12-02 14:48:12 +0000 |
445 | @@ -15,6 +15,6 @@ |
446 | # Authored by: Thomas Voss <thomas.voss@canonical.com> |
447 | |
448 | install( |
449 | - DIRECTORY posix |
450 | - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${CMAKE_PROJECT_NAME} |
451 | + DIRECTORY core |
452 | + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ |
453 | ) |
454 | |
455 | === added directory 'include/core' |
456 | === renamed directory 'include/posix' => 'include/core/posix' |
457 | === modified file 'include/core/posix/child_process.h' |
458 | --- include/posix/child_process.h 2013-11-12 11:11:26 +0000 |
459 | +++ include/core/posix/child_process.h 2013-12-02 14:48:12 +0000 |
460 | @@ -16,16 +16,18 @@ |
461 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
462 | */ |
463 | |
464 | -#ifndef POSIX_CHILD_PROCESS_H_ |
465 | -#define POSIX_CHILD_PROCESS_H_ |
466 | +#ifndef CORE_POSIX_CHILD_PROCESS_H_ |
467 | +#define CORE_POSIX_CHILD_PROCESS_H_ |
468 | |
469 | -#include <posix/process.h> |
470 | -#include <posix/standard_stream.h> |
471 | -#include <posix/visibility.h> |
472 | +#include <core/posix/process.h> |
473 | +#include <core/posix/standard_stream.h> |
474 | +#include <core/posix/visibility.h> |
475 | |
476 | #include <iosfwd> |
477 | #include <functional> |
478 | |
479 | +namespace core |
480 | +{ |
481 | namespace posix |
482 | { |
483 | /** |
484 | @@ -36,7 +38,7 @@ |
485 | * process and to access the child process's standard streams if they have been |
486 | * redirected when forking or exec'ing. |
487 | */ |
488 | -class POSIX_DLL_PUBLIC ChildProcess : public Process |
489 | +class CORE_POSIX_DLL_PUBLIC ChildProcess : public Process |
490 | { |
491 | public: |
492 | /** |
493 | @@ -74,7 +76,7 @@ |
494 | friend ChildProcess fork(const std::function<posix::exit::Status()>&, const StandardStream&); |
495 | friend ChildProcess vfork(const std::function<posix::exit::Status()>&, const StandardStream&); |
496 | |
497 | - class POSIX_DLL_LOCAL Pipe |
498 | + class CORE_POSIX_DLL_LOCAL Pipe |
499 | { |
500 | public: |
501 | static Pipe invalid(); |
502 | @@ -96,14 +98,15 @@ |
503 | int fds[2]; |
504 | }; |
505 | |
506 | - POSIX_DLL_LOCAL ChildProcess(pid_t pid, |
507 | + CORE_POSIX_DLL_LOCAL ChildProcess(pid_t pid, |
508 | const Pipe& stdin, |
509 | const Pipe& stdout, |
510 | const Pipe& stderr); |
511 | |
512 | - struct POSIX_DLL_LOCAL Private; |
513 | + struct CORE_POSIX_DLL_LOCAL Private; |
514 | std::shared_ptr<Private> d; |
515 | }; |
516 | } |
517 | +} |
518 | |
519 | -#endif // POSIX_CHILD_PROCESS_H_ |
520 | +#endif // CORE_POSIX_CHILD_PROCESS_H_ |
521 | |
522 | === modified file 'include/core/posix/exec.h' |
523 | --- include/posix/exec.h 2013-11-04 11:53:19 +0000 |
524 | +++ include/core/posix/exec.h 2013-12-02 14:48:12 +0000 |
525 | @@ -16,17 +16,19 @@ |
526 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
527 | */ |
528 | |
529 | -#ifndef POSIX_EXEC_H_ |
530 | -#define POSIX_EXEC_H_ |
531 | +#ifndef CORE_POSIX_EXEC_H_ |
532 | +#define CORE_POSIX_EXEC_H_ |
533 | |
534 | -#include <posix/child_process.h> |
535 | -#include <posix/visibility.h> |
536 | +#include <core/posix/child_process.h> |
537 | +#include <core/posix/visibility.h> |
538 | |
539 | #include <functional> |
540 | #include <map> |
541 | #include <string> |
542 | #include <vector> |
543 | |
544 | +namespace core |
545 | +{ |
546 | namespace posix |
547 | { |
548 | enum class RedirectFlags; |
549 | @@ -40,10 +42,11 @@ |
550 | * @param flags Specifies which standard streams should be redirected. |
551 | * @return An instance of ChildProcess corresponding to the newly exec'd process. |
552 | */ |
553 | -POSIX_DLL_PUBLIC ChildProcess exec(const std::string& fn, |
554 | +CORE_POSIX_DLL_PUBLIC ChildProcess exec(const std::string& fn, |
555 | const std::vector<std::string>& argv, |
556 | const std::map<std::string, std::string>& env, |
557 | const StandardStream& flags); |
558 | } |
559 | +} |
560 | |
561 | -#endif // POSIX_EXEC_H_ |
562 | +#endif // CORE_POSIX_EXEC_H_ |
563 | |
564 | === modified file 'include/core/posix/exit.h' |
565 | --- include/posix/exit.h 2013-10-21 14:18:58 +0000 |
566 | +++ include/core/posix/exit.h 2013-12-02 14:48:12 +0000 |
567 | @@ -16,11 +16,13 @@ |
568 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
569 | */ |
570 | |
571 | -#ifndef POSIX_EXIT_H_ |
572 | -#define POSIX_EXIT_H_ |
573 | +#ifndef CORE_POSIX_EXIT_H_ |
574 | +#define CORE_POSIX_EXIT_H_ |
575 | |
576 | #include <cstdlib> |
577 | |
578 | +namespace core |
579 | +{ |
580 | namespace posix |
581 | { |
582 | namespace exit |
583 | @@ -35,5 +37,6 @@ |
584 | }; |
585 | } |
586 | } |
587 | +} |
588 | |
589 | -#endif // POSIX_EXIT_H_ |
590 | +#endif // CORE_POSIX_EXIT_H_ |
591 | |
592 | === modified file 'include/core/posix/fork.h' |
593 | --- include/posix/fork.h 2013-11-12 11:11:26 +0000 |
594 | +++ include/core/posix/fork.h 2013-12-02 14:48:12 +0000 |
595 | @@ -16,15 +16,17 @@ |
596 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
597 | */ |
598 | |
599 | -#ifndef POSIX_FORK_H_ |
600 | -#define POSIX_FORK_H_ |
601 | +#ifndef CORE_POSIX_FORK_H_ |
602 | +#define CORE_POSIX_FORK_H_ |
603 | |
604 | -#include <posix/child_process.h> |
605 | -#include <posix/standard_stream.h> |
606 | -#include <posix/visibility.h> |
607 | +#include <core/posix/child_process.h> |
608 | +#include <core/posix/standard_stream.h> |
609 | +#include <core/posix/visibility.h> |
610 | |
611 | #include <functional> |
612 | |
613 | +namespace core |
614 | +{ |
615 | namespace posix |
616 | { |
617 | /** |
618 | @@ -34,7 +36,7 @@ |
619 | * @param [in] flags Specify which standard streams should be redirected to the parent process. |
620 | * @return An instance of ChildProcess in case of success. |
621 | */ |
622 | -POSIX_DLL_PUBLIC ChildProcess fork(const std::function<posix::exit::Status()>& main, |
623 | +CORE_POSIX_DLL_PUBLIC ChildProcess fork(const std::function<posix::exit::Status()>& main, |
624 | const StandardStream& flags); |
625 | |
626 | /** |
627 | @@ -44,8 +46,9 @@ |
628 | * @param [in] flags Specify which standard streams should be redirected to the parent process. |
629 | * @return An instance of ChildProcess in case of success. |
630 | */ |
631 | -POSIX_DLL_PUBLIC ChildProcess vfork(const std::function<posix::exit::Status()>& main, |
632 | +CORE_POSIX_DLL_PUBLIC ChildProcess vfork(const std::function<posix::exit::Status()>& main, |
633 | const StandardStream& flags); |
634 | } |
635 | +} |
636 | |
637 | -#endif // POSIX_FORK_H_ |
638 | +#endif // CORE_POSIX_FORK_H_ |
639 | |
640 | === modified file 'include/core/posix/linux/proc/process/oom_adj.h' |
641 | --- include/posix/linux/proc/process/oom_adj.h 2013-11-12 10:01:42 +0000 |
642 | +++ include/core/posix/linux/proc/process/oom_adj.h 2013-12-02 14:48:12 +0000 |
643 | @@ -15,11 +15,13 @@ |
644 | * |
645 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
646 | */ |
647 | -#ifndef POSIX_LINUX_PROC_PROCESS_OOM_ADJ_H_ |
648 | -#define POSIX_LINUX_PROC_PROCESS_OOM_ADJ_H_ |
649 | - |
650 | -#include <posix/visibility.h> |
651 | - |
652 | +#ifndef CORE_POSIX_LINUX_PROC_PROCESS_OOM_ADJ_H_ |
653 | +#define CORE_POSIX_LINUX_PROC_PROCESS_OOM_ADJ_H_ |
654 | + |
655 | +#include <core/posix/visibility.h> |
656 | + |
657 | +namespace core |
658 | +{ |
659 | namespace posix |
660 | { |
661 | class Process; |
662 | @@ -45,7 +47,7 @@ |
663 | * Since Linux 2.6.36, use of this file is deprecated in favor of |
664 | * /proc/[pid]/oom_score_adj. |
665 | */ |
666 | -struct POSIX_DLL_PUBLIC OomAdj |
667 | +struct CORE_POSIX_DLL_PUBLIC OomAdj |
668 | { |
669 | /** |
670 | * @brief Returns the value that makes a process "invisible" to the oom killer. |
671 | @@ -86,7 +88,7 @@ |
672 | * \param [in] process The process to read the score for. |
673 | * \param [out] adj The destination to store the value in. |
674 | */ |
675 | -POSIX_DLL_PUBLIC const posix::Process& operator>>(const posix::Process& process, OomAdj& adj); |
676 | +CORE_POSIX_DLL_PUBLIC const posix::Process& operator>>(const posix::Process& process, OomAdj& adj); |
677 | |
678 | /** |
679 | * \brief Write the OomAdj value for a process instance. |
680 | @@ -94,10 +96,11 @@ |
681 | * \param [in] process The process to write the score for. |
682 | * \param [in] adj The new value to store. |
683 | */ |
684 | -POSIX_DLL_PUBLIC const posix::Process& operator<<(const posix::Process& process, |
685 | +CORE_POSIX_DLL_PUBLIC const posix::Process& operator<<(const posix::Process& process, |
686 | const OomAdj& adj); |
687 | } |
688 | } |
689 | } |
690 | } |
691 | -#endif // POSIX_LINUX_PROC_PROCESS_OOM_ADJ_H_ |
692 | +} |
693 | +#endif // CORE_POSIX_LINUX_PROC_PROCESS_OOM_ADJ_H_ |
694 | |
695 | === modified file 'include/core/posix/linux/proc/process/oom_score.h' |
696 | --- include/posix/linux/proc/process/oom_score.h 2013-11-04 06:41:59 +0000 |
697 | +++ include/core/posix/linux/proc/process/oom_score.h 2013-12-02 14:48:12 +0000 |
698 | @@ -15,11 +15,13 @@ |
699 | * |
700 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
701 | */ |
702 | -#ifndef POSIX_LINUX_PROC_PROCESS_OOM_SCORE_H_ |
703 | -#define POSIX_LINUX_PROC_PROCESS_OOM_SCORE_H_ |
704 | - |
705 | -#include <posix/visibility.h> |
706 | - |
707 | +#ifndef CORE_POSIX_LINUX_PROC_PROCESS_OOM_SCORE_H_ |
708 | +#define CORE_POSIX_LINUX_PROC_PROCESS_OOM_SCORE_H_ |
709 | + |
710 | +#include <core/posix/visibility.h> |
711 | + |
712 | +namespace core |
713 | +{ |
714 | namespace posix |
715 | { |
716 | class Process; |
717 | @@ -45,7 +47,7 @@ |
718 | * The oom_score also reflects the adjustment specified by the oom_score_adj or |
719 | * oom_adj setting for the process. |
720 | */ |
721 | -struct POSIX_DLL_PUBLIC OomScore |
722 | +struct CORE_POSIX_DLL_PUBLIC OomScore |
723 | { |
724 | int value = 0; ///< Current OomScore as calculated by the kernel. |
725 | }; |
726 | @@ -56,9 +58,10 @@ |
727 | * \param [in] process The process to read the score for. |
728 | * \param [out] score The destination to store the value in. |
729 | */ |
730 | -POSIX_DLL_PUBLIC const posix::Process& operator>>(const posix::Process& process, OomScore& score); |
731 | -} |
732 | -} |
733 | -} |
734 | -} |
735 | -#endif // POSIX_LINUX_PROC_PROCESS_OOM_SCORE_H_ |
736 | +CORE_POSIX_DLL_PUBLIC const posix::Process& operator>>(const posix::Process& process, OomScore& score); |
737 | +} |
738 | +} |
739 | +} |
740 | +} |
741 | +} |
742 | +#endif // CORE_POSIX_LINUX_PROC_PROCESS_OOM_SCORE_H_ |
743 | |
744 | === modified file 'include/core/posix/linux/proc/process/oom_score_adj.h' |
745 | --- include/posix/linux/proc/process/oom_score_adj.h 2013-11-12 10:01:42 +0000 |
746 | +++ include/core/posix/linux/proc/process/oom_score_adj.h 2013-12-02 14:48:12 +0000 |
747 | @@ -15,11 +15,13 @@ |
748 | * |
749 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
750 | */ |
751 | -#ifndef POSIX_LINUX_PROC_PROCESS_OOM_SCORE_ADJ_H_ |
752 | -#define POSIX_LINUX_PROC_PROCESS_OOM_SCORE_ADJ_H_ |
753 | - |
754 | -#include <posix/visibility.h> |
755 | - |
756 | +#ifndef CORE_POSIX_LINUX_PROC_PROCESS_OOM_SCORE_ADJ_H_ |
757 | +#define CORE_POSIX_LINUX_PROC_PROCESS_OOM_SCORE_ADJ_H_ |
758 | + |
759 | +#include <core/posix/visibility.h> |
760 | + |
761 | +namespace core |
762 | +{ |
763 | namespace posix |
764 | { |
765 | class Process; |
766 | @@ -76,7 +78,7 @@ |
767 | * Writing to /proc/[pid]/oom_score_adj or /proc/[pid]/oom_adj will change the |
768 | * other with its scaled value. |
769 | */ |
770 | -struct POSIX_DLL_PUBLIC OomScoreAdj |
771 | +struct CORE_POSIX_DLL_PUBLIC OomScoreAdj |
772 | { |
773 | /** |
774 | * @brief Returns the minimum valid value. |
775 | @@ -111,7 +113,7 @@ |
776 | * @param [in] process The process to read the score for. |
777 | * @param [out] score_adj The destination to store the value in. |
778 | */ |
779 | -POSIX_DLL_PUBLIC const posix::Process& operator>>(const posix::Process& process, OomScoreAdj& score_adj); |
780 | +CORE_POSIX_DLL_PUBLIC const posix::Process& operator>>(const posix::Process& process, OomScoreAdj& score_adj); |
781 | |
782 | /** |
783 | * @brief Write the OomScoreAdj value for a process instance. |
784 | @@ -119,10 +121,11 @@ |
785 | * @param [in] process The process to write the score for. |
786 | * @param [in] score_adj The new value to store. |
787 | */ |
788 | -POSIX_DLL_PUBLIC const posix::Process& operator<<(const posix::Process& process, |
789 | +CORE_POSIX_DLL_PUBLIC const posix::Process& operator<<(const posix::Process& process, |
790 | const OomScoreAdj& score_adj); |
791 | } |
792 | } |
793 | } |
794 | } |
795 | -#endif // POSIX_LINUX_PROC_PROCESS_OOM_SCORE_ADJ_H_ |
796 | +} |
797 | +#endif // CORE_POSIX_LINUX_PROC_PROCESS_OOM_SCORE_ADJ_H_ |
798 | |
799 | === modified file 'include/core/posix/linux/proc/process/stat.h' |
800 | --- include/posix/linux/proc/process/stat.h 2013-11-12 10:01:42 +0000 |
801 | +++ include/core/posix/linux/proc/process/stat.h 2013-12-02 14:48:12 +0000 |
802 | @@ -15,15 +15,17 @@ |
803 | * |
804 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
805 | */ |
806 | -#ifndef POSIX_LINUX_PROC_PROCESS_STAT_H_ |
807 | -#define POSIX_LINUX_PROC_PROCESS_STAT_H_ |
808 | - |
809 | -#include <posix/linux/proc/process/state.h> |
810 | - |
811 | -#include <posix/visibility.h> |
812 | +#ifndef CORE_POSIX_LINUX_PROC_PROCESS_STAT_H_ |
813 | +#define CORE_POSIX_LINUX_PROC_PROCESS_STAT_H_ |
814 | + |
815 | +#include <core/posix/linux/proc/process/state.h> |
816 | + |
817 | +#include <core/posix/visibility.h> |
818 | |
819 | #include <string> |
820 | |
821 | +namespace core |
822 | +{ |
823 | namespace posix |
824 | { |
825 | class Process; |
826 | @@ -36,7 +38,7 @@ |
827 | /** |
828 | * @brief The Stat struct encapsulates status information about a process. |
829 | */ |
830 | -struct POSIX_DLL_PUBLIC Stat |
831 | +struct CORE_POSIX_DLL_PUBLIC Stat |
832 | { |
833 | pid_t pid = 1; ///< The process ID |
834 | std::string executable; ///< The filename of the executable, in parentheses. |
835 | @@ -109,9 +111,10 @@ |
836 | long unsigned int guest_time_children = 0; ///< Guest time of the process's children, measured in clock ticks. |
837 | }; |
838 | |
839 | -POSIX_DLL_PUBLIC const posix::Process& operator>>(const posix::Process& process, Stat& stat); |
840 | -} |
841 | -} |
842 | -} |
843 | -} |
844 | -#endif // POSIX_LINUX_PROC_PROCESS_STAT_H_ |
845 | +CORE_POSIX_DLL_PUBLIC const posix::Process& operator>>(const posix::Process& process, Stat& stat); |
846 | +} |
847 | +} |
848 | +} |
849 | +} |
850 | +} |
851 | +#endif // CORE_POSIX_LINUX_PROC_PROCESS_STAT_H_ |
852 | |
853 | === modified file 'include/core/posix/linux/proc/process/state.h' |
854 | --- include/posix/linux/proc/process/state.h 2013-11-14 12:05:10 +0000 |
855 | +++ include/core/posix/linux/proc/process/state.h 2013-12-02 14:48:12 +0000 |
856 | @@ -15,13 +15,15 @@ |
857 | * |
858 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
859 | */ |
860 | -#ifndef POSIX_LINUX_PROC_PROCESS_STATE_H_ |
861 | -#define POSIX_LINUX_PROC_PROCESS_STATE_H_ |
862 | +#ifndef CORE_POSIX_LINUX_PROC_PROCESS_STATE_H_ |
863 | +#define CORE_POSIX_LINUX_PROC_PROCESS_STATE_H_ |
864 | |
865 | -#include <posix/visibility.h> |
866 | +#include <core/posix/visibility.h> |
867 | |
868 | #include <iosfwd> |
869 | |
870 | +namespace core |
871 | +{ |
872 | namespace posix |
873 | { |
874 | namespace linux |
875 | @@ -44,5 +46,6 @@ |
876 | } |
877 | } |
878 | } |
879 | +} |
880 | |
881 | -#endif // POSIX_LINUX_PROC_PROCESS_STATE_H_ |
882 | +#endif // CORE_POSIX_LINUX_PROC_PROCESS_STATE_H_ |
883 | |
884 | === modified file 'include/core/posix/process.h' |
885 | --- include/posix/process.h 2013-11-11 14:50:18 +0000 |
886 | +++ include/core/posix/process.h 2013-12-02 14:48:12 +0000 |
887 | @@ -16,18 +16,20 @@ |
888 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
889 | */ |
890 | |
891 | -#ifndef POSIX_PROCESS_H_ |
892 | -#define POSIX_PROCESS_H_ |
893 | +#ifndef CORE_POSIX_PROCESS_H_ |
894 | +#define CORE_POSIX_PROCESS_H_ |
895 | |
896 | -#include <posix/process_group.h> |
897 | -#include <posix/signalable.h> |
898 | -#include <posix/this_process.h> |
899 | -#include <posix/visibility.h> |
900 | -#include <posix/wait.h> |
901 | +#include <core/posix/process_group.h> |
902 | +#include <core/posix/signalable.h> |
903 | +#include <core/posix/this_process.h> |
904 | +#include <core/posix/visibility.h> |
905 | +#include <core/posix/wait.h> |
906 | |
907 | #include <memory> |
908 | #include <system_error> |
909 | |
910 | +namespace core |
911 | +{ |
912 | namespace posix |
913 | { |
914 | enum class Signal; |
915 | @@ -39,7 +41,7 @@ |
916 | * |
917 | * The process class is implicitly shared. |
918 | */ |
919 | -class POSIX_DLL_PUBLIC Process : public Signalable |
920 | +class CORE_POSIX_DLL_PUBLIC Process : public Signalable |
921 | { |
922 | public: |
923 | /** |
924 | @@ -83,8 +85,9 @@ |
925 | virtual ProcessGroup process_group(std::error_code& se) const noexcept(true); |
926 | |
927 | private: |
928 | - struct POSIX_DLL_LOCAL Private; |
929 | + struct CORE_POSIX_DLL_LOCAL Private; |
930 | std::shared_ptr<Private> d; |
931 | }; |
932 | } |
933 | -#endif // POSIX_PROCESS_H_ |
934 | +} |
935 | +#endif // CORE_POSIX_PROCESS_H_ |
936 | |
937 | === modified file 'include/core/posix/process_group.h' |
938 | --- include/posix/process_group.h 2013-11-04 11:53:19 +0000 |
939 | +++ include/core/posix/process_group.h 2013-12-02 14:48:12 +0000 |
940 | @@ -16,14 +16,16 @@ |
941 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
942 | */ |
943 | |
944 | -#ifndef POSIX_PROCESS_GROUP_H_ |
945 | -#define POSIX_PROCESS_GROUP_H_ |
946 | +#ifndef CORE_POSIX_PROCESS_GROUP_H_ |
947 | +#define CORE_POSIX_PROCESS_GROUP_H_ |
948 | |
949 | -#include <posix/signalable.h> |
950 | -#include <posix/visibility.h> |
951 | +#include <core/posix/signalable.h> |
952 | +#include <core/posix/visibility.h> |
953 | |
954 | #include <memory> |
955 | |
956 | +namespace core |
957 | +{ |
958 | namespace posix |
959 | { |
960 | class Process; |
961 | @@ -38,7 +40,7 @@ |
962 | * of signals. A signal directed to a process group is delivered individually to |
963 | * all of the processes that are members of the group. |
964 | */ |
965 | -class POSIX_DLL_PUBLIC ProcessGroup : public Signalable |
966 | +class CORE_POSIX_DLL_PUBLIC ProcessGroup : public Signalable |
967 | { |
968 | public: |
969 | /** |
970 | @@ -49,12 +51,13 @@ |
971 | |
972 | protected: |
973 | friend class Process; |
974 | - POSIX_DLL_LOCAL ProcessGroup(pid_t id); |
975 | + CORE_POSIX_DLL_LOCAL ProcessGroup(pid_t id); |
976 | |
977 | private: |
978 | - struct POSIX_DLL_LOCAL Private; |
979 | + struct CORE_POSIX_DLL_LOCAL Private; |
980 | std::shared_ptr<Private> d; |
981 | }; |
982 | } |
983 | +} |
984 | |
985 | -#endif // POSIX_PROCESS_GROUP_H_ |
986 | +#endif // CORE_POSIX_PROCESS_GROUP_H_ |
987 | |
988 | === modified file 'include/core/posix/signal.h' |
989 | --- include/posix/signal.h 2013-10-21 14:18:58 +0000 |
990 | +++ include/core/posix/signal.h 2013-12-02 14:48:12 +0000 |
991 | @@ -16,11 +16,13 @@ |
992 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
993 | */ |
994 | |
995 | -#ifndef POSIX_SIGNAL_H_ |
996 | -#define POSIX_SIGNAL_H_ |
997 | +#ifndef CORE_POSIX_SIGNAL_H_ |
998 | +#define CORE_POSIX_SIGNAL_H_ |
999 | |
1000 | #include <signal.h> |
1001 | |
1002 | +namespace core |
1003 | +{ |
1004 | namespace posix |
1005 | { |
1006 | /** |
1007 | @@ -49,5 +51,6 @@ |
1008 | sig_ttou = SIGTTOU |
1009 | }; |
1010 | } |
1011 | +} |
1012 | |
1013 | #endif |
1014 | |
1015 | === modified file 'include/core/posix/signalable.h' |
1016 | --- include/posix/signalable.h 2013-11-04 11:53:19 +0000 |
1017 | +++ include/core/posix/signalable.h 2013-12-02 14:48:12 +0000 |
1018 | @@ -16,21 +16,23 @@ |
1019 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
1020 | */ |
1021 | |
1022 | -#ifndef POSIX_SIGNALABLE_H_ |
1023 | -#define POSIX_SIGNALABLE_H_ |
1024 | +#ifndef CORE_POSIX_SIGNALABLE_H_ |
1025 | +#define CORE_POSIX_SIGNALABLE_H_ |
1026 | |
1027 | -#include <posix/signal.h> |
1028 | -#include <posix/visibility.h> |
1029 | +#include <core/posix/signal.h> |
1030 | +#include <core/posix/visibility.h> |
1031 | |
1032 | #include <memory> |
1033 | #include <system_error> |
1034 | |
1035 | +namespace core |
1036 | +{ |
1037 | namespace posix |
1038 | { |
1039 | /** |
1040 | * @brief The Signalable class abstracts the ability of an entity to be delivered a posix signal. |
1041 | */ |
1042 | -class POSIX_DLL_PUBLIC Signalable |
1043 | +class CORE_POSIX_DLL_PUBLIC Signalable |
1044 | { |
1045 | public: |
1046 | /** |
1047 | @@ -48,12 +50,13 @@ |
1048 | virtual void send_signal(Signal signal, std::error_code& e) noexcept(true); |
1049 | |
1050 | protected: |
1051 | - POSIX_DLL_LOCAL explicit Signalable(pid_t pid); |
1052 | + CORE_POSIX_DLL_LOCAL explicit Signalable(pid_t pid); |
1053 | |
1054 | private: |
1055 | - struct POSIX_DLL_LOCAL Private; |
1056 | + struct CORE_POSIX_DLL_LOCAL Private; |
1057 | std::shared_ptr<Private> d; |
1058 | }; |
1059 | } |
1060 | +} |
1061 | |
1062 | -#endif // POSIX_SIGNALABLE_H_ |
1063 | +#endif // CORE_POSIX_SIGNALABLE_H_ |
1064 | |
1065 | === modified file 'include/core/posix/standard_stream.h' |
1066 | --- include/posix/standard_stream.h 2013-11-04 11:53:19 +0000 |
1067 | +++ include/core/posix/standard_stream.h 2013-12-02 14:48:12 +0000 |
1068 | @@ -16,13 +16,15 @@ |
1069 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
1070 | */ |
1071 | |
1072 | -#ifndef POSIX_STANDARD_STREAM_H_ |
1073 | -#define POSIX_STANDARD_STREAM_H_ |
1074 | +#ifndef CORE_POSIX_STANDARD_STREAM_H_ |
1075 | +#define CORE_POSIX_STANDARD_STREAM_H_ |
1076 | |
1077 | -#include <posix/visibility.h> |
1078 | +#include <core/posix/visibility.h> |
1079 | |
1080 | #include <cstdint> |
1081 | |
1082 | +namespace core |
1083 | +{ |
1084 | namespace posix |
1085 | { |
1086 | /** |
1087 | @@ -36,8 +38,9 @@ |
1088 | stderr = 1 << 2 |
1089 | }; |
1090 | |
1091 | -POSIX_DLL_PUBLIC StandardStream operator|(StandardStream l, StandardStream r); |
1092 | -POSIX_DLL_PUBLIC StandardStream operator&(StandardStream l, StandardStream r); |
1093 | +CORE_POSIX_DLL_PUBLIC StandardStream operator|(StandardStream l, StandardStream r); |
1094 | +CORE_POSIX_DLL_PUBLIC StandardStream operator&(StandardStream l, StandardStream r); |
1095 | +} |
1096 | } |
1097 | |
1098 | -#endif // POSIX_STANDARD_STREAM_H_ |
1099 | +#endif // CORE_POSIX_STANDARD_STREAM_H_ |
1100 | |
1101 | === modified file 'include/core/posix/this_process.h' |
1102 | --- include/posix/this_process.h 2013-11-14 07:45:17 +0000 |
1103 | +++ include/core/posix/this_process.h 2013-12-02 14:48:12 +0000 |
1104 | @@ -16,16 +16,18 @@ |
1105 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
1106 | */ |
1107 | |
1108 | -#ifndef POSIX_THIS_PROCESS_H_ |
1109 | -#define POSIX_THIS_PROCESS_H_ |
1110 | +#ifndef CORE_POSIX_THIS_PROCESS_H_ |
1111 | +#define CORE_POSIX_THIS_PROCESS_H_ |
1112 | |
1113 | -#include <posix/visibility.h> |
1114 | +#include <core/posix/visibility.h> |
1115 | |
1116 | #include <functional> |
1117 | #include <iosfwd> |
1118 | #include <string> |
1119 | #include <system_error> |
1120 | |
1121 | +namespace core |
1122 | +{ |
1123 | namespace posix |
1124 | { |
1125 | class Process; |
1126 | @@ -37,7 +39,7 @@ |
1127 | * @brief for_each invokes a functor for every key-value pair in the environment. |
1128 | * @param [in] functor Invoked for every key-value pair. |
1129 | */ |
1130 | -POSIX_DLL_PUBLIC void for_each( |
1131 | +CORE_POSIX_DLL_PUBLIC void for_each( |
1132 | const std::function<void(const std::string&, const std::string&)>& functor) noexcept(true); |
1133 | |
1134 | /** |
1135 | @@ -46,7 +48,7 @@ |
1136 | * @param [in] key Name of the variable to query the value for. |
1137 | * @return Contents of the variable. |
1138 | */ |
1139 | -POSIX_DLL_PUBLIC std::string get_or_throw(const std::string& key); |
1140 | +CORE_POSIX_DLL_PUBLIC std::string get_or_throw(const std::string& key); |
1141 | |
1142 | /** |
1143 | * @brief get queries the value of an environment variable. |
1144 | @@ -54,7 +56,7 @@ |
1145 | * @param [in] default_value Default value to return when key is not present in the environment. |
1146 | * @return Contents of the variable or an empty string if the variable is not defined. |
1147 | */ |
1148 | -POSIX_DLL_PUBLIC std::string get( |
1149 | +CORE_POSIX_DLL_PUBLIC std::string get( |
1150 | const std::string& key, |
1151 | const std::string& default_value = std::string()) noexcept(true); |
1152 | |
1153 | @@ -63,7 +65,7 @@ |
1154 | * @throw std::system_error in case of errors. |
1155 | * @param [in] key Name of the variable to unset. |
1156 | */ |
1157 | -POSIX_DLL_PUBLIC void unset_or_throw(const std::string& key); |
1158 | +CORE_POSIX_DLL_PUBLIC void unset_or_throw(const std::string& key); |
1159 | |
1160 | /** |
1161 | * @brief unset removes the variable with name key from the environment. |
1162 | @@ -71,7 +73,7 @@ |
1163 | * @param [in] key Name of the variable to unset. |
1164 | * @param [out] se Receives error details if unset returns false. |
1165 | */ |
1166 | -POSIX_DLL_PUBLIC bool unset(const std::string& key, |
1167 | +CORE_POSIX_DLL_PUBLIC bool unset(const std::string& key, |
1168 | std::error_code& se) noexcept(true); |
1169 | |
1170 | /** |
1171 | @@ -80,7 +82,7 @@ |
1172 | * @param [in] key Name of the variable to set the value for. |
1173 | * @param [in] value New contents of the variable. |
1174 | */ |
1175 | -POSIX_DLL_PUBLIC void set_or_throw(const std::string& key, |
1176 | +CORE_POSIX_DLL_PUBLIC void set_or_throw(const std::string& key, |
1177 | const std::string& value); |
1178 | /** |
1179 | * @brief set will adjust the contents of the variable identified by key to the provided value. |
1180 | @@ -89,7 +91,7 @@ |
1181 | * @param [in] value New contents of the variable. |
1182 | * @param [out] se Receives the details in case of errors. |
1183 | */ |
1184 | -POSIX_DLL_PUBLIC bool set(const std::string &key, |
1185 | +CORE_POSIX_DLL_PUBLIC bool set(const std::string &key, |
1186 | const std::string &value, |
1187 | std::error_code& se) noexcept(true); |
1188 | } |
1189 | @@ -97,29 +99,30 @@ |
1190 | /** |
1191 | * @brief Returns a Process instance corresponding to this process. |
1192 | */ |
1193 | -POSIX_DLL_PUBLIC const Process& instance() noexcept(true); |
1194 | +CORE_POSIX_DLL_PUBLIC const Process& instance() noexcept(true); |
1195 | |
1196 | /** |
1197 | * @brief Query the parent of the process. |
1198 | * @return The parent of the process. |
1199 | */ |
1200 | -POSIX_DLL_PUBLIC Process parent() noexcept(true); |
1201 | +CORE_POSIX_DLL_PUBLIC Process parent() noexcept(true); |
1202 | |
1203 | /** |
1204 | * @brief Access this process's stdin. |
1205 | */ |
1206 | -POSIX_DLL_PUBLIC std::istream& cin() noexcept(true); |
1207 | +CORE_POSIX_DLL_PUBLIC std::istream& cin() noexcept(true); |
1208 | |
1209 | /** |
1210 | * @brief Access this process's stdout. |
1211 | */ |
1212 | -POSIX_DLL_PUBLIC std::ostream& cout() noexcept(true); |
1213 | +CORE_POSIX_DLL_PUBLIC std::ostream& cout() noexcept(true); |
1214 | |
1215 | /** |
1216 | * @brief Access this process's stderr. |
1217 | */ |
1218 | -POSIX_DLL_PUBLIC std::ostream& cerr() noexcept(true); |
1219 | +CORE_POSIX_DLL_PUBLIC std::ostream& cerr() noexcept(true); |
1220 | +} |
1221 | } |
1222 | } |
1223 | |
1224 | -#endif // POSIX_THIS_PROCESS_H_ |
1225 | +#endif // CORE_POSIX_THIS_PROCESS_H_ |
1226 | |
1227 | === modified file 'include/core/posix/visibility.h' |
1228 | --- include/posix/visibility.h 2013-11-04 06:41:59 +0000 |
1229 | +++ include/core/posix/visibility.h 2013-12-02 14:48:12 +0000 |
1230 | @@ -16,15 +16,15 @@ |
1231 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
1232 | */ |
1233 | |
1234 | -#ifndef POSIX_VISIBILITY_H_ |
1235 | -#define POSIX_VISIBILITY_H_ |
1236 | +#ifndef CORE_POSIX_VISIBILITY_H_ |
1237 | +#define CORE_POSIX_VISIBILITY_H_ |
1238 | |
1239 | #if __GNUC__ >= 4 |
1240 | -#define POSIX_DLL_PUBLIC __attribute__ ((visibility ("default"))) |
1241 | -#define POSIX_DLL_LOCAL __attribute__ ((visibility ("hidden"))) |
1242 | +#define CORE_POSIX_DLL_PUBLIC __attribute__ ((visibility ("default"))) |
1243 | +#define CORE_POSIX_DLL_LOCAL __attribute__ ((visibility ("hidden"))) |
1244 | #else |
1245 | -#define POSIX_DLL_PUBLIC |
1246 | -#define POSIX_DLL_LOCAL |
1247 | +#define CORE_POSIX_DLL_PUBLIC |
1248 | +#define CORE_POSIX_DLL_LOCAL |
1249 | #endif |
1250 | |
1251 | -#endif // POSIX_VISIBILITY_H_ |
1252 | +#endif // CORE_POSIX_VISIBILITY_H_ |
1253 | |
1254 | === modified file 'include/core/posix/wait.h' |
1255 | --- include/posix/wait.h 2013-11-04 11:53:19 +0000 |
1256 | +++ include/core/posix/wait.h 2013-12-02 14:48:12 +0000 |
1257 | @@ -16,12 +16,12 @@ |
1258 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
1259 | */ |
1260 | |
1261 | -#ifndef POSIX_WAIT_H_ |
1262 | -#define POSIX_WAIT_H_ |
1263 | +#ifndef CORE_POSIX_WAIT_H_ |
1264 | +#define CORE_POSIX_WAIT_H_ |
1265 | |
1266 | -#include <posix/exit.h> |
1267 | -#include <posix/signal.h> |
1268 | -#include <posix/visibility.h> |
1269 | +#include <core/posix/exit.h> |
1270 | +#include <core/posix/signal.h> |
1271 | +#include <core/posix/visibility.h> |
1272 | |
1273 | #include <bitset> |
1274 | |
1275 | @@ -29,6 +29,8 @@ |
1276 | |
1277 | #include <sys/wait.h> |
1278 | |
1279 | +namespace core |
1280 | +{ |
1281 | namespace posix |
1282 | { |
1283 | namespace wait |
1284 | @@ -44,12 +46,12 @@ |
1285 | no_hang = WNOHANG ///< Do not block if a child process hasn't changed state. |
1286 | }; |
1287 | |
1288 | -POSIX_DLL_PUBLIC Flags operator|(Flags l, Flags r); |
1289 | +CORE_POSIX_DLL_PUBLIC Flags operator|(Flags l, Flags r); |
1290 | |
1291 | /** |
1292 | * @brief The Result struct encapsulates the result of waiting for a process state change. |
1293 | */ |
1294 | -struct POSIX_DLL_PUBLIC Result |
1295 | +struct CORE_POSIX_DLL_PUBLIC Result |
1296 | { |
1297 | /** |
1298 | * @brief The status of the process/wait operation. |
1299 | @@ -97,5 +99,6 @@ |
1300 | }; |
1301 | } |
1302 | } |
1303 | +} |
1304 | |
1305 | -#endif // POSIX_WAIT_H_ |
1306 | +#endif // CORE_POSIX_WAIT_H_ |
1307 | |
1308 | === renamed directory 'include/testing' => 'include/core/testing' |
1309 | === modified file 'include/core/testing/fork_and_run.h' |
1310 | --- include/testing/fork_and_run.h 2013-11-12 11:11:26 +0000 |
1311 | +++ include/core/testing/fork_and_run.h 2013-12-02 14:48:12 +0000 |
1312 | @@ -15,14 +15,16 @@ |
1313 | * |
1314 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
1315 | */ |
1316 | -#ifndef TESTING_FORK_AND_RUN_H_ |
1317 | -#define TESTING_FORK_AND_RUN_H_ |
1318 | +#ifndef CORE_TESTING_FORK_AND_RUN_H_ |
1319 | +#define CORE_TESTING_FORK_AND_RUN_H_ |
1320 | |
1321 | -#include <posix/exit.h> |
1322 | -#include <posix/visibility.h> |
1323 | +#include <core/posix/exit.h> |
1324 | +#include <core/posix/visibility.h> |
1325 | |
1326 | #include <functional> |
1327 | |
1328 | +namespace core |
1329 | +{ |
1330 | namespace testing |
1331 | { |
1332 | /** |
1333 | @@ -35,8 +37,8 @@ |
1334 | service_failed = 1 << 1 ///< The service failed. |
1335 | }; |
1336 | |
1337 | -POSIX_DLL_PUBLIC ForkAndRunResult operator|(ForkAndRunResult lhs, ForkAndRunResult rhs); |
1338 | -POSIX_DLL_PUBLIC ForkAndRunResult operator&(ForkAndRunResult lhs, ForkAndRunResult rhs); |
1339 | +CORE_POSIX_DLL_PUBLIC ForkAndRunResult operator|(ForkAndRunResult lhs, ForkAndRunResult rhs); |
1340 | +CORE_POSIX_DLL_PUBLIC ForkAndRunResult operator&(ForkAndRunResult lhs, ForkAndRunResult rhs); |
1341 | |
1342 | /** |
1343 | * @brief Forks two processes for both the service and the client. |
1344 | @@ -46,9 +48,9 @@ |
1345 | * @param [in] client The client to be executed in a child process. |
1346 | * @return ForkAndRunResult indicating if either of service or client failed. |
1347 | */ |
1348 | -POSIX_DLL_PUBLIC ForkAndRunResult fork_and_run( |
1349 | - const std::function<posix::exit::Status()>& service, |
1350 | - const std::function<posix::exit::Status()>& client); |
1351 | -} |
1352 | - |
1353 | -#endif // TESTING_FORK_AND_RUN_H_ |
1354 | +CORE_POSIX_DLL_PUBLIC ForkAndRunResult fork_and_run( |
1355 | + const std::function<core::posix::exit::Status()>& service, |
1356 | + const std::function<core::posix::exit::Status()>& client); |
1357 | +} |
1358 | +} |
1359 | +#endif // CORE_TESTING_FORK_AND_RUN_H_ |
1360 | |
1361 | === modified file 'src/CMakeLists.txt' |
1362 | --- src/CMakeLists.txt 2013-11-12 11:11:26 +0000 |
1363 | +++ src/CMakeLists.txt 2013-12-02 14:48:12 +0000 |
1364 | @@ -17,22 +17,22 @@ |
1365 | add_library( |
1366 | process-cpp SHARED |
1367 | |
1368 | - posix/child_process.cpp |
1369 | - posix/exec.cpp |
1370 | - posix/fork.cpp |
1371 | - posix/process.cpp |
1372 | - posix/process_group.cpp |
1373 | - posix/signalable.cpp |
1374 | - posix/standard_stream.cpp |
1375 | - posix/wait.cpp |
1376 | - posix/this_process.cpp |
1377 | - |
1378 | - posix/linux/proc/process/oom_adj.cpp |
1379 | - posix/linux/proc/process/oom_score.cpp |
1380 | - posix/linux/proc/process/oom_score_adj.cpp |
1381 | - posix/linux/proc/process/stat.cpp |
1382 | - |
1383 | - testing/fork_and_run.cpp |
1384 | + core/posix/child_process.cpp |
1385 | + core/posix/exec.cpp |
1386 | + core/posix/fork.cpp |
1387 | + core/posix/process.cpp |
1388 | + core/posix/process_group.cpp |
1389 | + core/posix/signalable.cpp |
1390 | + core/posix/standard_stream.cpp |
1391 | + core/posix/wait.cpp |
1392 | + core/posix/this_process.cpp |
1393 | + |
1394 | + core/posix/linux/proc/process/oom_adj.cpp |
1395 | + core/posix/linux/proc/process/oom_score.cpp |
1396 | + core/posix/linux/proc/process/oom_score_adj.cpp |
1397 | + core/posix/linux/proc/process/stat.cpp |
1398 | + |
1399 | + core/testing/fork_and_run.cpp |
1400 | ) |
1401 | |
1402 | target_link_libraries( |
1403 | |
1404 | === added directory 'src/core' |
1405 | === renamed directory 'src/posix' => 'src/core/posix' |
1406 | === modified file 'src/core/posix/child_process.cpp' |
1407 | --- src/posix/child_process.cpp 2013-11-11 14:50:18 +0000 |
1408 | +++ src/core/posix/child_process.cpp 2013-12-02 14:48:12 +0000 |
1409 | @@ -16,7 +16,7 @@ |
1410 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
1411 | */ |
1412 | |
1413 | -#include <posix/child_process.h> |
1414 | +#include <core/posix/child_process.h> |
1415 | |
1416 | #include <boost/iostreams/device/file_descriptor.hpp> |
1417 | #include <boost/iostreams/stream.hpp> |
1418 | @@ -29,6 +29,8 @@ |
1419 | |
1420 | namespace io = boost::iostreams; |
1421 | |
1422 | +namespace core |
1423 | +{ |
1424 | namespace posix |
1425 | { |
1426 | ChildProcess::Pipe ChildProcess::Pipe::invalid() |
1427 | @@ -237,3 +239,4 @@ |
1428 | return d->cout; |
1429 | } |
1430 | } |
1431 | +} |
1432 | |
1433 | === modified file 'src/core/posix/exec.cpp' |
1434 | --- src/posix/exec.cpp 2013-11-12 11:11:26 +0000 |
1435 | +++ src/core/posix/exec.cpp 2013-12-02 14:48:12 +0000 |
1436 | @@ -16,9 +16,9 @@ |
1437 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
1438 | */ |
1439 | |
1440 | -#include <posix/exec.h> |
1441 | -#include <posix/fork.h> |
1442 | -#include <posix/standard_stream.h> |
1443 | +#include <core/posix/exec.h> |
1444 | +#include <core/posix/fork.h> |
1445 | +#include <core/posix/standard_stream.h> |
1446 | |
1447 | #include <iostream> |
1448 | |
1449 | @@ -26,6 +26,8 @@ |
1450 | |
1451 | #include <unistd.h> |
1452 | |
1453 | +namespace core |
1454 | +{ |
1455 | namespace posix |
1456 | { |
1457 | ChildProcess exec(const std::string& fn, |
1458 | @@ -60,3 +62,4 @@ |
1459 | }, flags); |
1460 | } |
1461 | } |
1462 | +} |
1463 | |
1464 | === modified file 'src/core/posix/fork.cpp' |
1465 | --- src/posix/fork.cpp 2013-11-12 11:11:26 +0000 |
1466 | +++ src/core/posix/fork.cpp 2013-12-02 14:48:12 +0000 |
1467 | @@ -16,8 +16,8 @@ |
1468 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
1469 | */ |
1470 | |
1471 | -#include <posix/exit.h> |
1472 | -#include <posix/fork.h> |
1473 | +#include <core/posix/exit.h> |
1474 | +#include <core/posix/fork.h> |
1475 | |
1476 | #include <iostream> |
1477 | #include <system_error> |
1478 | @@ -34,6 +34,8 @@ |
1479 | } |
1480 | } |
1481 | |
1482 | +namespace core |
1483 | +{ |
1484 | namespace posix |
1485 | { |
1486 | |
1487 | @@ -148,3 +150,4 @@ |
1488 | stderr_pipe); |
1489 | } |
1490 | } |
1491 | +} |
1492 | |
1493 | === modified file 'src/core/posix/linux/proc/process/oom_adj.cpp' |
1494 | --- src/posix/linux/proc/process/oom_adj.cpp 2013-10-21 10:15:06 +0000 |
1495 | +++ src/core/posix/linux/proc/process/oom_adj.cpp 2013-12-02 14:48:12 +0000 |
1496 | @@ -16,9 +16,9 @@ |
1497 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
1498 | */ |
1499 | |
1500 | -#include <posix/linux/proc/process/oom_adj.h> |
1501 | +#include <core/posix/linux/proc/process/oom_adj.h> |
1502 | |
1503 | -#include <posix/process.h> |
1504 | +#include <core/posix/process.h> |
1505 | |
1506 | #include <fstream> |
1507 | #include <sstream> |
1508 | @@ -26,6 +26,8 @@ |
1509 | |
1510 | #include <linux/oom.h> |
1511 | |
1512 | +namespace core |
1513 | +{ |
1514 | namespace posix |
1515 | { |
1516 | namespace linux |
1517 | @@ -76,3 +78,4 @@ |
1518 | } |
1519 | } |
1520 | } |
1521 | +} |
1522 | |
1523 | === modified file 'src/core/posix/linux/proc/process/oom_score.cpp' |
1524 | --- src/posix/linux/proc/process/oom_score.cpp 2013-10-21 10:15:06 +0000 |
1525 | +++ src/core/posix/linux/proc/process/oom_score.cpp 2013-12-02 14:48:12 +0000 |
1526 | @@ -16,13 +16,15 @@ |
1527 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
1528 | */ |
1529 | |
1530 | -#include <posix/linux/proc/process/oom_score.h> |
1531 | +#include <core/posix/linux/proc/process/oom_score.h> |
1532 | |
1533 | -#include <posix/process.h> |
1534 | +#include <core/posix/process.h> |
1535 | |
1536 | #include <fstream> |
1537 | #include <sstream> |
1538 | |
1539 | +namespace core |
1540 | +{ |
1541 | namespace posix |
1542 | { |
1543 | namespace linux |
1544 | @@ -44,3 +46,4 @@ |
1545 | } |
1546 | } |
1547 | } |
1548 | +} |
1549 | |
1550 | === modified file 'src/core/posix/linux/proc/process/oom_score_adj.cpp' |
1551 | --- src/posix/linux/proc/process/oom_score_adj.cpp 2013-10-21 10:15:06 +0000 |
1552 | +++ src/core/posix/linux/proc/process/oom_score_adj.cpp 2013-12-02 14:48:12 +0000 |
1553 | @@ -16,9 +16,9 @@ |
1554 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
1555 | */ |
1556 | |
1557 | -#include <posix/linux/proc/process/oom_score_adj.h> |
1558 | +#include <core/posix/linux/proc/process/oom_score_adj.h> |
1559 | |
1560 | -#include <posix/process.h> |
1561 | +#include <core/posix/process.h> |
1562 | |
1563 | #include <fstream> |
1564 | #include <sstream> |
1565 | @@ -26,6 +26,8 @@ |
1566 | |
1567 | #include <linux/oom.h> |
1568 | |
1569 | +namespace core |
1570 | +{ |
1571 | namespace posix |
1572 | { |
1573 | namespace linux |
1574 | @@ -71,3 +73,4 @@ |
1575 | } |
1576 | } |
1577 | } |
1578 | +} |
1579 | |
1580 | === modified file 'src/core/posix/linux/proc/process/stat.cpp' |
1581 | --- src/posix/linux/proc/process/stat.cpp 2013-10-21 10:15:06 +0000 |
1582 | +++ src/core/posix/linux/proc/process/stat.cpp 2013-12-02 14:48:12 +0000 |
1583 | @@ -16,14 +16,16 @@ |
1584 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
1585 | */ |
1586 | |
1587 | -#include <posix/linux/proc/process/stat.h> |
1588 | +#include <core/posix/linux/proc/process/stat.h> |
1589 | |
1590 | -#include <posix/process.h> |
1591 | +#include <core/posix/process.h> |
1592 | |
1593 | #include <fstream> |
1594 | #include <istream> |
1595 | #include <sstream> |
1596 | |
1597 | +namespace core |
1598 | +{ |
1599 | namespace posix |
1600 | { |
1601 | namespace linux |
1602 | @@ -101,3 +103,4 @@ |
1603 | } |
1604 | } |
1605 | } |
1606 | +} |
1607 | |
1608 | === modified file 'src/core/posix/linux/proc/process/state.cpp' |
1609 | --- src/posix/linux/proc/process/state.cpp 2013-10-21 10:15:06 +0000 |
1610 | +++ src/core/posix/linux/proc/process/state.cpp 2013-12-02 14:48:12 +0000 |
1611 | @@ -16,12 +16,14 @@ |
1612 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
1613 | */ |
1614 | |
1615 | -#include <posix/linux/proc/process/state.h> |
1616 | +#include <core/posix/linux/proc/process/state.h> |
1617 | |
1618 | -#include <posix/process.h> |
1619 | +#include <core/posix/process.h> |
1620 | |
1621 | #include <istream> |
1622 | |
1623 | +namespace core |
1624 | +{ |
1625 | namespace posix |
1626 | { |
1627 | namespace linux |
1628 | @@ -35,3 +37,4 @@ |
1629 | } |
1630 | } |
1631 | } |
1632 | +} |
1633 | |
1634 | === modified file 'src/core/posix/process.cpp' |
1635 | --- src/posix/process.cpp 2013-11-11 14:50:18 +0000 |
1636 | +++ src/core/posix/process.cpp 2013-12-02 14:48:12 +0000 |
1637 | @@ -16,15 +16,17 @@ |
1638 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
1639 | */ |
1640 | |
1641 | -#include <posix/process.h> |
1642 | +#include <core/posix/process.h> |
1643 | |
1644 | -#include <posix/signal.h> |
1645 | +#include <core/posix/signal.h> |
1646 | |
1647 | #include <sys/types.h> |
1648 | #include <unistd.h> |
1649 | |
1650 | #include <iostream> |
1651 | |
1652 | +namespace core |
1653 | +{ |
1654 | namespace posix |
1655 | { |
1656 | |
1657 | @@ -81,3 +83,4 @@ |
1658 | return ProcessGroup(pgid); |
1659 | } |
1660 | } |
1661 | +} |
1662 | |
1663 | === modified file 'src/core/posix/process_group.cpp' |
1664 | --- src/posix/process_group.cpp 2013-10-26 01:39:23 +0000 |
1665 | +++ src/core/posix/process_group.cpp 2013-12-02 14:48:12 +0000 |
1666 | @@ -16,8 +16,10 @@ |
1667 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
1668 | */ |
1669 | |
1670 | -#include <posix/process_group.h> |
1671 | +#include <core/posix/process_group.h> |
1672 | |
1673 | +namespace core |
1674 | +{ |
1675 | namespace posix |
1676 | { |
1677 | struct ProcessGroup::Private |
1678 | @@ -36,4 +38,4 @@ |
1679 | { |
1680 | } |
1681 | } |
1682 | - |
1683 | +} |
1684 | |
1685 | === modified file 'src/core/posix/signalable.cpp' |
1686 | --- src/posix/signalable.cpp 2013-10-26 19:26:30 +0000 |
1687 | +++ src/core/posix/signalable.cpp 2013-12-02 14:48:12 +0000 |
1688 | @@ -16,8 +16,10 @@ |
1689 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
1690 | */ |
1691 | |
1692 | -#include <posix/signalable.h> |
1693 | +#include <core/posix/signalable.h> |
1694 | |
1695 | +namespace core |
1696 | +{ |
1697 | namespace posix |
1698 | { |
1699 | struct Signalable::Private |
1700 | @@ -47,3 +49,4 @@ |
1701 | } |
1702 | } |
1703 | } |
1704 | +} |
1705 | |
1706 | === modified file 'src/core/posix/standard_stream.cpp' |
1707 | --- src/posix/standard_stream.cpp 2013-10-26 19:26:30 +0000 |
1708 | +++ src/core/posix/standard_stream.cpp 2013-12-02 14:48:12 +0000 |
1709 | @@ -16,8 +16,10 @@ |
1710 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
1711 | */ |
1712 | |
1713 | -#include <posix/standard_stream.h> |
1714 | +#include <core/posix/standard_stream.h> |
1715 | |
1716 | +namespace core |
1717 | +{ |
1718 | namespace posix |
1719 | { |
1720 | StandardStream operator|(StandardStream l, StandardStream r) |
1721 | @@ -30,3 +32,4 @@ |
1722 | return static_cast<StandardStream>(static_cast<std::uint8_t>(l) & static_cast<std::uint8_t>(r)); |
1723 | } |
1724 | } |
1725 | +} |
1726 | |
1727 | === modified file 'src/core/posix/this_process.cpp' |
1728 | --- src/posix/this_process.cpp 2013-11-14 07:45:17 +0000 |
1729 | +++ src/core/posix/this_process.cpp 2013-12-02 14:48:12 +0000 |
1730 | @@ -16,8 +16,8 @@ |
1731 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
1732 | */ |
1733 | |
1734 | -#include <posix/this_process.h> |
1735 | -#include <posix/process.h> |
1736 | +#include <core/posix/this_process.h> |
1737 | +#include <core/posix/process.h> |
1738 | |
1739 | #include <boost/algorithm/string.hpp> |
1740 | |
1741 | @@ -35,6 +35,8 @@ |
1742 | extern char** environ; |
1743 | #endif |
1744 | |
1745 | +namespace core |
1746 | +{ |
1747 | namespace posix |
1748 | { |
1749 | namespace this_process |
1750 | @@ -175,3 +177,4 @@ |
1751 | } |
1752 | } |
1753 | } |
1754 | +} |
1755 | |
1756 | === modified file 'src/core/posix/wait.cpp' |
1757 | --- src/posix/wait.cpp 2013-10-26 19:26:30 +0000 |
1758 | +++ src/core/posix/wait.cpp 2013-12-02 14:48:12 +0000 |
1759 | @@ -16,8 +16,10 @@ |
1760 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
1761 | */ |
1762 | |
1763 | -#include <posix/wait.h> |
1764 | +#include <core/posix/wait.h> |
1765 | |
1766 | +namespace core |
1767 | +{ |
1768 | namespace posix |
1769 | { |
1770 | namespace wait |
1771 | @@ -28,3 +30,4 @@ |
1772 | } |
1773 | } |
1774 | } |
1775 | +} |
1776 | |
1777 | === renamed directory 'src/testing' => 'src/core/testing' |
1778 | === modified file 'src/core/testing/fork_and_run.cpp' |
1779 | --- src/testing/fork_and_run.cpp 2013-11-14 07:45:17 +0000 |
1780 | +++ src/core/testing/fork_and_run.cpp 2013-12-02 14:48:12 +0000 |
1781 | @@ -16,61 +16,61 @@ |
1782 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
1783 | */ |
1784 | |
1785 | -#include <testing/fork_and_run.h> |
1786 | - |
1787 | -#include <posix/exit.h> |
1788 | -#include <posix/fork.h> |
1789 | -#include <posix/wait.h> |
1790 | - |
1791 | -testing::ForkAndRunResult testing::operator|( |
1792 | - testing::ForkAndRunResult lhs, |
1793 | - testing::ForkAndRunResult rhs) |
1794 | +#include <core/testing/fork_and_run.h> |
1795 | + |
1796 | +#include <core/posix/exit.h> |
1797 | +#include <core/posix/fork.h> |
1798 | +#include <core/posix/wait.h> |
1799 | + |
1800 | +core::testing::ForkAndRunResult core::testing::operator|( |
1801 | + core::testing::ForkAndRunResult lhs, |
1802 | + core::testing::ForkAndRunResult rhs) |
1803 | { |
1804 | - return static_cast<testing::ForkAndRunResult>( |
1805 | + return static_cast<core::testing::ForkAndRunResult>( |
1806 | static_cast<unsigned int> (lhs) | static_cast<unsigned int>(rhs)); |
1807 | } |
1808 | |
1809 | -testing::ForkAndRunResult testing::operator&( |
1810 | - testing::ForkAndRunResult lhs, |
1811 | - testing::ForkAndRunResult rhs) |
1812 | +core::testing::ForkAndRunResult core::testing::operator&( |
1813 | + core::testing::ForkAndRunResult lhs, |
1814 | + core::testing::ForkAndRunResult rhs) |
1815 | { |
1816 | - return static_cast<testing::ForkAndRunResult>( |
1817 | + return static_cast<core::testing::ForkAndRunResult>( |
1818 | static_cast<unsigned int> (lhs) & static_cast<unsigned int>(rhs)); |
1819 | } |
1820 | |
1821 | -testing::ForkAndRunResult testing::fork_and_run( |
1822 | - const std::function<posix::exit::Status()>& service, |
1823 | - const std::function<posix::exit::Status()>& client) |
1824 | +core::testing::ForkAndRunResult core::testing::fork_and_run( |
1825 | + const std::function<core::posix::exit::Status()>& service, |
1826 | + const std::function<core::posix::exit::Status()>& client) |
1827 | { |
1828 | - testing::ForkAndRunResult result = testing::ForkAndRunResult::empty; |
1829 | - |
1830 | - auto service_process = posix::fork(service, posix::StandardStream::empty); |
1831 | - auto client_process = posix::fork(client, posix::StandardStream::empty); |
1832 | - |
1833 | - auto client_result = client_process.wait_for(posix::wait::Flags::untraced); |
1834 | + core::testing::ForkAndRunResult result = core::testing::ForkAndRunResult::empty; |
1835 | + |
1836 | + auto service_process = core::posix::fork(service, core::posix::StandardStream::empty); |
1837 | + auto client_process = core::posix::fork(client, core::posix::StandardStream::empty); |
1838 | + |
1839 | + auto client_result = client_process.wait_for(core::posix::wait::Flags::untraced); |
1840 | |
1841 | switch (client_result.status) |
1842 | { |
1843 | - case posix::wait::Result::Status::exited: |
1844 | - if (client_result.detail.if_exited.status == posix::exit::Status::failure) |
1845 | - result = result | testing::ForkAndRunResult::client_failed; |
1846 | + case core::posix::wait::Result::Status::exited: |
1847 | + if (client_result.detail.if_exited.status == core::posix::exit::Status::failure) |
1848 | + result = result | core::testing::ForkAndRunResult::client_failed; |
1849 | break; |
1850 | default: |
1851 | - result = result | testing::ForkAndRunResult::client_failed; |
1852 | + result = result | core::testing::ForkAndRunResult::client_failed; |
1853 | break; |
1854 | } |
1855 | |
1856 | - service_process.send_signal_or_throw(posix::Signal::sig_term); |
1857 | - auto service_result = service_process.wait_for(posix::wait::Flags::untraced); |
1858 | + service_process.send_signal_or_throw(core::posix::Signal::sig_term); |
1859 | + auto service_result = service_process.wait_for(core::posix::wait::Flags::untraced); |
1860 | |
1861 | switch (service_result.status) |
1862 | { |
1863 | - case posix::wait::Result::Status::exited: |
1864 | - if (service_result.detail.if_exited.status == posix::exit::Status::failure) |
1865 | - result = result | testing::ForkAndRunResult::service_failed; |
1866 | + case core::posix::wait::Result::Status::exited: |
1867 | + if (service_result.detail.if_exited.status == core::posix::exit::Status::failure) |
1868 | + result = result | core::testing::ForkAndRunResult::service_failed; |
1869 | break; |
1870 | default: |
1871 | - result = result | testing::ForkAndRunResult::service_failed; |
1872 | + result = result | core::testing::ForkAndRunResult::service_failed; |
1873 | break; |
1874 | } |
1875 | |
1876 | |
1877 | === modified file 'tests/fork_and_run_test.cpp' |
1878 | --- tests/fork_and_run_test.cpp 2013-11-14 07:45:17 +0000 |
1879 | +++ tests/fork_and_run_test.cpp 2013-12-02 14:48:12 +0000 |
1880 | @@ -16,26 +16,26 @@ |
1881 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
1882 | */ |
1883 | |
1884 | -#include <testing/fork_and_run.h> |
1885 | +#include <core/testing/fork_and_run.h> |
1886 | |
1887 | -#include <posix/signal.h> |
1888 | +#include <core/posix/signal.h> |
1889 | |
1890 | #include <gtest/gtest.h> |
1891 | |
1892 | namespace |
1893 | { |
1894 | -::testing::AssertionResult ClientFailed(testing::ForkAndRunResult result) |
1895 | +::testing::AssertionResult ClientFailed(core::testing::ForkAndRunResult result) |
1896 | { |
1897 | return |
1898 | - (result & testing::ForkAndRunResult::client_failed) == testing::ForkAndRunResult::empty ? |
1899 | + (result & core::testing::ForkAndRunResult::client_failed) == core::testing::ForkAndRunResult::empty ? |
1900 | ::testing::AssertionFailure() : |
1901 | ::testing::AssertionSuccess(); |
1902 | } |
1903 | |
1904 | -::testing::AssertionResult ServiceFailed(testing::ForkAndRunResult result) |
1905 | +::testing::AssertionResult ServiceFailed(core::testing::ForkAndRunResult result) |
1906 | { |
1907 | return |
1908 | - (result & testing::ForkAndRunResult::service_failed) == testing::ForkAndRunResult::empty ? |
1909 | + (result & core::testing::ForkAndRunResult::service_failed) == core::testing::ForkAndRunResult::empty ? |
1910 | ::testing::AssertionFailure() : |
1911 | ::testing::AssertionSuccess(); |
1912 | } |
1913 | @@ -48,17 +48,17 @@ |
1914 | |
1915 | SigTermCatcher() |
1916 | { |
1917 | - signal(static_cast<int>(posix::Signal::sig_term), sig_term_handler); |
1918 | + signal(static_cast<int>(core::posix::Signal::sig_term), sig_term_handler); |
1919 | } |
1920 | } sig_term_catcher; |
1921 | } |
1922 | |
1923 | TEST(ForkAndRun, succeeding_client_and_service_result_in_correct_return_value) |
1924 | { |
1925 | - auto service = [](){ return posix::exit::Status::success; }; |
1926 | - auto client = [](){ return posix::exit::Status::success; }; |
1927 | + auto service = [](){ return core::posix::exit::Status::success; }; |
1928 | + auto client = [](){ return core::posix::exit::Status::success; }; |
1929 | |
1930 | - auto result = testing::fork_and_run(service, client); |
1931 | + auto result = core::testing::fork_and_run(service, client); |
1932 | |
1933 | ASSERT_FALSE(ClientFailed(result)); |
1934 | ASSERT_FALSE(ServiceFailed(result)); |
1935 | @@ -66,10 +66,10 @@ |
1936 | |
1937 | TEST(ForkAndRun, succeeding_client_and_failing_service_result_in_correct_return_value) |
1938 | { |
1939 | - auto service = [](){ return posix::exit::Status::failure; }; |
1940 | - auto client = [](){ return posix::exit::Status::success; }; |
1941 | + auto service = [](){ return core::posix::exit::Status::failure; }; |
1942 | + auto client = [](){ return core::posix::exit::Status::success; }; |
1943 | |
1944 | - auto result = testing::fork_and_run(service, client); |
1945 | + auto result = core::testing::fork_and_run(service, client); |
1946 | |
1947 | EXPECT_FALSE(ClientFailed(result)); |
1948 | EXPECT_TRUE(ServiceFailed(result)); |
1949 | @@ -77,10 +77,10 @@ |
1950 | |
1951 | TEST(ForkAndRun, failing_client_and_failing_service_result_in_correct_return_value) |
1952 | { |
1953 | - auto service = [](){ return posix::exit::Status::failure; }; |
1954 | - auto client = [](){ return posix::exit::Status::failure; }; |
1955 | + auto service = [](){ return core::posix::exit::Status::failure; }; |
1956 | + auto client = [](){ return core::posix::exit::Status::failure; }; |
1957 | |
1958 | - auto result = testing::fork_and_run(service, client); |
1959 | + auto result = core::testing::fork_and_run(service, client); |
1960 | |
1961 | EXPECT_TRUE(ClientFailed(result)); |
1962 | EXPECT_TRUE(ServiceFailed(result)); |
1963 | @@ -88,10 +88,10 @@ |
1964 | |
1965 | TEST(ForkAndRun, throwing_client_is_reported_as_failing) |
1966 | { |
1967 | - auto service = [](){ return posix::exit::Status::success; }; |
1968 | - auto client = [](){ throw std::runtime_error("failing client"); return posix::exit::Status::success; }; |
1969 | + auto service = [](){ return core::posix::exit::Status::success; }; |
1970 | + auto client = [](){ throw std::runtime_error("failing client"); return core::posix::exit::Status::success; }; |
1971 | |
1972 | - auto result = testing::fork_and_run(service, client); |
1973 | + auto result = core::testing::fork_and_run(service, client); |
1974 | |
1975 | EXPECT_TRUE(ClientFailed(result)); |
1976 | EXPECT_FALSE(ServiceFailed(result)); |
1977 | @@ -99,10 +99,10 @@ |
1978 | |
1979 | TEST(ForkAndRun, exiting_with_failure_client_is_reported_as_failing) |
1980 | { |
1981 | - auto service = [](){ return posix::exit::Status::success; }; |
1982 | - auto client = [](){ exit(EXIT_FAILURE); return posix::exit::Status::success; }; |
1983 | + auto service = [](){ return core::posix::exit::Status::success; }; |
1984 | + auto client = [](){ exit(EXIT_FAILURE); return core::posix::exit::Status::success; }; |
1985 | |
1986 | - auto result = testing::fork_and_run(service, client); |
1987 | + auto result = core::testing::fork_and_run(service, client); |
1988 | |
1989 | EXPECT_TRUE(ClientFailed(result)); |
1990 | EXPECT_FALSE(ServiceFailed(result)); |
1991 | @@ -110,10 +110,10 @@ |
1992 | |
1993 | TEST(ForkAndRun, aborting_client_is_reported_as_failing) |
1994 | { |
1995 | - auto service = [](){ return posix::exit::Status::success; }; |
1996 | - auto client = [](){ abort(); return posix::exit::Status::success; }; |
1997 | + auto service = [](){ return core::posix::exit::Status::success; }; |
1998 | + auto client = [](){ abort(); return core::posix::exit::Status::success; }; |
1999 | |
2000 | - auto result = testing::fork_and_run(service, client); |
2001 | + auto result = core::testing::fork_and_run(service, client); |
2002 | |
2003 | EXPECT_TRUE(ClientFailed(result)); |
2004 | EXPECT_FALSE(ServiceFailed(result)); |
2005 | |
2006 | === modified file 'tests/linux_process_test.cpp' |
2007 | --- tests/linux_process_test.cpp 2013-11-14 12:05:10 +0000 |
2008 | +++ tests/linux_process_test.cpp 2013-12-02 14:48:12 +0000 |
2009 | @@ -16,13 +16,13 @@ |
2010 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
2011 | */ |
2012 | |
2013 | -#include <posix/fork.h> |
2014 | -#include <posix/this_process.h> |
2015 | +#include <core/posix/fork.h> |
2016 | +#include <core/posix/this_process.h> |
2017 | |
2018 | -#include <posix/linux/proc/process/stat.h> |
2019 | -#include <posix/linux/proc/process/oom_adj.h> |
2020 | -#include <posix/linux/proc/process/oom_score.h> |
2021 | -#include <posix/linux/proc/process/oom_score_adj.h> |
2022 | +#include <core/posix/linux/proc/process/stat.h> |
2023 | +#include <core/posix/linux/proc/process/oom_adj.h> |
2024 | +#include <core/posix/linux/proc/process/oom_score.h> |
2025 | +#include <core/posix/linux/proc/process/oom_score_adj.h> |
2026 | |
2027 | #include <gtest/gtest.h> |
2028 | |
2029 | @@ -30,25 +30,25 @@ |
2030 | |
2031 | TEST(LinuxProcess, accessing_proc_stats_works) |
2032 | { |
2033 | - auto child = posix::fork( |
2034 | - [](){ while(true); return posix::exit::Status::success;}, |
2035 | - posix::StandardStream::empty); |
2036 | + auto child = core::posix::fork( |
2037 | + [](){ while(true); return core::posix::exit::Status::success;}, |
2038 | + core::posix::StandardStream::empty); |
2039 | |
2040 | - posix::linux::proc::process::Stat stat; |
2041 | + core::posix::linux::proc::process::Stat stat; |
2042 | EXPECT_NO_THROW(child >> stat); |
2043 | - ASSERT_EQ(posix::linux::proc::process::State::running, stat.state); |
2044 | + ASSERT_EQ(core::posix::linux::proc::process::State::running, stat.state); |
2045 | } |
2046 | |
2047 | TEST(LinuxProcess, accessing_proc_oom_score_works) |
2048 | { |
2049 | - posix::linux::proc::process::OomScore oom_score; |
2050 | - EXPECT_NO_THROW(posix::this_process::instance() >> oom_score); |
2051 | + core::posix::linux::proc::process::OomScore oom_score; |
2052 | + EXPECT_NO_THROW(core::posix::this_process::instance() >> oom_score); |
2053 | } |
2054 | |
2055 | TEST(LinuxProcess, accessing_proc_oom_score_adj_works) |
2056 | { |
2057 | - posix::linux::proc::process::OomScoreAdj oom_score_adj; |
2058 | - EXPECT_NO_THROW(posix::this_process::instance() >> oom_score_adj); |
2059 | + core::posix::linux::proc::process::OomScoreAdj oom_score_adj; |
2060 | + EXPECT_NO_THROW(core::posix::this_process::instance() >> oom_score_adj); |
2061 | } |
2062 | |
2063 | namespace |
2064 | @@ -70,89 +70,89 @@ |
2065 | |
2066 | TEST(LinuxProcess, adjusting_proc_oom_score_adj_works) |
2067 | { |
2068 | - posix::linux::proc::process::OomScoreAdj oom_score_adj |
2069 | + core::posix::linux::proc::process::OomScoreAdj oom_score_adj |
2070 | { |
2071 | - posix::linux::proc::process::OomScoreAdj::max_value() |
2072 | + core::posix::linux::proc::process::OomScoreAdj::max_value() |
2073 | }; |
2074 | - EXPECT_NO_THROW(posix::this_process::instance() << oom_score_adj); |
2075 | - EXPECT_NO_THROW(posix::this_process::instance() >> oom_score_adj); |
2076 | - EXPECT_EQ(posix::linux::proc::process::OomScoreAdj::max_value(), |
2077 | + EXPECT_NO_THROW(core::posix::this_process::instance() << oom_score_adj); |
2078 | + EXPECT_NO_THROW(core::posix::this_process::instance() >> oom_score_adj); |
2079 | + EXPECT_EQ(core::posix::linux::proc::process::OomScoreAdj::max_value(), |
2080 | oom_score_adj.value); |
2081 | - posix::linux::proc::process::OomScore oom_score; |
2082 | - EXPECT_NO_THROW(posix::this_process::instance() >> oom_score); |
2083 | - EXPECT_TRUE(is_approximately_equal(oom_score.value, posix::linux::proc::process::OomScoreAdj::max_value())); |
2084 | + core::posix::linux::proc::process::OomScore oom_score; |
2085 | + EXPECT_NO_THROW(core::posix::this_process::instance() >> oom_score); |
2086 | + EXPECT_TRUE(is_approximately_equal(oom_score.value, core::posix::linux::proc::process::OomScoreAdj::max_value())); |
2087 | } |
2088 | |
2089 | // For this test we assume that we are not privileged and that the test binary |
2090 | // does not have CAP_SYS_RESOURCE capabilities. |
2091 | TEST(LinuxProcess, adjusting_proc_oom_score_adj_to_privileged_values_only_works_if_root) |
2092 | { |
2093 | - posix::linux::proc::process::OomScoreAdj oom_score_adj |
2094 | + core::posix::linux::proc::process::OomScoreAdj oom_score_adj |
2095 | { |
2096 | - posix::linux::proc::process::OomScoreAdj::min_value() |
2097 | + core::posix::linux::proc::process::OomScoreAdj::min_value() |
2098 | }; |
2099 | - EXPECT_NO_THROW(posix::this_process::instance() << oom_score_adj); |
2100 | - EXPECT_NO_THROW(posix::this_process::instance() >> oom_score_adj); |
2101 | + EXPECT_NO_THROW(core::posix::this_process::instance() << oom_score_adj); |
2102 | + EXPECT_NO_THROW(core::posix::this_process::instance() >> oom_score_adj); |
2103 | |
2104 | // If we are running on virtualized builders or buildds we are running under a fakeroot environment. |
2105 | // However, that environment does not give us the required privileges and capabilities to adjust OOM values |
2106 | // as we like. At any rate, this check seems to be flaky and we just comment it out. |
2107 | - // EXPECT_NE(posix::linux::proc::process::OomScoreAdj::min_value(), |
2108 | + // EXPECT_NE(core::posix::linux::proc::process::OomScoreAdj::min_value(), |
2109 | // oom_score_adj.value); |
2110 | } |
2111 | |
2112 | TEST(LinuxProcess, trying_to_write_an_invalid_oom_score_adj_throws) |
2113 | { |
2114 | - posix::linux::proc::process::OomScoreAdj invalid_adj |
2115 | + core::posix::linux::proc::process::OomScoreAdj invalid_adj |
2116 | { |
2117 | - posix::linux::proc::process::OomScoreAdj::min_value() -1000 |
2118 | + core::posix::linux::proc::process::OomScoreAdj::min_value() -1000 |
2119 | }; |
2120 | |
2121 | - EXPECT_ANY_THROW(posix::this_process::instance() << invalid_adj); |
2122 | + EXPECT_ANY_THROW(core::posix::this_process::instance() << invalid_adj); |
2123 | } |
2124 | |
2125 | TEST(LinuxProcess, adjusting_proc_oom_adj_works) |
2126 | { |
2127 | - posix::linux::proc::process::OomAdj oom_adj |
2128 | + core::posix::linux::proc::process::OomAdj oom_adj |
2129 | { |
2130 | - posix::linux::proc::process::OomAdj::max_value() |
2131 | + core::posix::linux::proc::process::OomAdj::max_value() |
2132 | }; |
2133 | - EXPECT_NO_THROW(posix::this_process::instance() << oom_adj); |
2134 | - EXPECT_NO_THROW(posix::this_process::instance() >> oom_adj); |
2135 | - EXPECT_EQ(posix::linux::proc::process::OomAdj::max_value(), |
2136 | + EXPECT_NO_THROW(core::posix::this_process::instance() << oom_adj); |
2137 | + EXPECT_NO_THROW(core::posix::this_process::instance() >> oom_adj); |
2138 | + EXPECT_EQ(core::posix::linux::proc::process::OomAdj::max_value(), |
2139 | oom_adj.value); |
2140 | - posix::linux::proc::process::OomScore oom_score; |
2141 | - EXPECT_NO_THROW(posix::this_process::instance() >> oom_score); |
2142 | + core::posix::linux::proc::process::OomScore oom_score; |
2143 | + EXPECT_NO_THROW(core::posix::this_process::instance() >> oom_score); |
2144 | // This looks weird as we are comparing to OomScoreAdj as opposed to OomAdj. |
2145 | // However, /proc/pid/oom_adj is deprecated as of linux 2.6.36 and the value |
2146 | // reported in oom_score is in the scale of /proc/pid/oom_score_adj, i.e., [-1000, 1000]. |
2147 | - EXPECT_TRUE(is_approximately_equal(oom_score.value, posix::linux::proc::process::OomScoreAdj::max_value())); |
2148 | + EXPECT_TRUE(is_approximately_equal(oom_score.value, core::posix::linux::proc::process::OomScoreAdj::max_value())); |
2149 | } |
2150 | |
2151 | // For this test we assume that we are not privileged and that the test binary |
2152 | // does not have CAP_SYS_RESOURCE capabilities. |
2153 | TEST(LinuxProcess, adjusting_proc_oom_adj_to_privileged_values_does_not_work) |
2154 | { |
2155 | - posix::linux::proc::process::OomAdj oom_adj |
2156 | + core::posix::linux::proc::process::OomAdj oom_adj |
2157 | { |
2158 | - posix::linux::proc::process::OomAdj::min_value() |
2159 | + core::posix::linux::proc::process::OomAdj::min_value() |
2160 | }; |
2161 | - EXPECT_NO_THROW(posix::this_process::instance() << oom_adj); |
2162 | - EXPECT_NO_THROW(posix::this_process::instance() >> oom_adj); |
2163 | + EXPECT_NO_THROW(core::posix::this_process::instance() << oom_adj); |
2164 | + EXPECT_NO_THROW(core::posix::this_process::instance() >> oom_adj); |
2165 | |
2166 | // If we are running on virtualized builders or buildds we are running under a fakeroot environment. |
2167 | // However, that environment does not give us the required privileges and capabilities to adjust OOM values |
2168 | // as we like. At any rate, this check seems to be flaky and we just comment it out. |
2169 | - // EXPECT_NE(posix::linux::proc::process::OomAdj::min_value(), |
2170 | + // EXPECT_NE(core::posix::linux::proc::process::OomAdj::min_value(), |
2171 | // oom_adj.value); |
2172 | } |
2173 | |
2174 | TEST(LinuxProcess, trying_to_write_an_invalid_oom_adj_throws) |
2175 | { |
2176 | - posix::linux::proc::process::OomAdj invalid_adj |
2177 | + core::posix::linux::proc::process::OomAdj invalid_adj |
2178 | { |
2179 | - posix::linux::proc::process::OomAdj::min_value() - 1000 |
2180 | + core::posix::linux::proc::process::OomAdj::min_value() - 1000 |
2181 | }; |
2182 | |
2183 | - EXPECT_ANY_THROW(posix::this_process::instance() << invalid_adj); |
2184 | + EXPECT_ANY_THROW(core::posix::this_process::instance() << invalid_adj); |
2185 | } |
2186 | |
2187 | === modified file 'tests/posix_process_test.cpp' |
2188 | --- tests/posix_process_test.cpp 2013-11-14 07:45:17 +0000 |
2189 | +++ tests/posix_process_test.cpp 2013-12-02 14:48:12 +0000 |
2190 | @@ -16,10 +16,10 @@ |
2191 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
2192 | */ |
2193 | |
2194 | -#include <posix/exec.h> |
2195 | -#include <posix/fork.h> |
2196 | -#include <posix/process.h> |
2197 | -#include <posix/signal.h> |
2198 | +#include <core/posix/exec.h> |
2199 | +#include <core/posix/fork.h> |
2200 | +#include <core/posix/process.h> |
2201 | +#include <core/posix/signal.h> |
2202 | |
2203 | #include <gtest/gtest.h> |
2204 | |
2205 | @@ -38,57 +38,57 @@ |
2206 | { |
2207 | void SetUp() |
2208 | { |
2209 | - child = posix::fork( |
2210 | - []() { std::cout << "Child" << std::endl; while(true) {} return posix::exit::Status::failure;}, |
2211 | - posix::StandardStream::stdin | posix::StandardStream::stdout); |
2212 | + child = core::posix::fork( |
2213 | + []() { std::cout << "Child" << std::endl; while(true) {} return core::posix::exit::Status::failure;}, |
2214 | + core::posix::StandardStream::stdin | core::posix::StandardStream::stdout); |
2215 | } |
2216 | |
2217 | void TearDown() |
2218 | { |
2219 | } |
2220 | |
2221 | - posix::ChildProcess child = posix::ChildProcess::invalid(); |
2222 | + core::posix::ChildProcess child = core::posix::ChildProcess::invalid(); |
2223 | }; |
2224 | } |
2225 | |
2226 | TEST(PosixProcess, ctor_throws_for_invalid_pid) |
2227 | { |
2228 | pid_t invalid_pid{-1}; |
2229 | - EXPECT_ANY_THROW(posix::Process{invalid_pid}); |
2230 | + EXPECT_ANY_THROW(core::posix::Process{invalid_pid}); |
2231 | } |
2232 | |
2233 | TEST(PosixProcess, this_process_instance_reports_correct_pid) |
2234 | { |
2235 | - EXPECT_EQ(getpid(), posix::this_process::instance().pid()); |
2236 | + EXPECT_EQ(getpid(), core::posix::this_process::instance().pid()); |
2237 | } |
2238 | |
2239 | TEST(PosixProcess, this_process_instance_reports_correct_parent) |
2240 | { |
2241 | - EXPECT_EQ(getppid(), posix::this_process::parent().pid()); |
2242 | + EXPECT_EQ(getppid(), core::posix::this_process::parent().pid()); |
2243 | } |
2244 | |
2245 | TEST(PosixProcess, throwing_access_to_process_group_id_of_this_process_works) |
2246 | { |
2247 | - EXPECT_EQ(getpgrp(), posix::this_process::instance().process_group_or_throw().id()); |
2248 | + EXPECT_EQ(getpgrp(), core::posix::this_process::instance().process_group_or_throw().id()); |
2249 | } |
2250 | |
2251 | TEST(PosixProcess, non_throwing_access_to_process_group_id_of_this_process_works) |
2252 | { |
2253 | std::error_code se; |
2254 | - auto pg = posix::this_process::instance().process_group(se); |
2255 | + auto pg = core::posix::this_process::instance().process_group(se); |
2256 | EXPECT_FALSE(is_error(se)); |
2257 | EXPECT_EQ(getpgrp(), pg.id()); |
2258 | } |
2259 | |
2260 | TEST(PosixProcess, trying_to_access_process_group_of_invalid_process_throws) |
2261 | { |
2262 | - EXPECT_ANY_THROW(posix::Process::invalid().process_group_or_throw()); |
2263 | + EXPECT_ANY_THROW(core::posix::Process::invalid().process_group_or_throw()); |
2264 | } |
2265 | |
2266 | TEST(PosixProcess, trying_to_access_process_group_of_invalid_process_reports_error) |
2267 | { |
2268 | std::error_code se; |
2269 | - posix::Process::invalid().process_group(se); |
2270 | + core::posix::Process::invalid().process_group(se); |
2271 | EXPECT_TRUE(is_error(se)); |
2272 | } |
2273 | |
2274 | @@ -111,18 +111,18 @@ |
2275 | { |
2276 | { |
2277 | std::stringstream ss; |
2278 | - auto old = posix::this_process::cout().rdbuf(ss.rdbuf()); |
2279 | - posix::this_process::cout() << "posix::this_process::instance().cout()\n"; |
2280 | - EXPECT_EQ(ss.str(), "posix::this_process::instance().cout()\n"); |
2281 | - posix::this_process::cout().rdbuf(old); |
2282 | + auto old = core::posix::this_process::cout().rdbuf(ss.rdbuf()); |
2283 | + core::posix::this_process::cout() << "core::posix::this_process::instance().cout()\n"; |
2284 | + EXPECT_EQ(ss.str(), "core::posix::this_process::instance().cout()\n"); |
2285 | + core::posix::this_process::cout().rdbuf(old); |
2286 | } |
2287 | |
2288 | { |
2289 | std::stringstream ss; |
2290 | - auto old = posix::this_process::cerr().rdbuf(ss.rdbuf()); |
2291 | - posix::this_process::cerr() << "posix::this_process::instance().cerr()" << std::endl; |
2292 | - EXPECT_EQ(ss.str(), "posix::this_process::instance().cerr()\n"); |
2293 | - posix::this_process::cerr().rdbuf(old); |
2294 | + auto old = core::posix::this_process::cerr().rdbuf(ss.rdbuf()); |
2295 | + core::posix::this_process::cerr() << "core::posix::this_process::instance().cerr()" << std::endl; |
2296 | + EXPECT_EQ(ss.str(), "core::posix::this_process::instance().cerr()\n"); |
2297 | + core::posix::this_process::cerr().rdbuf(old); |
2298 | } |
2299 | } |
2300 | |
2301 | @@ -130,8 +130,8 @@ |
2302 | { |
2303 | static const char* home = "HOME"; |
2304 | static const char* totally_not_existent = "totally_not_existent_42"; |
2305 | - EXPECT_EQ(getenv("HOME"), posix::this_process::env::get(home)); |
2306 | - EXPECT_EQ("", posix::this_process::env::get(totally_not_existent)); |
2307 | + EXPECT_EQ(getenv("HOME"), core::posix::this_process::env::get(home)); |
2308 | + EXPECT_EQ("", core::posix::this_process::env::get(totally_not_existent)); |
2309 | } |
2310 | |
2311 | TEST(Self, mutable_access_to_the_environment_alters_the_environment) |
2312 | @@ -139,82 +139,82 @@ |
2313 | static const char* totally_not_existent = "totally_not_existent_42"; |
2314 | static const char* totally_not_existent_value = "42"; |
2315 | |
2316 | - EXPECT_EQ("", posix::this_process::env::get(totally_not_existent)); |
2317 | - EXPECT_NO_THROW(posix::this_process::env::set_or_throw( |
2318 | + EXPECT_EQ("", core::posix::this_process::env::get(totally_not_existent)); |
2319 | + EXPECT_NO_THROW(core::posix::this_process::env::set_or_throw( |
2320 | totally_not_existent, |
2321 | totally_not_existent_value)); |
2322 | EXPECT_EQ(totally_not_existent_value, |
2323 | - posix::this_process::env::get(totally_not_existent)); |
2324 | + core::posix::this_process::env::get(totally_not_existent)); |
2325 | |
2326 | EXPECT_NO_THROW( |
2327 | - posix::this_process::env::unset_or_throw( |
2328 | + core::posix::this_process::env::unset_or_throw( |
2329 | totally_not_existent)); |
2330 | EXPECT_EQ("", |
2331 | - posix::this_process::env::get(totally_not_existent)); |
2332 | + core::posix::this_process::env::get(totally_not_existent)); |
2333 | } |
2334 | |
2335 | TEST(Self, getting_env_var_for_empty_key_does_not_throw) |
2336 | { |
2337 | - EXPECT_NO_THROW(posix::this_process::env::get("")); |
2338 | + EXPECT_NO_THROW(core::posix::this_process::env::get("")); |
2339 | } |
2340 | |
2341 | TEST(Self, setting_env_var_for_empty_key_throws) |
2342 | { |
2343 | - EXPECT_ANY_THROW(posix::this_process::env::set_or_throw( |
2344 | + EXPECT_ANY_THROW(core::posix::this_process::env::set_or_throw( |
2345 | "", |
2346 | "uninteresting")); |
2347 | } |
2348 | |
2349 | TEST(ChildProcess, fork_returns_process_object_with_valid_pid_and_wait_for_returns_correct_result) |
2350 | { |
2351 | - posix::ChildProcess child = posix::fork( |
2352 | - []() { std::cout << "Child" << std::endl; return posix::exit::Status::success; }, |
2353 | - posix::StandardStream::stdin | posix::StandardStream::stdout); |
2354 | + core::posix::ChildProcess child = core::posix::fork( |
2355 | + []() { std::cout << "Child" << std::endl; return core::posix::exit::Status::success; }, |
2356 | + core::posix::StandardStream::stdin | core::posix::StandardStream::stdout); |
2357 | EXPECT_TRUE(child.pid() > 0); |
2358 | |
2359 | - auto result = child.wait_for(posix::wait::Flags::untraced); |
2360 | - EXPECT_EQ(posix::wait::Result::Status::exited, |
2361 | + auto result = child.wait_for(core::posix::wait::Flags::untraced); |
2362 | + EXPECT_EQ(core::posix::wait::Result::Status::exited, |
2363 | result.status); |
2364 | - EXPECT_EQ(posix::exit::Status::success, |
2365 | + EXPECT_EQ(core::posix::exit::Status::success, |
2366 | result.detail.if_exited.status); |
2367 | |
2368 | - child = posix::fork( |
2369 | - []() { std::cout << "Child" << std::endl; return posix::exit::Status::failure; }, |
2370 | - posix::StandardStream::stdin | posix::StandardStream::stdout); |
2371 | + child = core::posix::fork( |
2372 | + []() { std::cout << "Child" << std::endl; return core::posix::exit::Status::failure; }, |
2373 | + core::posix::StandardStream::stdin | core::posix::StandardStream::stdout); |
2374 | EXPECT_TRUE(child.pid() > 0); |
2375 | |
2376 | - result = child.wait_for(posix::wait::Flags::untraced); |
2377 | - EXPECT_EQ(posix::wait::Result::Status::exited, |
2378 | + result = child.wait_for(core::posix::wait::Flags::untraced); |
2379 | + EXPECT_EQ(core::posix::wait::Result::Status::exited, |
2380 | result.status); |
2381 | - EXPECT_EQ(posix::exit::Status::failure, |
2382 | + EXPECT_EQ(core::posix::exit::Status::failure, |
2383 | result.detail.if_exited.status); |
2384 | } |
2385 | |
2386 | TEST_F(ForkedSpinningProcess, signalling_a_forked_child_makes_wait_for_return_correct_result) |
2387 | { |
2388 | - EXPECT_NO_THROW(child.send_signal_or_throw(posix::Signal::sig_kill)); |
2389 | - auto result = child.wait_for(posix::wait::Flags::untraced); |
2390 | - EXPECT_EQ(posix::wait::Result::Status::signaled, |
2391 | + EXPECT_NO_THROW(child.send_signal_or_throw(core::posix::Signal::sig_kill)); |
2392 | + auto result = child.wait_for(core::posix::wait::Flags::untraced); |
2393 | + EXPECT_EQ(core::posix::wait::Result::Status::signaled, |
2394 | result.status); |
2395 | - EXPECT_EQ(posix::Signal::sig_kill, |
2396 | + EXPECT_EQ(core::posix::Signal::sig_kill, |
2397 | result.detail.if_signaled.signal); |
2398 | |
2399 | - child = posix::fork( |
2400 | - []() { std::cout << "Child" << std::endl; while(true) {} return posix::exit::Status::failure;}, |
2401 | - posix::StandardStream::stdin | posix::StandardStream::stdout); |
2402 | + child = core::posix::fork( |
2403 | + []() { std::cout << "Child" << std::endl; while(true) {} return core::posix::exit::Status::failure;}, |
2404 | + core::posix::StandardStream::stdin | core::posix::StandardStream::stdout); |
2405 | EXPECT_TRUE(child.pid() > 0); |
2406 | |
2407 | - EXPECT_NO_THROW(child.send_signal_or_throw(posix::Signal::sig_term)); |
2408 | - result = child.wait_for(posix::wait::Flags::untraced); |
2409 | - EXPECT_EQ(posix::wait::Result::Status::signaled, |
2410 | + EXPECT_NO_THROW(child.send_signal_or_throw(core::posix::Signal::sig_term)); |
2411 | + result = child.wait_for(core::posix::wait::Flags::untraced); |
2412 | + EXPECT_EQ(core::posix::wait::Result::Status::signaled, |
2413 | result.status); |
2414 | - EXPECT_EQ(posix::Signal::sig_term, |
2415 | + EXPECT_EQ(core::posix::Signal::sig_term, |
2416 | result.detail.if_signaled.signal); |
2417 | } |
2418 | |
2419 | TEST(ChildProcess, stopping_a_forked_child_makes_wait_for_return_correct_result) |
2420 | { |
2421 | - posix::ChildProcess child = posix::fork( |
2422 | + core::posix::ChildProcess child = core::posix::fork( |
2423 | []() |
2424 | { |
2425 | std::string line; |
2426 | @@ -223,9 +223,9 @@ |
2427 | std::cin >> line; |
2428 | std::cout << line << std::endl; |
2429 | } |
2430 | - return posix::exit::Status::failure; |
2431 | + return core::posix::exit::Status::failure; |
2432 | }, |
2433 | - posix::StandardStream::stdin | posix::StandardStream::stdout); |
2434 | + core::posix::StandardStream::stdin | core::posix::StandardStream::stdout); |
2435 | EXPECT_TRUE(child.pid() > 0); |
2436 | |
2437 | const std::string echo_value{"42"}; |
2438 | @@ -234,18 +234,18 @@ |
2439 | |
2440 | EXPECT_EQ(echo_value, line); |
2441 | |
2442 | - EXPECT_NO_THROW(child.send_signal_or_throw(posix::Signal::sig_stop)); |
2443 | - auto result = child.wait_for(posix::wait::Flags::untraced); |
2444 | - EXPECT_EQ(posix::wait::Result::Status::stopped, |
2445 | + EXPECT_NO_THROW(child.send_signal_or_throw(core::posix::Signal::sig_stop)); |
2446 | + auto result = child.wait_for(core::posix::wait::Flags::untraced); |
2447 | + EXPECT_EQ(core::posix::wait::Result::Status::stopped, |
2448 | result.status); |
2449 | - EXPECT_EQ(posix::Signal::sig_stop, |
2450 | + EXPECT_EQ(core::posix::Signal::sig_stop, |
2451 | result.detail.if_stopped.signal); |
2452 | |
2453 | - EXPECT_NO_THROW(child.send_signal_or_throw(posix::Signal::sig_kill)); |
2454 | - result = child.wait_for(posix::wait::Flags::untraced); |
2455 | - EXPECT_EQ(posix::wait::Result::Status::signaled, |
2456 | + EXPECT_NO_THROW(child.send_signal_or_throw(core::posix::Signal::sig_kill)); |
2457 | + result = child.wait_for(core::posix::wait::Flags::untraced); |
2458 | + EXPECT_EQ(core::posix::wait::Result::Status::signaled, |
2459 | result.status); |
2460 | - EXPECT_EQ(posix::Signal::sig_kill, |
2461 | + EXPECT_EQ(core::posix::Signal::sig_kill, |
2462 | result.detail.if_signaled.signal); |
2463 | } |
2464 | |
2465 | @@ -257,9 +257,9 @@ |
2466 | { |
2467 | for (unsigned int i = 0; i < child_process_count; i++) |
2468 | { |
2469 | - auto child = posix::fork( |
2470 | - []() { return posix::exit::Status::success; }, |
2471 | - posix::StandardStream::stdin | posix::StandardStream::stdout); |
2472 | + auto child = core::posix::fork( |
2473 | + []() { return core::posix::exit::Status::success; }, |
2474 | + core::posix::StandardStream::stdin | core::posix::StandardStream::stdout); |
2475 | // A bit ugly but we have to ensure that no signal is lost. |
2476 | // And thus, we keep the process object alive. |
2477 | std::this_thread::sleep_for(std::chrono::milliseconds{10}); |
2478 | @@ -275,21 +275,21 @@ |
2479 | const std::string program{"/usr/bin/sleep"}; |
2480 | const std::vector<std::string> argv = {"10"}; |
2481 | std::map<std::string, std::string> env; |
2482 | - posix::this_process::env::for_each([&env](const std::string& key, const std::string& value) |
2483 | + core::posix::this_process::env::for_each([&env](const std::string& key, const std::string& value) |
2484 | { |
2485 | env.insert(std::make_pair(key, value)); |
2486 | }); |
2487 | |
2488 | - posix::ChildProcess child = posix::exec(program, |
2489 | + core::posix::ChildProcess child = core::posix::exec(program, |
2490 | argv, |
2491 | env, |
2492 | - posix::StandardStream::stdin | posix::StandardStream::stdout); |
2493 | + core::posix::StandardStream::stdin | core::posix::StandardStream::stdout); |
2494 | EXPECT_TRUE(child.pid() > 0); |
2495 | - EXPECT_NO_THROW(child.send_signal_or_throw(posix::Signal::sig_kill)); |
2496 | - auto result = child.wait_for(posix::wait::Flags::untraced); |
2497 | - EXPECT_EQ(posix::wait::Result::Status::signaled, |
2498 | + EXPECT_NO_THROW(child.send_signal_or_throw(core::posix::Signal::sig_kill)); |
2499 | + auto result = child.wait_for(core::posix::wait::Flags::untraced); |
2500 | + EXPECT_EQ(core::posix::wait::Result::Status::signaled, |
2501 | result.status); |
2502 | - EXPECT_EQ(posix::Signal::sig_kill, |
2503 | + EXPECT_EQ(core::posix::Signal::sig_kill, |
2504 | result.detail.if_signaled.signal); |
2505 | } |
2506 | |
2507 | @@ -298,37 +298,37 @@ |
2508 | const std::string program{"/usr/bin/env"}; |
2509 | const std::vector<std::string> argv = {}; |
2510 | std::map<std::string, std::string> env; |
2511 | - posix::this_process::env::for_each([&env](const std::string& key, const std::string& value) |
2512 | + core::posix::this_process::env::for_each([&env](const std::string& key, const std::string& value) |
2513 | { |
2514 | env.insert(std::make_pair(key, value)); |
2515 | }); |
2516 | |
2517 | - posix::ChildProcess child = posix::exec( |
2518 | + core::posix::ChildProcess child = core::posix::exec( |
2519 | program, |
2520 | argv, |
2521 | env, |
2522 | - posix::StandardStream::stdin | posix::StandardStream::stdout); |
2523 | + core::posix::StandardStream::stdin | core::posix::StandardStream::stdout); |
2524 | |
2525 | EXPECT_TRUE(child.pid() > 0); |
2526 | |
2527 | - EXPECT_NO_THROW(child.send_signal_or_throw(posix::Signal::sig_kill)); |
2528 | - auto result = child.wait_for(posix::wait::Flags::untraced); |
2529 | - EXPECT_EQ(posix::wait::Result::Status::signaled, |
2530 | + EXPECT_NO_THROW(child.send_signal_or_throw(core::posix::Signal::sig_kill)); |
2531 | + auto result = child.wait_for(core::posix::wait::Flags::untraced); |
2532 | + EXPECT_EQ(core::posix::wait::Result::Status::signaled, |
2533 | result.status); |
2534 | - EXPECT_EQ(posix::Signal::sig_kill, |
2535 | + EXPECT_EQ(core::posix::Signal::sig_kill, |
2536 | result.detail.if_signaled.signal); |
2537 | |
2538 | - child = posix::exec(program, |
2539 | + child = core::posix::exec(program, |
2540 | argv, |
2541 | env, |
2542 | - posix::StandardStream::stdin | posix::StandardStream::stdout); |
2543 | + core::posix::StandardStream::stdin | core::posix::StandardStream::stdout); |
2544 | EXPECT_TRUE(child.pid() > 0); |
2545 | |
2546 | - EXPECT_NO_THROW(child.send_signal_or_throw(posix::Signal::sig_term)); |
2547 | - result = child.wait_for(posix::wait::Flags::untraced); |
2548 | - EXPECT_EQ(posix::wait::Result::Status::signaled, |
2549 | + EXPECT_NO_THROW(child.send_signal_or_throw(core::posix::Signal::sig_term)); |
2550 | + result = child.wait_for(core::posix::wait::Flags::untraced); |
2551 | + EXPECT_EQ(core::posix::wait::Result::Status::signaled, |
2552 | result.status); |
2553 | - EXPECT_EQ(posix::Signal::sig_term, |
2554 | + EXPECT_EQ(core::posix::Signal::sig_term, |
2555 | result.detail.if_signaled.signal); |
2556 | } |
2557 | |
2558 | @@ -337,34 +337,34 @@ |
2559 | const std::string program{"/usr/bin/sleep"}; |
2560 | const std::vector<std::string> argv = {"10"}; |
2561 | std::map<std::string, std::string> env; |
2562 | - posix::this_process::env::for_each([&env](const std::string& key, const std::string& value) |
2563 | + core::posix::this_process::env::for_each([&env](const std::string& key, const std::string& value) |
2564 | { |
2565 | env.insert(std::make_pair(key, value)); |
2566 | }); |
2567 | |
2568 | - posix::ChildProcess child = posix::exec(program, |
2569 | + core::posix::ChildProcess child = core::posix::exec(program, |
2570 | argv, |
2571 | env, |
2572 | - posix::StandardStream::stdin | posix::StandardStream::stdout); |
2573 | + core::posix::StandardStream::stdin | core::posix::StandardStream::stdout); |
2574 | EXPECT_TRUE(child.pid() > 0); |
2575 | |
2576 | - EXPECT_NO_THROW(child.send_signal_or_throw(posix::Signal::sig_stop)); |
2577 | - auto result = child.wait_for(posix::wait::Flags::untraced); |
2578 | - EXPECT_EQ(posix::wait::Result::Status::stopped, |
2579 | + EXPECT_NO_THROW(child.send_signal_or_throw(core::posix::Signal::sig_stop)); |
2580 | + auto result = child.wait_for(core::posix::wait::Flags::untraced); |
2581 | + EXPECT_EQ(core::posix::wait::Result::Status::stopped, |
2582 | result.status); |
2583 | - EXPECT_EQ(posix::Signal::sig_stop, |
2584 | + EXPECT_EQ(core::posix::Signal::sig_stop, |
2585 | result.detail.if_signaled.signal); |
2586 | - EXPECT_NO_THROW(child.send_signal_or_throw(posix::Signal::sig_kill)); |
2587 | - result = child.wait_for(posix::wait::Flags::untraced); |
2588 | - EXPECT_EQ(posix::wait::Result::Status::signaled, |
2589 | + EXPECT_NO_THROW(child.send_signal_or_throw(core::posix::Signal::sig_kill)); |
2590 | + result = child.wait_for(core::posix::wait::Flags::untraced); |
2591 | + EXPECT_EQ(core::posix::wait::Result::Status::signaled, |
2592 | result.status); |
2593 | - EXPECT_EQ(posix::Signal::sig_kill, |
2594 | + EXPECT_EQ(core::posix::Signal::sig_kill, |
2595 | result.detail.if_signaled.signal); |
2596 | } |
2597 | |
2598 | TEST(StreamRedirect, redirecting_stdin_stdout_stderr_works) |
2599 | { |
2600 | - posix::ChildProcess child = posix::fork( |
2601 | + core::posix::ChildProcess child = core::posix::fork( |
2602 | []() |
2603 | { |
2604 | std::string line; |
2605 | @@ -374,9 +374,9 @@ |
2606 | std::cout << line << std::endl; |
2607 | std::cerr << line << std::endl; |
2608 | } |
2609 | - return posix::exit::Status::failure; |
2610 | + return core::posix::exit::Status::failure; |
2611 | }, |
2612 | - posix::StandardStream::stdin | posix::StandardStream::stdout | posix::StandardStream::stderr); |
2613 | + core::posix::StandardStream::stdin | core::posix::StandardStream::stdout | core::posix::StandardStream::stderr); |
2614 | |
2615 | ASSERT_TRUE(child.pid() > 0); |
2616 | |
2617 | @@ -387,13 +387,13 @@ |
2618 | EXPECT_EQ(echo_value, line); |
2619 | EXPECT_NO_THROW(child.cerr() >> line); |
2620 | EXPECT_EQ(echo_value, line); |
2621 | - EXPECT_NO_THROW(child.send_signal_or_throw(posix::Signal::sig_kill)); |
2622 | - child.wait_for(posix::wait::Flags::untraced); |
2623 | + EXPECT_NO_THROW(child.send_signal_or_throw(core::posix::Signal::sig_kill)); |
2624 | + child.wait_for(core::posix::wait::Flags::untraced); |
2625 | } |
2626 | |
2627 | TEST(Environment, iterating_the_environment_does_not_throw) |
2628 | { |
2629 | - EXPECT_NO_THROW(posix::this_process::env::for_each( |
2630 | + EXPECT_NO_THROW(core::posix::this_process::env::for_each( |
2631 | [](const std::string& key, const std::string& value) |
2632 | { |
2633 | std::cout << key << " -> " << value << std::endl; |
2634 | @@ -404,5 +404,5 @@ |
2635 | { |
2636 | const std::string expected_value{"42"}; |
2637 | EXPECT_EQ(expected_value, |
2638 | - posix::this_process::env::get("totally_non_existant_key_in_env_blubb", expected_value)); |
2639 | + core::posix::this_process::env::get("totally_non_existant_key_in_env_blubb", expected_value)); |
2640 | } |
PASSED: Continuous integration, rev:27 jenkins. qa.ubuntu. com/job/ process- cpp-ci/ 19/ jenkins. qa.ubuntu. com/job/ process- cpp-trusty- amd64-ci/ 19 jenkins. qa.ubuntu. com/job/ process- cpp-trusty- armhf-ci/ 19 jenkins. qa.ubuntu. com/job/ process- cpp-trusty- armhf-ci/ 19/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ process- cpp-trusty- i386-ci/ 15
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/process- cpp-ci/ 19/rebuild
http://