builtin-test.c (f373da34282560c60f0c197690eecb1b2dc49fc0) | builtin-test.c (ba3dfff8ad2d98df0c8116faaeb281c93e161636) |
---|---|
1/* 2 * builtin-test.c 3 * 4 * Builtin regression testing command: ever growing number of sanity tests 5 */ 6#include <unistd.h> 7#include <string.h> 8#include "builtin.h" --- 171 unchanged lines hidden (view full) --- 180 } 181 182 return false; 183} 184 185static int run_test(struct test *test) 186{ 187 int status, err = -1, child = fork(); | 1/* 2 * builtin-test.c 3 * 4 * Builtin regression testing command: ever growing number of sanity tests 5 */ 6#include <unistd.h> 7#include <string.h> 8#include "builtin.h" --- 171 unchanged lines hidden (view full) --- 180 } 181 182 return false; 183} 184 185static int run_test(struct test *test) 186{ 187 int status, err = -1, child = fork(); |
188 char sbuf[STRERR_BUFSIZE]; |
|
188 189 if (child < 0) { | 189 190 if (child < 0) { |
190 pr_err("failed to fork test: %s\n", strerror(errno)); | 191 pr_err("failed to fork test: %s\n", 192 strerror_r(errno, sbuf, sizeof(sbuf))); |
191 return -1; 192 } 193 194 if (!child) { 195 pr_debug("test child forked, pid %d\n", getpid()); 196 err = test->func(); 197 exit(err); 198 } --- 109 unchanged lines hidden --- | 193 return -1; 194 } 195 196 if (!child) { 197 pr_debug("test child forked, pid %d\n", getpid()); 198 err = test->func(); 199 exit(err); 200 } --- 109 unchanged lines hidden --- |