* fail because (a) harder to fix and (b) nobody really cares.
* Flag them as expected failure for now.
*/
+ ksft_print_msg("Leak from parent into child\n");
log_test_result(KSFT_XFAIL);
} else {
+ ksft_print_msg("Leak from parent into child\n");
log_test_result(KSFT_FAIL);
}
close_comm_pipes:
* fail because (a) harder to fix and (b) nobody really cares.
* Flag them as expected failure for now.
*/
+ ksft_print_msg("Leak from child into parent\n");
log_test_result(KSFT_XFAIL);
} else {
+ ksft_print_msg("Leak from child into parent\n");
log_test_result(KSFT_FAIL);
}
close_pipe:
}
/* Finally, check if we read what we expected. */
- if (!memcmp(mem, tmp, size))
+ if (!memcmp(mem, tmp, size)) {
log_test_result(KSFT_PASS);
- else
+ } else {
+ ksft_print_msg("Longtom R/W pin is not reliable\n");
log_test_result(KSFT_FAIL);
+ }
quit_child:
if (use_fork) {
ksft_perror("PIN_LONGTERM_TEST_READ failed");
log_test_result(KSFT_FAIL);
} else {
- if (!memcmp(mem, tmp, size))
+ if (!memcmp(mem, tmp, size)) {
log_test_result(KSFT_PASS);
- else
+ } else {
+ ksft_print_msg("Longterm R/O pin is not reliable\n");
log_test_result(KSFT_FAIL);
+ }
}
ret = ioctl(gup_fd, PIN_LONGTERM_TEST_STOP);
else
ret = -EINVAL;
- if (!ret)
+ if (!ret) {
log_test_result(KSFT_PASS);
- else
+ } else {
+ ksft_print_msg("Leak from parent into child\n");
log_test_result(KSFT_FAIL);
+ }
close_comm_pipes:
close_comm_pipes(&comm_pipes);
}
memset(mem, 0xff, size);
/* See if we still read the old values via the other mapping. */
- if (!memcmp(smem, old, size))
+ if (!memcmp(smem, old, size)) {
log_test_result(KSFT_PASS);
- else
+ } else {
+ ksft_print_msg("Other mapping modified\n");
log_test_result(KSFT_FAIL);
+ }
free(old);
}