Commit 3c1f619e authored by Shuah Khan's avatar Shuah Khan

selftests: capabilities: convert error output to TAP13 ksft framework

Convert errx() and err() usage to appropriate TAP13 ksft API.
Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
parent 0e64f1d7
#include <cap-ng.h>
#include <err.h>
#include <linux/capability.h>
#include <stdbool.h>
#include <string.h>
......@@ -27,8 +26,10 @@ static bool bool_arg(char **argv, int i)
return false;
else if (!strcmp(argv[i], "1"))
return true;
else
errx(1, "wrong argv[%d]", i);
else {
ksft_exit_fail_msg("wrong argv[%d]\n", i);
return false;
}
}
int main(int argc, char **argv)
......@@ -41,7 +42,7 @@ int main(int argc, char **argv)
*/
if (argc != 5)
errx(1, "wrong argc");
ksft_exit_fail_msg("wrong argc\n");
#ifdef HAVE_GETAUXVAL
if (getauxval(AT_SECURE))
......
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