btrfs-progs: fix the return value of "btrfs subvolume create"
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 0 repliesNew
- v12 patches 3 repliesSuperseded
Changes in v2 from the cover letter
- Fix the missing "f" for the subject of the first patch
- Add the missing unmount of the test case
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | btrfs-progs: cmd/subvolume: fix return value when the target existscmds/ | +10 | 0 replies | |
| 2/2 | btrfs-progs: cli-tests: add test case for return value of "btrfs subvlume create"tests/ | +32 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/2] btrfs-progs: fix the return value of "btrfs subvolume create"
[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