Changeset 9eb1ff5 in mainline for uspace/lib/pcut/src/os/helenos.c
- Timestamp:
- 2017-12-08T14:47:08Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c1694b6b
- Parents:
- 6fb8b2c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/pcut/src/os/helenos.c
r6fb8b2c r9eb1ff5 154 154 * @param test Test to be run. 155 155 */ 156 voidpcut_run_test_forking(const char *self_path, pcut_item_t *test) {156 int pcut_run_test_forking(const char *self_path, pcut_item_t *test) { 157 157 before_test_start(test); 158 158 … … 161 161 int tempfile = vfs_lookup_open(tempfile_name, WALK_REGULAR | WALK_MAY_CREATE, MODE_READ | MODE_WRITE); 162 162 if (tempfile < 0) { 163 pcut_report_test_done(test, TEST_OUTCOME_ERROR, "Failed to create temporary file.", NULL, NULL);164 return ;163 pcut_report_test_done(test, PCUT_OUTCOME_INTERNAL_ERROR, "Failed to create temporary file.", NULL, NULL); 164 return PCUT_OUTCOME_INTERNAL_ERROR; 165 165 } 166 166 … … 174 174 }; 175 175 176 int status = TEST_OUTCOME_PASS;176 int status = PCUT_OUTCOME_PASS; 177 177 178 178 task_wait_t test_task_wait; … … 180 180 fileno(stdin), tempfile, tempfile); 181 181 if (rc != EOK) { 182 status = TEST_OUTCOME_ERROR;182 status = PCUT_OUTCOME_INTERNAL_ERROR; 183 183 goto leave_close_tempfile; 184 184 } … … 198 198 rc = task_wait(&test_task_wait, &task_exit, &task_retval); 199 199 if (rc != EOK) { 200 status = TEST_OUTCOME_ERROR;200 status = PCUT_OUTCOME_INTERNAL_ERROR; 201 201 goto leave_close_tempfile; 202 202 } 203 203 if (task_exit == TASK_EXIT_UNEXPECTED) { 204 status = TEST_OUTCOME_ERROR;204 status = PCUT_OUTCOME_INTERNAL_ERROR; 205 205 } else { 206 status = task_retval == 0 ? TEST_OUTCOME_PASS : TEST_OUTCOME_FAIL;206 status = task_retval == 0 ? PCUT_OUTCOME_PASS : PCUT_OUTCOME_FAIL; 207 207 } 208 208 … … 221 221 222 222 pcut_report_test_done_unparsed(test, status, extra_output_buffer, OUTPUT_BUFFER_SIZE); 223 224 return status; 223 225 } 224 226
Note:
See TracChangeset
for help on using the changeset viewer.