Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ztest -f option doesn't work #49

Closed
wizeman opened this issue Aug 11, 2010 · 2 comments
Closed

ztest -f option doesn't work #49

wizeman opened this issue Aug 11, 2010 · 2 comments

Comments

@wizeman
Copy link

wizeman commented Aug 11, 2010

In the Linux ZFS tree, we have this code in ztest_run_zdb():

4910         (void) sprintf(zdb,
4911             "%s/zdb/zdb -bcc%s%s -U /tmp/zpool.cache %s",
4912             bin,
4913             zopt_verbose >= 3 ? "s" : "",
4914             zopt_verbose >= 4 ? "v" : "",
4915             pool);

But in OpenSolaris, the code looks like this:

4754         (void) sprintf(bin,
4755             "/usr/sbin%.*s/zdb -bcc%s%s -U %s %s",
4756             isalen,
4757             isa,
4758             zopt_verbose >= 3 ? "s" : "",
4759             zopt_verbose >= 4 ? "v" : "",
4760             spa_config_path,
4761             pool);

As you can see, in the Linux repo, ztest calls zdb using a hardcoded path to /tmp/zpool.cache.

This makes it impossible to use the "-f" option of ztest, which is used for creating the test pool in a directory different than /tmp.

@behlendorf
Copy link
Contributor

Thanks, I'll fix this up tomorrow. I'm sure I just didn't catch this when I did the last rebase to onnv_141. This code already needed to be fixed up once for Linux to remove the /usr/sbin/ part so ztest can run in-tree.

@behlendorf
Copy link
Contributor

Honor spa_config_path for ztest '-f' option

The new spa_config_path string was lost from ztest_run_zdb() during
the onnv_141 merge. This commit puts it back in place so the '-f'
option is properly honored.

Additionally this function had been tweaked so ztest could be run
in-tree but that broke running it when installed as a package. I've
updated that chunk to detect where it's running and try to do the
right thing in both cases.

Closed by d24fbed

akatrevorjay added a commit to akatrevorjay/zfs that referenced this issue Dec 16, 2017
# This is the 1st commit message:
Merge branch 'master' of https://github.com/zfsonlinux/zfs

* 'master' of https://github.com/zfsonlinux/zfs:
  Enable QAT support in zfs-dkms RPM

# This is the commit message openzfs#2:

Import 0.6.5.7-0ubuntu3

# This is the commit message openzfs#3:

gbp changes

# This is the commit message openzfs#4:

Bump ver

# This is the commit message openzfs#5:

-j9 baby

# This is the commit message openzfs#6:

Up

# This is the commit message openzfs#7:

Yup

# This is the commit message openzfs#8:

Add new module

# This is the commit message openzfs#9:

Up

# This is the commit message openzfs#10:

Up

# This is the commit message openzfs#11:

Bump

# This is the commit message openzfs#12:

Grr

# This is the commit message openzfs#13:

Yay

# This is the commit message openzfs#14:

Yay

# This is the commit message openzfs#15:

Yay

# This is the commit message openzfs#16:

Yay

# This is the commit message openzfs#17:

Yay

# This is the commit message openzfs#18:

Yay

# This is the commit message openzfs#19:

yay

# This is the commit message openzfs#20:

yay

# This is the commit message openzfs#21:

yay

# This is the commit message openzfs#22:

Update ppa script

# This is the commit message openzfs#23:

Update gbp conf with br changes

# This is the commit message openzfs#24:

Update gbp conf with br changes

# This is the commit message openzfs#25:

Bump

# This is the commit message openzfs#26:

No pristine

# This is the commit message openzfs#27:

Bump

# This is the commit message openzfs#28:

Lol whoops

# This is the commit message openzfs#29:

Fix name

# This is the commit message openzfs#30:

Fix name

# This is the commit message openzfs#31:

rebase

# This is the commit message openzfs#32:

Bump

# This is the commit message openzfs#33:

Bump

# This is the commit message openzfs#34:

Bump

# This is the commit message openzfs#35:

Bump

# This is the commit message openzfs#36:

ntrim

# This is the commit message openzfs#37:

Bump

# This is the commit message openzfs#38:

9

# This is the commit message openzfs#39:

Bump

# This is the commit message openzfs#40:

Bump

# This is the commit message openzfs#41:

Bump

# This is the commit message openzfs#42:

Revert "9"

This reverts commit de488f1.

# This is the commit message openzfs#43:

Bump

# This is the commit message openzfs#44:

Account for zconfig.sh being removed

# This is the commit message openzfs#45:

Bump

# This is the commit message openzfs#46:

Add artful

# This is the commit message openzfs#47:

Add in zed.d and zpool.d scripts

# This is the commit message openzfs#48:

Bump

# This is the commit message openzfs#49:

Bump

# This is the commit message openzfs#50:

Bump

# This is the commit message openzfs#51:

Bump

# This is the commit message openzfs#52:

ugh

# This is the commit message openzfs#53:

fix zed upgrade

# This is the commit message openzfs#54:

Bump

# This is the commit message openzfs#55:

conf file zed.d

# This is the commit message #56:

Bump
sdimitro pushed a commit to sdimitro/zfs that referenced this issue Dec 7, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants