ztest.c (240415) | ztest.c (242845) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 107 unchanged lines hidden (view full) --- 116#include <umem.h> 117#include <dlfcn.h> 118#include <ctype.h> 119#include <math.h> 120#include <errno.h> 121#include <sys/fs/zfs.h> 122#include <libnvpair.h> 123 | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 107 unchanged lines hidden (view full) --- 116#include <umem.h> 117#include <dlfcn.h> 118#include <ctype.h> 119#include <math.h> 120#include <errno.h> 121#include <sys/fs/zfs.h> 122#include <libnvpair.h> 123 |
124#define ZTEST_FD_DATA 3 125#define ZTEST_FD_RAND 4 | 124static int ztest_fd_data = -1; 125static int ztest_fd_rand = -1; |
126 127typedef struct ztest_shared_hdr { 128 uint64_t zh_hdr_size; 129 uint64_t zh_opts_size; 130 uint64_t zh_size; 131 uint64_t zh_stats_size; 132 uint64_t zh_stats_count; 133 uint64_t zh_ds_size; --- 571 unchanged lines hidden (view full) --- 705 706 zo->zo_raidz_parity = MIN(zo->zo_raidz_parity, zo->zo_raidz - 1); 707 708 zo->zo_vdevtime = 709 (zo->zo_vdevs > 0 ? zo->zo_time * NANOSEC / zo->zo_vdevs : 710 UINT64_MAX >> 2); 711 712 if (strlen(altdir) > 0) { | 126 127typedef struct ztest_shared_hdr { 128 uint64_t zh_hdr_size; 129 uint64_t zh_opts_size; 130 uint64_t zh_size; 131 uint64_t zh_stats_size; 132 uint64_t zh_stats_count; 133 uint64_t zh_ds_size; --- 571 unchanged lines hidden (view full) --- 705 706 zo->zo_raidz_parity = MIN(zo->zo_raidz_parity, zo->zo_raidz - 1); 707 708 zo->zo_vdevtime = 709 (zo->zo_vdevs > 0 ? zo->zo_time * NANOSEC / zo->zo_vdevs : 710 UINT64_MAX >> 2); 711 712 if (strlen(altdir) > 0) { |
713 char cmd[MAXNAMELEN]; 714 char realaltdir[MAXNAMELEN]; | 713 char *cmd; 714 char *realaltdir; |
715 char *bin; 716 char *ztest; 717 char *isa; 718 int isalen; 719 | 715 char *bin; 716 char *ztest; 717 char *isa; 718 int isalen; 719 |
720 (void) realpath(getexecname(), cmd); | 720 cmd = umem_alloc(MAXPATHLEN, UMEM_NOFAIL); 721 realaltdir = umem_alloc(MAXPATHLEN, UMEM_NOFAIL); 722 723 VERIFY(NULL != realpath(getexecname(), cmd)); |
721 if (0 != access(altdir, F_OK)) { 722 ztest_dump_core = B_FALSE; 723 fatal(B_TRUE, "invalid alternate ztest path: %s", 724 altdir); 725 } 726 VERIFY(NULL != realpath(altdir, realaltdir)); 727 728 /* --- 14 unchanged lines hidden (view full) --- 743 ztest_dump_core = B_FALSE; 744 fatal(B_TRUE, "invalid alternate ztest: %s", 745 zo->zo_alt_ztest); 746 } else if (0 != access(zo->zo_alt_libpath, X_OK)) { 747 ztest_dump_core = B_FALSE; 748 fatal(B_TRUE, "invalid alternate lib directory %s", 749 zo->zo_alt_libpath); 750 } | 724 if (0 != access(altdir, F_OK)) { 725 ztest_dump_core = B_FALSE; 726 fatal(B_TRUE, "invalid alternate ztest path: %s", 727 altdir); 728 } 729 VERIFY(NULL != realpath(altdir, realaltdir)); 730 731 /* --- 14 unchanged lines hidden (view full) --- 746 ztest_dump_core = B_FALSE; 747 fatal(B_TRUE, "invalid alternate ztest: %s", 748 zo->zo_alt_ztest); 749 } else if (0 != access(zo->zo_alt_libpath, X_OK)) { 750 ztest_dump_core = B_FALSE; 751 fatal(B_TRUE, "invalid alternate lib directory %s", 752 zo->zo_alt_libpath); 753 } |
754 755 umem_free(cmd, MAXPATHLEN); 756 umem_free(realaltdir, MAXPATHLEN); |
|
751 } 752} 753 754static void 755ztest_kill(ztest_shared_t *zs) 756{ 757 zs->zs_alloc = metaslab_class_get_alloc(spa_normal_class(ztest_spa)); 758 zs->zs_space = metaslab_class_get_space(spa_normal_class(ztest_spa)); 759 (void) kill(getpid(), SIGKILL); 760} 761 762static uint64_t 763ztest_random(uint64_t range) 764{ 765 uint64_t r; 766 | 757 } 758} 759 760static void 761ztest_kill(ztest_shared_t *zs) 762{ 763 zs->zs_alloc = metaslab_class_get_alloc(spa_normal_class(ztest_spa)); 764 zs->zs_space = metaslab_class_get_space(spa_normal_class(ztest_spa)); 765 (void) kill(getpid(), SIGKILL); 766} 767 768static uint64_t 769ztest_random(uint64_t range) 770{ 771 uint64_t r; 772 |
773 ASSERT3S(ztest_fd_rand, >=, 0); 774 |
|
767 if (range == 0) 768 return (0); 769 | 775 if (range == 0) 776 return (0); 777 |
770 if (read(ZTEST_FD_RAND, &r, sizeof (r)) != sizeof (r)) | 778 if (read(ztest_fd_rand, &r, sizeof (r)) != sizeof (r)) |
771 fatal(1, "short read from /dev/urandom"); 772 773 return (r % range); 774} 775 776/* ARGSUSED */ 777static void 778ztest_record_enospc(const char *s) --- 3919 unchanged lines hidden (view full) --- 4698 if (islog) 4699 (void) rw_wrlock(&ztest_name_lock); 4700 4701 VERIFY(vdev_offline(spa, guid0, flags) != EBUSY); 4702 4703 if (islog) 4704 (void) rw_unlock(&ztest_name_lock); 4705 } else { | 779 fatal(1, "short read from /dev/urandom"); 780 781 return (r % range); 782} 783 784/* ARGSUSED */ 785static void 786ztest_record_enospc(const char *s) --- 3919 unchanged lines hidden (view full) --- 4706 if (islog) 4707 (void) rw_wrlock(&ztest_name_lock); 4708 4709 VERIFY(vdev_offline(spa, guid0, flags) != EBUSY); 4710 4711 if (islog) 4712 (void) rw_unlock(&ztest_name_lock); 4713 } else { |
4714 /* 4715 * Ideally we would like to be able to randomly 4716 * call vdev_[on|off]line without holding locks 4717 * to force unpredictable failures but the side 4718 * effects of vdev_[on|off]line prevent us from 4719 * doing so. We grab the ztest_vdev_lock here to 4720 * prevent a race between injection testing and 4721 * aux_vdev removal. 4722 */ 4723 VERIFY(mutex_lock(&ztest_vdev_lock) == 0); |
|
4706 (void) vdev_online(spa, guid0, 0, NULL); | 4724 (void) vdev_online(spa, guid0, 0, NULL); |
4725 VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); |
|
4707 } 4708 } 4709 4710 if (maxfaults == 0) 4711 return; 4712 4713 /* 4714 * We have at least single-fault tolerance, so inject data corruption. --- 940 unchanged lines hidden (view full) --- 5655 5656 ztest_run_zdb(ztest_opts.zo_pool); 5657 5658 (void) rwlock_destroy(&ztest_name_lock); 5659 (void) _mutex_destroy(&ztest_vdev_lock); 5660} 5661 5662static void | 4726 } 4727 } 4728 4729 if (maxfaults == 0) 4730 return; 4731 4732 /* 4733 * We have at least single-fault tolerance, so inject data corruption. --- 940 unchanged lines hidden (view full) --- 5674 5675 ztest_run_zdb(ztest_opts.zo_pool); 5676 5677 (void) rwlock_destroy(&ztest_name_lock); 5678 (void) _mutex_destroy(&ztest_vdev_lock); 5679} 5680 5681static void |
5663setup_fds(void) | 5682setup_data_fd(void) |
5664{ | 5683{ |
5665 int fd; 5666#ifdef illumos | 5684 static char ztest_name_data[] = "/tmp/ztest.data.XXXXXX"; |
5667 | 5685 |
5668 char *tmp = tempnam(NULL, NULL); 5669 fd = open(tmp, O_RDWR | O_CREAT, 0700); 5670 ASSERT3U(fd, ==, ZTEST_FD_DATA); 5671 (void) unlink(tmp); 5672 free(tmp); 5673#else 5674 char tmp[MAXPATHLEN]; 5675 5676 strlcpy(tmp, ztest_opts.zo_dir, MAXPATHLEN); 5677 strlcat(tmp, "/ztest.XXXXXX", MAXPATHLEN); 5678 fd = mkstemp(tmp); 5679 ASSERT3U(fd, ==, ZTEST_FD_DATA); 5680#endif 5681 5682 fd = open("/dev/urandom", O_RDONLY); 5683 ASSERT3U(fd, ==, ZTEST_FD_RAND); | 5686 ztest_fd_data = mkstemp(ztest_name_data); 5687 ASSERT3S(ztest_fd_data, >=, 0); 5688 (void) unlink(ztest_name_data); |
5684} 5685 | 5689} 5690 |
5691 |
|
5686static int 5687shared_data_size(ztest_shared_hdr_t *hdr) 5688{ 5689 int size; 5690 5691 size = hdr->zh_hdr_size; 5692 size += hdr->zh_opts_size; 5693 size += hdr->zh_size; --- 4 unchanged lines hidden (view full) --- 5698} 5699 5700static void 5701setup_hdr(void) 5702{ 5703 int size; 5704 ztest_shared_hdr_t *hdr; 5705 | 5692static int 5693shared_data_size(ztest_shared_hdr_t *hdr) 5694{ 5695 int size; 5696 5697 size = hdr->zh_hdr_size; 5698 size += hdr->zh_opts_size; 5699 size += hdr->zh_size; --- 4 unchanged lines hidden (view full) --- 5704} 5705 5706static void 5707setup_hdr(void) 5708{ 5709 int size; 5710 ztest_shared_hdr_t *hdr; 5711 |
5706#ifndef illumos 5707 pwrite(ZTEST_FD_DATA, "", 1, 0); 5708#endif 5709 | |
5710 hdr = (void *)mmap(0, P2ROUNDUP(sizeof (*hdr), getpagesize()), | 5712 hdr = (void *)mmap(0, P2ROUNDUP(sizeof (*hdr), getpagesize()), |
5711 PROT_READ | PROT_WRITE, MAP_SHARED, ZTEST_FD_DATA, 0); | 5713 PROT_READ | PROT_WRITE, MAP_SHARED, ztest_fd_data, 0); |
5712 ASSERT(hdr != MAP_FAILED); 5713 | 5714 ASSERT(hdr != MAP_FAILED); 5715 |
5714 VERIFY3U(0, ==, ftruncate(ZTEST_FD_DATA, sizeof (ztest_shared_hdr_t))); | 5716 VERIFY3U(0, ==, ftruncate(ztest_fd_data, sizeof (ztest_shared_hdr_t))); |
5715 5716 hdr->zh_hdr_size = sizeof (ztest_shared_hdr_t); 5717 hdr->zh_opts_size = sizeof (ztest_shared_opts_t); 5718 hdr->zh_size = sizeof (ztest_shared_t); 5719 hdr->zh_stats_size = sizeof (ztest_shared_callstate_t); 5720 hdr->zh_stats_count = ZTEST_FUNCS; 5721 hdr->zh_ds_size = sizeof (ztest_shared_ds_t); 5722 hdr->zh_ds_count = ztest_opts.zo_datasets; 5723 5724 size = shared_data_size(hdr); | 5717 5718 hdr->zh_hdr_size = sizeof (ztest_shared_hdr_t); 5719 hdr->zh_opts_size = sizeof (ztest_shared_opts_t); 5720 hdr->zh_size = sizeof (ztest_shared_t); 5721 hdr->zh_stats_size = sizeof (ztest_shared_callstate_t); 5722 hdr->zh_stats_count = ZTEST_FUNCS; 5723 hdr->zh_ds_size = sizeof (ztest_shared_ds_t); 5724 hdr->zh_ds_count = ztest_opts.zo_datasets; 5725 5726 size = shared_data_size(hdr); |
5725 VERIFY3U(0, ==, ftruncate(ZTEST_FD_DATA, size)); | 5727 VERIFY3U(0, ==, ftruncate(ztest_fd_data, size)); |
5726 5727 (void) munmap((caddr_t)hdr, P2ROUNDUP(sizeof (*hdr), getpagesize())); 5728} 5729 5730static void 5731setup_data(void) 5732{ 5733 int size, offset; 5734 ztest_shared_hdr_t *hdr; 5735 uint8_t *buf; 5736 5737 hdr = (void *)mmap(0, P2ROUNDUP(sizeof (*hdr), getpagesize()), | 5728 5729 (void) munmap((caddr_t)hdr, P2ROUNDUP(sizeof (*hdr), getpagesize())); 5730} 5731 5732static void 5733setup_data(void) 5734{ 5735 int size, offset; 5736 ztest_shared_hdr_t *hdr; 5737 uint8_t *buf; 5738 5739 hdr = (void *)mmap(0, P2ROUNDUP(sizeof (*hdr), getpagesize()), |
5738 PROT_READ, MAP_SHARED, ZTEST_FD_DATA, 0); | 5740 PROT_READ, MAP_SHARED, ztest_fd_data, 0); |
5739 ASSERT(hdr != MAP_FAILED); 5740 5741 size = shared_data_size(hdr); 5742 5743 (void) munmap((caddr_t)hdr, P2ROUNDUP(sizeof (*hdr), getpagesize())); 5744 hdr = ztest_shared_hdr = (void *)mmap(0, P2ROUNDUP(size, getpagesize()), | 5741 ASSERT(hdr != MAP_FAILED); 5742 5743 size = shared_data_size(hdr); 5744 5745 (void) munmap((caddr_t)hdr, P2ROUNDUP(sizeof (*hdr), getpagesize())); 5746 hdr = ztest_shared_hdr = (void *)mmap(0, P2ROUNDUP(size, getpagesize()), |
5745 PROT_READ | PROT_WRITE, MAP_SHARED, ZTEST_FD_DATA, 0); | 5747 PROT_READ | PROT_WRITE, MAP_SHARED, ztest_fd_data, 0); |
5746 ASSERT(hdr != MAP_FAILED); 5747 buf = (uint8_t *)hdr; 5748 5749 offset = hdr->zh_hdr_size; 5750 ztest_shared_opts = (void *)&buf[offset]; 5751 offset += hdr->zh_opts_size; 5752 ztest_shared = (void *)&buf[offset]; 5753 offset += hdr->zh_size; 5754 ztest_shared_callstate = (void *)&buf[offset]; 5755 offset += hdr->zh_stats_size * hdr->zh_stats_count; 5756 ztest_shared_ds = (void *)&buf[offset]; 5757} 5758 5759static boolean_t 5760exec_child(char *cmd, char *libpath, boolean_t ignorekill, int *statusp) 5761{ 5762 pid_t pid; 5763 int status; | 5748 ASSERT(hdr != MAP_FAILED); 5749 buf = (uint8_t *)hdr; 5750 5751 offset = hdr->zh_hdr_size; 5752 ztest_shared_opts = (void *)&buf[offset]; 5753 offset += hdr->zh_opts_size; 5754 ztest_shared = (void *)&buf[offset]; 5755 offset += hdr->zh_size; 5756 ztest_shared_callstate = (void *)&buf[offset]; 5757 offset += hdr->zh_stats_size * hdr->zh_stats_count; 5758 ztest_shared_ds = (void *)&buf[offset]; 5759} 5760 5761static boolean_t 5762exec_child(char *cmd, char *libpath, boolean_t ignorekill, int *statusp) 5763{ 5764 pid_t pid; 5765 int status; |
5764 char cmdbuf[MAXPATHLEN]; | 5766 char *cmdbuf = NULL; |
5765 5766 pid = fork(); 5767 5768 if (cmd == NULL) { | 5767 5768 pid = fork(); 5769 5770 if (cmd == NULL) { |
5769 (void) strlcpy(cmdbuf, getexecname(), sizeof (cmdbuf)); | 5771 cmdbuf = umem_alloc(MAXPATHLEN, UMEM_NOFAIL); 5772 (void) strlcpy(cmdbuf, getexecname(), MAXPATHLEN); |
5770 cmd = cmdbuf; 5771 } 5772 5773 if (pid == -1) 5774 fatal(1, "fork failed"); 5775 5776 if (pid == 0) { /* child */ 5777 char *emptyargv[2] = { cmd, NULL }; | 5773 cmd = cmdbuf; 5774 } 5775 5776 if (pid == -1) 5777 fatal(1, "fork failed"); 5778 5779 if (pid == 0) { /* child */ 5780 char *emptyargv[2] = { cmd, NULL }; |
5781 char fd_data_str[12]; |
|
5778 5779 struct rlimit rl = { 1024, 1024 }; 5780 (void) setrlimit(RLIMIT_NOFILE, &rl); | 5782 5783 struct rlimit rl = { 1024, 1024 }; 5784 (void) setrlimit(RLIMIT_NOFILE, &rl); |
5785 5786 (void) close(ztest_fd_rand); 5787 VERIFY3U(11, >=, 5788 snprintf(fd_data_str, 12, "%d", ztest_fd_data)); 5789 VERIFY0(setenv("ZTEST_FD_DATA", fd_data_str, 1)); 5790 |
|
5781 (void) enable_extended_FILE_stdio(-1, -1); 5782 if (libpath != NULL) 5783 VERIFY(0 == setenv("LD_LIBRARY_PATH", libpath, 1)); 5784#ifdef illumos 5785 (void) execv(cmd, emptyargv); 5786#else 5787 (void) execvp(cmd, emptyargv); 5788#endif 5789 ztest_dump_core = B_FALSE; 5790 fatal(B_TRUE, "exec failed: %s", cmd); 5791 } 5792 | 5791 (void) enable_extended_FILE_stdio(-1, -1); 5792 if (libpath != NULL) 5793 VERIFY(0 == setenv("LD_LIBRARY_PATH", libpath, 1)); 5794#ifdef illumos 5795 (void) execv(cmd, emptyargv); 5796#else 5797 (void) execvp(cmd, emptyargv); 5798#endif 5799 ztest_dump_core = B_FALSE; 5800 fatal(B_TRUE, "exec failed: %s", cmd); 5801 } 5802 |
5803 if (cmdbuf != NULL) { 5804 umem_free(cmdbuf, MAXPATHLEN); 5805 cmd = NULL; 5806 } 5807 |
|
5793 while (waitpid(pid, &status, 0) != pid) 5794 continue; 5795 if (statusp != NULL) 5796 *statusp = status; 5797 5798 if (WIFEXITED(status)) { 5799 if (WEXITSTATUS(status) != 0) { 5800 (void) fprintf(stderr, "child exited with code %d\n", --- 48 unchanged lines hidden (view full) --- 5849 int older = 0; 5850 int newer = 0; 5851 ztest_shared_t *zs; 5852 ztest_info_t *zi; 5853 ztest_shared_callstate_t *zc; 5854 char timebuf[100]; 5855 char numbuf[6]; 5856 spa_t *spa; | 5808 while (waitpid(pid, &status, 0) != pid) 5809 continue; 5810 if (statusp != NULL) 5811 *statusp = status; 5812 5813 if (WIFEXITED(status)) { 5814 if (WEXITSTATUS(status) != 0) { 5815 (void) fprintf(stderr, "child exited with code %d\n", --- 48 unchanged lines hidden (view full) --- 5864 int older = 0; 5865 int newer = 0; 5866 ztest_shared_t *zs; 5867 ztest_info_t *zi; 5868 ztest_shared_callstate_t *zc; 5869 char timebuf[100]; 5870 char numbuf[6]; 5871 spa_t *spa; |
5857 char cmd[MAXNAMELEN]; | 5872 char *cmd; |
5858 boolean_t hasalt; | 5873 boolean_t hasalt; |
5874 char *fd_data_str = getenv("ZTEST_FD_DATA"); |
|
5859 | 5875 |
5860 boolean_t ischild = (0 == lseek(ZTEST_FD_DATA, 0, SEEK_CUR)); 5861 ASSERT(ischild || errno == EBADF); 5862 | |
5863 (void) setvbuf(stdout, NULL, _IOLBF, 0); 5864 5865 dprintf_setup(&argc, argv); 5866 | 5876 (void) setvbuf(stdout, NULL, _IOLBF, 0); 5877 5878 dprintf_setup(&argc, argv); 5879 |
5867 if (!ischild) { | 5880 ztest_fd_rand = open("/dev/urandom", O_RDONLY); 5881 ASSERT3S(ztest_fd_rand, >=, 0); 5882 5883 if (!fd_data_str) { |
5868 process_options(argc, argv); 5869 | 5884 process_options(argc, argv); 5885 |
5870 setup_fds(); | 5886 setup_data_fd(); |
5871 setup_hdr(); 5872 setup_data(); 5873 bcopy(&ztest_opts, ztest_shared_opts, 5874 sizeof (*ztest_shared_opts)); 5875 } else { | 5887 setup_hdr(); 5888 setup_data(); 5889 bcopy(&ztest_opts, ztest_shared_opts, 5890 sizeof (*ztest_shared_opts)); 5891 } else { |
5892 ztest_fd_data = atoi(fd_data_str); |
|
5876 setup_data(); 5877 bcopy(ztest_shared_opts, &ztest_opts, sizeof (ztest_opts)); 5878 } 5879 ASSERT3U(ztest_opts.zo_datasets, ==, ztest_shared_hdr->zh_ds_count); 5880 5881 /* Override location of zpool.cache */ | 5893 setup_data(); 5894 bcopy(ztest_shared_opts, &ztest_opts, sizeof (ztest_opts)); 5895 } 5896 ASSERT3U(ztest_opts.zo_datasets, ==, ztest_shared_hdr->zh_ds_count); 5897 5898 /* Override location of zpool.cache */ |
5882 (void) asprintf((char **)&spa_config_path, "%s/zpool.cache", 5883 ztest_opts.zo_dir); | 5899 VERIFY3U(asprintf((char **)&spa_config_path, "%s/zpool.cache", 5900 ztest_opts.zo_dir), !=, -1); |
5884 5885 ztest_ds = umem_alloc(ztest_opts.zo_datasets * sizeof (ztest_ds_t), 5886 UMEM_NOFAIL); 5887 zs = ztest_shared; 5888 | 5901 5902 ztest_ds = umem_alloc(ztest_opts.zo_datasets * sizeof (ztest_ds_t), 5903 UMEM_NOFAIL); 5904 zs = ztest_shared; 5905 |
5889 if (ischild) { | 5906 if (fd_data_str) { |
5890 metaslab_gang_bang = ztest_opts.zo_metaslab_gang_bang; 5891 metaslab_df_alloc_threshold = 5892 zs->zs_metaslab_df_alloc_threshold; 5893 5894 if (zs->zs_do_init) 5895 ztest_run_init(); 5896 else 5897 ztest_run(zs); --- 6 unchanged lines hidden (view full) --- 5904 (void) printf("%llu vdevs, %d datasets, %d threads," 5905 " %llu seconds...\n", 5906 (u_longlong_t)ztest_opts.zo_vdevs, 5907 ztest_opts.zo_datasets, 5908 ztest_opts.zo_threads, 5909 (u_longlong_t)ztest_opts.zo_time); 5910 } 5911 | 5907 metaslab_gang_bang = ztest_opts.zo_metaslab_gang_bang; 5908 metaslab_df_alloc_threshold = 5909 zs->zs_metaslab_df_alloc_threshold; 5910 5911 if (zs->zs_do_init) 5912 ztest_run_init(); 5913 else 5914 ztest_run(zs); --- 6 unchanged lines hidden (view full) --- 5921 (void) printf("%llu vdevs, %d datasets, %d threads," 5922 " %llu seconds...\n", 5923 (u_longlong_t)ztest_opts.zo_vdevs, 5924 ztest_opts.zo_datasets, 5925 ztest_opts.zo_threads, 5926 (u_longlong_t)ztest_opts.zo_time); 5927 } 5928 |
5912 (void) strlcpy(cmd, getexecname(), sizeof (cmd)); | 5929 cmd = umem_alloc(MAXNAMELEN, UMEM_NOFAIL); 5930 (void) strlcpy(cmd, getexecname(), MAXNAMELEN); |
5913 5914 zs->zs_do_init = B_TRUE; 5915 if (strlen(ztest_opts.zo_alt_ztest) != 0) { 5916 if (ztest_opts.zo_verbose >= 1) { 5917 (void) printf("Executing older ztest for " 5918 "initialization: %s\n", ztest_opts.zo_alt_ztest); 5919 } 5920 VERIFY(!exec_child(ztest_opts.zo_alt_ztest, --- 124 unchanged lines hidden (view full) --- 6045 ztest_opts.zo_alt_ztest); 6046 (void) printf("%d runs of newer ztest: %s\n", newer, 6047 cmd); 6048 } 6049 (void) printf("%d killed, %d completed, %.0f%% kill rate\n", 6050 kills, iters - kills, (100.0 * kills) / MAX(1, iters)); 6051 } 6052 | 5931 5932 zs->zs_do_init = B_TRUE; 5933 if (strlen(ztest_opts.zo_alt_ztest) != 0) { 5934 if (ztest_opts.zo_verbose >= 1) { 5935 (void) printf("Executing older ztest for " 5936 "initialization: %s\n", ztest_opts.zo_alt_ztest); 5937 } 5938 VERIFY(!exec_child(ztest_opts.zo_alt_ztest, --- 124 unchanged lines hidden (view full) --- 6063 ztest_opts.zo_alt_ztest); 6064 (void) printf("%d runs of newer ztest: %s\n", newer, 6065 cmd); 6066 } 6067 (void) printf("%d killed, %d completed, %.0f%% kill rate\n", 6068 kills, iters - kills, (100.0 * kills) / MAX(1, iters)); 6069 } 6070 |
6071 umem_free(cmd, MAXNAMELEN); 6072 |
|
6053 return (0); 6054} | 6073 return (0); 6074} |