Message ID | 20231119050801.52177-1-angquan21@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | selftests:proc-empty-vm: Remove unused debug write callIn the function test_proc_pid_statm | expand |
diff --git a/tools/testing/selftests/proc/proc-empty-vm.c b/tools/testing/selftests/proc/proc-empty-vm.c index 56198d4ca..74ef8627f 100644 --- a/tools/testing/selftests/proc/proc-empty-vm.c +++ b/tools/testing/selftests/proc/proc-empty-vm.c @@ -382,7 +382,10 @@ static int test_proc_pid_statm(pid_t pid) assert(rv >= 0); assert(rv <= sizeof(buf)); if (0) { - write(1, buf, rv); + ssize_t written = write(1, buf, rv); + if (written == -1) { + perror("write failed /proc/${pid}"); + } } const char *p = buf;