Commit 4d1c3f98 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov

test/zdtm: use pr_err() not pr_perror

In places where we are not supposed to print errno, or where
we already print in explicitly, use pr_err().

travis-ci: success for more pr_perror() usage fixes
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent bdf60512
...@@ -638,7 +638,7 @@ static int reap_child(struct autofs_params *p) ...@@ -638,7 +638,7 @@ static int reap_child(struct autofs_params *p)
} }
if (WIFSIGNALED(status)) { if (WIFSIGNALED(status)) {
pr_perror("Kid was killed by %d\n", WTERMSIG(status)); pr_err("Child was killed by %d\n", WTERMSIG(status));
return -1; return -1;
} }
......
...@@ -34,13 +34,13 @@ static int kcmp(int type, pid_t pid1, pid_t pid2, unsigned long idx1, unsigned l ...@@ -34,13 +34,13 @@ static int kcmp(int type, pid_t pid1, pid_t pid2, unsigned long idx1, unsigned l
test_msg("FS for pids %d and %d doesn't match: %d\n", pid1, pid2, ret); test_msg("FS for pids %d and %d doesn't match: %d\n", pid1, pid2, ret);
break; break;
case -1: case -1:
pr_perror("kcmp (type: %d, pid1: %d, pid2: %d, " pr_err("kcmp (type: %d, pid1: %d, pid2: %d, "
"idx1: %ld, idx2: %ld) failed: %d\n", "idx1: %ld, idx2: %ld) failed: %d\n",
type, pid1, pid2, idx1, idx2, errno); type, pid1, pid2, idx1, idx2, errno);
break; break;
default: default:
pr_perror("kcmp (type: %d, pid1: %d, pid2: %d, " pr_err("kcmp (type: %d, pid1: %d, pid2: %d, "
"idx1: %ld, idx2: %ld) returned %d\n\n", "idx1: %ld, idx2: %ld) returned %d\n",
type, pid1, pid2, idx1, idx2, ret); type, pid1, pid2, idx1, idx2, ret);
break; break;
} }
......
...@@ -107,7 +107,7 @@ int main(int argc, char **argv) ...@@ -107,7 +107,7 @@ int main(int argc, char **argv)
} }
if (status) { if (status) {
pr_perror("%d/%d/%d/%d", WIFEXITED(status), WEXITSTATUS(status), WIFSIGNALED(status), WTERMSIG(status)); pr_err("%d/%d/%d/%d\n", WIFEXITED(status), WEXITSTATUS(status), WIFSIGNALED(status), WTERMSIG(status));
return 1; return 1;
} }
} }
......
...@@ -134,7 +134,7 @@ int main(int argc, char ** argv) ...@@ -134,7 +134,7 @@ int main(int argc, char ** argv)
} }
if (WTERMSIG(status) != SIGSYS) { if (WTERMSIG(status) != SIGSYS) {
pr_perror("expected SIGSYS, got %d\n", WTERMSIG(status)); pr_err("expected SIGSYS, got %d\n", WTERMSIG(status));
_exit(1); _exit(1);
} }
......
...@@ -190,7 +190,7 @@ int main(int argc, char ** argv) ...@@ -190,7 +190,7 @@ int main(int argc, char ** argv)
} }
if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
pr_perror("expected 0 exit, got %d\n", WEXITSTATUS(status)); pr_err("expected 0 exit, got %d\n", WEXITSTATUS(status));
exit(1); exit(1);
} }
......
...@@ -62,7 +62,7 @@ int main(int argc, char **argv) ...@@ -62,7 +62,7 @@ int main(int argc, char **argv)
status = -1; status = -1;
waitpid(pid, &status, 0); waitpid(pid, &status, 0);
if (status) { if (status) {
pr_perror("The child return non-zero code: %d\n", status); pr_err("The child return non-zero code: %d\n", status);
return 1; return 1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment