Changeset b7fd2a0 in mainline for uspace/lib/pcut
- Timestamp:
- 2018-01-13T03:10:29Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a53ed3a
- Parents:
- 36f0738
- Location:
- uspace/lib/pcut
- Files:
-
- 3 edited
-
include/pcut/asserts.h (modified) (2 diffs)
-
src/os/helenos.c (modified) (4 diffs)
-
tests/errno.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/pcut/include/pcut/asserts.h
r36f0738 rb7fd2a0 77 77 * @param size Size of the buffer. 78 78 */ 79 void pcut_str_error( int error, char *buffer, int size);79 void pcut_str_error(errno_t error, char *buffer, int size); 80 80 81 81 /** Raise assertion error (internal version). … … 264 264 #define PCUT_ASSERT_ERRNO_VAL_WITH_NAME(expected_value, expected_quoted, actual_value) \ 265 265 do {\ 266 int pcut_expected_eval = (expected_value); \267 int pcut_actual_eval = (actual_value); \266 errno_t pcut_expected_eval = (expected_value); \ 267 errno_t pcut_actual_eval = (actual_value); \ 268 268 if (pcut_expected_eval != pcut_actual_eval) { \ 269 269 char pcut_expected_description[100]; \ -
uspace/lib/pcut/src/os/helenos.c
r36f0738 rb7fd2a0 68 68 } 69 69 70 void pcut_str_error( int error, char *buffer, int size) {70 void pcut_str_error(errno_t error, char *buffer, int size) { 71 71 const char *str = str_error(error); 72 72 if (str == NULL) { … … 130 130 * @return EOK Always. 131 131 */ 132 static int test_timeout_handler_fibril(void *arg) {132 static errno_t test_timeout_handler_fibril(void *arg) { 133 133 pcut_item_t *test = arg; 134 134 int timeout_sec = pcut_get_test_timeout(test); … … 139 139 goto leave_no_kill; 140 140 } 141 int rc = fibril_condvar_wait_timeout(&forced_termination_cv,141 errno_t rc = fibril_condvar_wait_timeout(&forced_termination_cv, 142 142 &forced_termination_mutex, timeout_us); 143 143 if (rc == ETIMEOUT) { … … 160 160 snprintf(tempfile_name, PCUT_TEMP_FILENAME_BUFFER_SIZE - 1, "pcut_%lld.tmp", (unsigned long long) task_get_id()); 161 161 int tempfile; 162 int rc = vfs_lookup_open(tempfile_name, WALK_REGULAR | WALK_MAY_CREATE, MODE_READ | MODE_WRITE, &tempfile);162 errno_t rc = vfs_lookup_open(tempfile_name, WALK_REGULAR | WALK_MAY_CREATE, MODE_READ | MODE_WRITE, &tempfile); 163 163 if (rc != EOK) { 164 164 pcut_report_test_done(test, PCUT_OUTCOME_INTERNAL_ERROR, "Failed to create temporary file.", NULL, NULL); -
uspace/lib/pcut/tests/errno.c
r36f0738 rb7fd2a0 38 38 39 39 PCUT_TEST(errno_value) { 40 int value = EOK;40 errno_t value = EOK; 41 41 PCUT_ASSERT_ERRNO_VAL(EOK, value); 42 42 value = ENOENT;
Note:
See TracChangeset
for help on using the changeset viewer.
