Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch
This commit is contained in:
commit
f25df40f84
|
@ -4822,11 +4822,15 @@ static void
|
||||||
ztest_run_zdb(char *pool)
|
ztest_run_zdb(char *pool)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
char bin[MAXPATHLEN + MAXNAMELEN + 20];
|
char *bin;
|
||||||
char zdb[MAXPATHLEN + MAXNAMELEN + 20];
|
char *zdb;
|
||||||
char zbuf[1024];
|
char *zbuf;
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
|
|
||||||
|
bin = umem_alloc(MAXPATHLEN + MAXNAMELEN + 20, UMEM_NOFAIL);
|
||||||
|
zdb = umem_alloc(MAXPATHLEN + MAXNAMELEN + 20, UMEM_NOFAIL);
|
||||||
|
zbuf = umem_alloc(1024, UMEM_NOFAIL);
|
||||||
|
|
||||||
/* Designed to be run exclusively in the development tree */
|
/* Designed to be run exclusively in the development tree */
|
||||||
VERIFY(realpath(getexecname(), bin) != NULL);
|
VERIFY(realpath(getexecname(), bin) != NULL);
|
||||||
strstr(bin, "/ztest/")[0] = '\0';
|
strstr(bin, "/ztest/")[0] = '\0';
|
||||||
|
@ -4850,13 +4854,17 @@ ztest_run_zdb(char *pool)
|
||||||
status = pclose(fp);
|
status = pclose(fp);
|
||||||
|
|
||||||
if (status == 0)
|
if (status == 0)
|
||||||
return;
|
goto out;
|
||||||
|
|
||||||
ztest_dump_core = 0;
|
ztest_dump_core = 0;
|
||||||
if (WIFEXITED(status))
|
if (WIFEXITED(status))
|
||||||
fatal(0, "'%s' exit code %d", zdb, WEXITSTATUS(status));
|
fatal(0, "'%s' exit code %d", zdb, WEXITSTATUS(status));
|
||||||
else
|
else
|
||||||
fatal(0, "'%s' died with signal %d", zdb, WTERMSIG(status));
|
fatal(0, "'%s' died with signal %d", zdb, WTERMSIG(status));
|
||||||
|
out:
|
||||||
|
umem_free(bin, MAXPATHLEN + MAXNAMELEN + 20);
|
||||||
|
umem_free(zdb, MAXPATHLEN + MAXNAMELEN + 20);
|
||||||
|
umem_free(zbuf, 1024);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue