Skip to content

Conversation

@patmaddox
Copy link
Contributor

@patmaddox patmaddox commented Jan 17, 2026

Test plan:

make -C lib/libbe
LD_LIBRARY_PATH=$(make -C lib/libbe -V .OBJDIR) make -C lib/libbe check
CFLAGS="-I$(realpath lib/libbe)" make -C sbin/bectl
PATH=$(make -C sbin/bectl -V .OBJDIR):$PATH LD_LIBRARY_PATH=$(make -C lib/libbe -V .OBJDIR) make -C sbin/bectl check

@bsdimp
Copy link
Member

bsdimp commented Jan 17, 2026

Love this. We're creating these by hand now.

return (set_error(lbh, err));

err = zfs_create(lbh->lzh, buf, ZFS_TYPE_FILESYSTEM, NULL);
return (set_error(lbh, err));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

err needs to be interpreted / mapped to a libbe(3) error here before we pass it to set_error and return it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added be_zfs_create and updated the zfs_create callsites to use it.


libbe_print_on_error(lbh, true);

if (strcmp(argv[2], "empty") == 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting seems off here (should be tab-indents), but maybe that's just GitHub rendering; the file's a littl inconsistent, but I can fix that in a follow-up.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spaces-not-tabs

atf_check -e match:"cannot be combined" -s not-exit:0 \
bectl -r ${zpool}/ROOT create -E -e not-allowed empty-existing
atf_check -e match:"cannot be combined" -s not-exit:0 \
bectl -r ${zpool}/ROOT create -E -r empty-recursive
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of these tests, probably this one, should do something to also confirm that it's actually empty / not related to an existing BE.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added: atf_check -o inline:"-\n" zfs get -H -o value origin ${zpool}/ROOT/empty

@patmaddox patmaddox force-pushed the patmaddox/ynmkvowqnmmt branch from ddbe9a2 to 7f5e04d Compare January 31, 2026 10:50
@patmaddox
Copy link
Contributor Author

Thanks for the feedback @kevans91 , I believe I've addressed all of the points.

@patmaddox patmaddox requested a review from kevans91 January 31, 2026 10:51
@patmaddox patmaddox force-pushed the patmaddox/ynmkvowqnmmt branch 3 times, most recently from 348dd66 to 65f61bd Compare February 1, 2026 07:26
@patmaddox patmaddox force-pushed the patmaddox/ynmkvowqnmmt branch from 65f61bd to b2143b3 Compare February 1, 2026 21:14
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

Successfully merging this pull request may close these issues.

3 participants