git://git.camperquake.de
/
zfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Disable ztest deadman timer
[zfs.git]
/
cmd
/
ztest
/
ztest.c
diff --git
a/cmd/ztest/ztest.c
b/cmd/ztest/ztest.c
index
65cbbe0
..
7e941b5
100644
(file)
--- a/
cmd/ztest/ztest.c
+++ b/
cmd/ztest/ztest.c
@@
-729,14
+729,17
@@
process_options(int argc, char **argv)
UINT64_MAX >> 2);
if (strlen(altdir) > 0) {
UINT64_MAX >> 2);
if (strlen(altdir) > 0) {
- char
cmd[MAXNAMELEN]
;
- char
realaltdir[MAXNAMELEN]
;
+ char
*cmd
;
+ char
*realaltdir
;
char *bin;
char *ztest;
char *isa;
int isalen;
char *bin;
char *ztest;
char *isa;
int isalen;
- (void) realpath(getexecname(), cmd);
+ cmd = umem_alloc(MAXPATHLEN, UMEM_NOFAIL);
+ realaltdir = umem_alloc(MAXPATHLEN, UMEM_NOFAIL);
+
+ VERIFY(NULL != realpath(getexecname(), cmd));
if (0 != access(altdir, F_OK)) {
ztest_dump_core = B_FALSE;
fatal(B_TRUE, "invalid alternate ztest path: %s",
if (0 != access(altdir, F_OK)) {
ztest_dump_core = B_FALSE;
fatal(B_TRUE, "invalid alternate ztest path: %s",
@@
-767,6
+770,9
@@
process_options(int argc, char **argv)
fatal(B_TRUE, "invalid alternate lib directory %s",
zo->zo_alt_libpath);
}
fatal(B_TRUE, "invalid alternate lib directory %s",
zo->zo_alt_libpath);
}
+
+ umem_free(cmd, MAXPATHLEN);
+ umem_free(realaltdir, MAXPATHLEN);
}
}
}
}
@@
-5283,11
+5289,13
@@
ztest_resume_thread(void *arg)
#define GRACE 300
#define GRACE 300
+#if 0
static void
ztest_deadman_alarm(int sig)
{
fatal(0, "failed to complete within %d seconds of deadline", GRACE);
}
static void
ztest_deadman_alarm(int sig)
{
fatal(0, "failed to complete within %d seconds of deadline", GRACE);
}
+#endif
static void
ztest_execute(int test, ztest_info_t *zi, uint64_t id)
static void
ztest_execute(int test, ztest_info_t *zi, uint64_t id)
@@
-5544,11
+5552,13
@@
ztest_run(ztest_shared_t *zs)
(thread_func_t)ztest_resume_thread, spa, TS_RUN, NULL, 0, 0,
PTHREAD_CREATE_JOINABLE)), !=, NULL);
(thread_func_t)ztest_resume_thread, spa, TS_RUN, NULL, 0, 0,
PTHREAD_CREATE_JOINABLE)), !=, NULL);
+#if 0
/*
* Set a deadman alarm to abort() if we hang.
*/
signal(SIGALRM, ztest_deadman_alarm);
alarm((zs->zs_thread_stop - zs->zs_thread_start) / NANOSEC + GRACE);
/*
* Set a deadman alarm to abort() if we hang.
*/
signal(SIGALRM, ztest_deadman_alarm);
alarm((zs->zs_thread_stop - zs->zs_thread_start) / NANOSEC + GRACE);
+#endif
/*
* Verify that we can safely inquire about about any object,
/*
* Verify that we can safely inquire about about any object,
@@
-5819,11
+5829,11
@@
ztest_init(ztest_shared_t *zs)
static void
setup_data_fd(void)
{
static void
setup_data_fd(void)
{
- char *tmp = tempnam(NULL, NULL);
- ztest_fd_data = open(tmp, O_RDWR | O_CREAT, 0700);
+ static char ztest_name_data[] = "/tmp/ztest.data.XXXXXX";
+
+ ztest_fd_data = mkstemp(ztest_name_data);
ASSERT3S(ztest_fd_data, >=, 0);
ASSERT3S(ztest_fd_data, >=, 0);
- (void) unlink(tmp);
- free(tmp);
+ (void) unlink(ztest_name_data);
}
static int
}
static int
@@
-6030,8
+6040,8
@@
main(int argc, char **argv)
ASSERT3U(ztest_opts.zo_datasets, ==, ztest_shared_hdr->zh_ds_count);
/* Override location of zpool.cache */
ASSERT3U(ztest_opts.zo_datasets, ==, ztest_shared_hdr->zh_ds_count);
/* Override location of zpool.cache */
-
(void)
asprintf((char **)&spa_config_path, "%s/zpool.cache",
- ztest_opts.zo_dir);
+
VERIFY(
asprintf((char **)&spa_config_path, "%s/zpool.cache",
+ ztest_opts.zo_dir)
!= -1)
;
ztest_ds = umem_alloc(ztest_opts.zo_datasets * sizeof (ztest_ds_t),
UMEM_NOFAIL);
ztest_ds = umem_alloc(ztest_opts.zo_datasets * sizeof (ztest_ds_t),
UMEM_NOFAIL);