All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] btrfs-progs: fix the return value of "btrfs subvolume create"
@ 2024-01-10  8:36 Qu Wenruo
  2024-01-10  8:36 ` [PATCH v2 1/2] btrfs-progs: cmd/subvolume: fix return value when the target exists Qu Wenruo
  2024-01-10  8:36 ` [PATCH v2 2/2] btrfs-progs: cli-tests: add test case for return value of "btrfs subvlume create" Qu Wenruo
  0 siblings, 2 replies; 3+ messages in thread
From: Qu Wenruo @ 2024-01-10  8:36 UTC (permalink / raw)
  To: linux-btrfs

[CHANGELOG]
v2:
- Fix the missing "f" for the subject of the first patch
- Add the missing unmount of the test case

There is a bug report ("https://github.com/kdave/btrfs-progs/issues/730")
that after commit 5aa959fb3440 ("btrfs-progs: subvolume create: accept
multiple arguments"), "btrfs subvolume create" no longer properly return
1 for error cases.

It turns out that the offending commit changed how we determine the
return code, thus for several error cases, we still return 0 for
create_one_subvolume().

Fix it and add a test case for it.

Qu Wenruo (2):
  btrfs-progs: cmd/subvolume: fix return value when the target exists
  btrfs-progs: cli-tests: add test case for return value of "btrfs
    subvlume create"

 cmds/subvolume.c                              | 11 ++++++-
 .../025-subvolume-create-failures/test.sh     | 32 +++++++++++++++++++
 2 files changed, 42 insertions(+), 1 deletion(-)
 create mode 100755 tests/cli-tests/025-subvolume-create-failures/test.sh

--
2.43.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-10  8:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-10  8:36 [PATCH v2 0/2] btrfs-progs: fix the return value of "btrfs subvolume create" Qu Wenruo
2024-01-10  8:36 ` [PATCH v2 1/2] btrfs-progs: cmd/subvolume: fix return value when the target exists Qu Wenruo
2024-01-10  8:36 ` [PATCH v2 2/2] btrfs-progs: cli-tests: add test case for return value of "btrfs subvlume create" Qu Wenruo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.