MFV r316872: 7502 ztest should run zdb with -G (debug mode)
authormav <mav@FreeBSD.org>
Tue, 20 Feb 2018 20:14:11 +0000 (20:14 +0000)
committermav <mav@FreeBSD.org>
Tue, 20 Feb 2018 20:14:11 +0000 (20:14 +0000)
commit292837ab237e2d7104d0059c175c3dec2b414aef
tree4a48cb7c33784565d77843449ea946d731ed78b6
parentd24bd331b30f90eb960fb4f7f07bef79a36afb99
MFV r316872: 7502 ztest should run zdb with -G (debug mode)

illumos/illumos-gate@c3c65d17f7b6689bbd6568a1a1fcc0c4a3bac127
https://github.com/illumos/illumos-gate/commit/c3c65d17f7b6689bbd6568a1a1fcc0c4a3bac127

https://www.illumos.org/issues/7502
  Right now ztest executes zdb without -G, so when it has errors, the messages
  are often not very helpful:
  Executing zdb -bccsv -d -U /rpool/tmp/zpool.cache ztest
  zdb: can't open 'ztest': Operation not supported
  ztest: '/usr/sbin/amd64/zdb -bccsv -d -U /rpool/tmp/zpool.cache ztest' exit
  code 1
  With -G, we'd have:
  /usr/sbin/amd64/zdb -bccsv -d -U /rpool/tmp/zpool.cache -G ztest
  zdb: can't open 'ztest': Operation not supported

  ZFS_DBGMSG(zdb):
  spa_open_common: opening ztest
  spa_load(ztest): LOADING
  spa_load(ztest): FAILED: unable to parse config [error=48]
  spa_load(ztest): UNLOADING
  Which indicates where the error came from

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
Author: Pavel Zakharov <pavel.zakharov@delphix.com>
cddl/contrib/opensolaris/cmd/ztest/ztest.c