22 test_for_pcmk_rc_name(
void **state) {
30 test_for_pcmk_rc_str(
void **state) {
37 test_for_crm_exit_name(
void **state) {
42 test_for_crm_exit_str(
void **state) {
44 assert_string_equal(
crm_exit_str(129),
"Interrupted by signal");
45 assert_string_equal(
crm_exit_str(-7777777),
"Unknown exit status");
49 test_for_pcmk_rc2exitc(
void **state) {
55 test_for_bz2_strerror(
void **state) {
59 int main(
int argc,
char **argv) {
60 const struct CMUnitTest tests[] = {
61 cmocka_unit_test(test_for_pcmk_rc_name),
62 cmocka_unit_test(test_for_pcmk_rc_str),
63 cmocka_unit_test(test_for_crm_exit_name),
64 cmocka_unit_test(test_for_crm_exit_str),
65 cmocka_unit_test(test_for_pcmk_rc2exitc),
66 cmocka_unit_test(test_for_bz2_strerror),
69 cmocka_set_message_output(CM_OUTPUT_TAP);
70 return cmocka_run_group_tests(tests, NULL, NULL);
const char * bz2_strerror(int rc)
crm_exit_t pcmk_rc2exitc(int rc)
Map a function return code to the most similar exit code.
const char * pcmk_rc_str(int rc)
Get a user-friendly description of a return code.
int main(int argc, char **argv)
const char * crm_exit_str(crm_exit_t exit_code)
const char * pcmk_rc_name(int rc)
Get a return code constant name as a string.
const char * crm_exit_name(crm_exit_t exit_code)