• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mendersoftware / mender / 969241802

16 Aug 2023 08:29AM UTC coverage: 79.019% (+0.2%) from 78.825%
969241802

push

gitlab-ci

oleorhagen
chore(crypto): Make the PrivateKey constructor public

Signed-off-by: Ole Petter <ole.orhagen@northern.tech>

5314 of 6725 relevant lines covered (79.02%)

200.29 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

40.0
/common/processes/processes.cpp
1
// Copyright 2023 Northern.tech AS
2
//
3
//    Licensed under the Apache License, Version 2.0 (the "License");
4
//    you may not use this file except in compliance with the License.
5
//    You may obtain a copy of the License at
6
//
7
//        http://www.apache.org/licenses/LICENSE-2.0
8
//
9
//    Unless required by applicable law or agreed to in writing, software
10
//    distributed under the License is distributed on an "AS IS" BASIS,
11
//    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
//    See the License for the specific language governing permissions and
13
//    limitations under the License.
14

15
#include <common/processes.hpp>
16

17
namespace mender {
18
namespace common {
19
namespace processes {
20

21
const chrono::seconds DEFAULT_GENERATE_LINE_DATA_TIMEOUT {10};
22

23
const ProcessesErrorCategoryClass ProcessesErrorCategory;
24

25
const char *ProcessesErrorCategoryClass::name() const noexcept {
×
26
        return "ProcessesErrorCategory";
×
27
}
28

29
string ProcessesErrorCategoryClass::message(int code) const {
50✔
30
        switch (code) {
50✔
31
        case NoError:
×
32
                return "Success";
×
33
        case SpawnError:
×
34
                return "Spawn error";
×
35
        case ProcessAlreadyStartedError:
×
36
                return "Process already started";
×
37
        case NonZeroExitStatusError:
50✔
38
                return "Process returned non-zero exit status";
50✔
39
        }
40
        assert(false);
×
41
        return "Unknown";
42
}
43

44
error::Error MakeError(ProcessesErrorCode code, const string &msg) {
109✔
45
        return error::Error(error_condition(code, ProcessesErrorCategory), msg);
218✔
46
};
47

48
} // namespace processes
49
} // namespace common
50
} // namespace mender
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc