aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorPaul Dagnelie <[email protected]>2023-09-19 09:02:23 -0700
committerGitHub <[email protected]>2023-09-19 09:02:23 -0700
commit2076011e0c4c2d8ad6a59534a4784a6aa5f4f3df (patch)
tree13f89ab6e99583ac57d7571eb432f0fd9e4fa3e2 /cmd
parent741c215bab32a0a823572769c3560729c78390ea (diff)
Fix incorrect expected error in ztest
There is an occasional ztest failure that looks like ztest: attach (/var/tmp/zloop-run/ztest.13a 570425344, draid1-1-0 532152320, 1) returned 22, expected 95. This is because the value that we return is EINVAL, but expected_error is set incorrectly. Change the expected_error value to match both the comment and the actual error value. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Paul Dagnelie <[email protected]> Closes #15295
Diffstat (limited to 'cmd')
-rw-r--r--cmd/ztest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/ztest.c b/cmd/ztest.c
index 398c519cf..59c4be225 100644
--- a/cmd/ztest.c
+++ b/cmd/ztest.c
@@ -3767,7 +3767,7 @@ ztest_vdev_attach_detach(ztest_ds_t *zd, uint64_t id)
else if (ashift > oldvd->vdev_top->vdev_ashift)
expected_error = EDOM;
else if (newvd_is_dspare && pvd != vdev_draid_spare_get_parent(newvd))
- expected_error = ENOTSUP;
+ expected_error = EINVAL;
else
expected_error = 0;