Sometimes pr_perror() is used in places that don't have errno set.
In such places, pr_perror() should not be used as it will print
some nonsense.
Introduce and use pr_err() for such cases.
Now, I see sometimes fail() is used in such cases but I think
it is reserved for places where test fails (rather than there is
something that prevents the test from working).
Also, sometimes test_msg() is used but it doesn't print source
file name and line number.
If there will be a need, we can unify pr_err() with say fail(),
it will be easier to do after this patch.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Andrew Vagin <avagin@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Log function pr_perror() automatically adds
- numeric errno value
- string errno value (aka strerror(errno), aka %m)
- a newline
So, its callers don't have to do all these things.
While at it, also
- fix or improve some message texts
- replace fnprintf() with pr_perror()
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Andrew Vagin <avagin@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This test suite contains many small test cases for different subsystems.
Example of execution:
# make busyloop00.pid
# ../../../../crtools -d -t `cat busyloop00.pid`
# kill -9 `cat busyloop00.pid`
# ../../../../crtools -r -t `cat busyloop00.pid`
# cat busyloop00.out
PASS
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>