btrfs-progs/tests/cli-tests
David Sterba ab32c4445d btrfs-progs: qgroup show: fix formatting of limit values in json output
There are reports that json output of 'qgroup show' crashes due to
internal error when printing the limit values:

  INTERNAL ERROR: unknown unit base, mode 2304
  btrfs(internal_error+0x10a)[0x5605c37ce48a]
  btrfs(pretty_size_snprintf+0x5c)[0x5605c37d105c]
  btrfs(fmt_print+0x44e)[0x5605c37d178e]
  btrfs(+0x7ed1d)[0x5605c3800d1d]
  btrfs(main+0x8f)[0x5605c379beff]
  /lib64/libc.so.6(+0x27bb0)[0x7f83924ddbb0]
  /lib64/libc.so.6(__libc_start_main+0x8b)[0x7f83924ddc79]
  btrfs(_start+0x25)[0x5605c379d405]
  common/units.c:82: pretty_size_snprintf: Assertion `0` failed, value 0
  btrfs(+0x1d4b1)[0x5605c379f4b1]
  btrfs(pretty_size_snprintf+0x7b)[0x5605c37d107b]
  btrfs(fmt_print+0x44e)[0x5605c37d178e]
  btrfs(+0x7ed1d)[0x5605c3800d1d]
  btrfs(main+0x8f)[0x5605c379beff]
  /lib64/libc.so.6(+0x27bb0)[0x7f83924ddbb0]
  /lib64/libc.so.6(__libc_start_main+0x8b)[0x7f83924ddc79]
  btrfs(_start+0x25)[0x5605c379d405]

This is caused by "size" format that requires the unit mode, but it was not
specified and some stack value used. As json prints the raw values, use
the plain %llu format.

Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1206960
Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1209136#c15
Signed-off-by: David Sterba <dsterba@suse.com>
2023-05-26 18:02:33 +02:00
..
001-btrfs btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
002-balance-full-no-filters btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
003-fi-resize-args btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
004-send-parent-multi-subvol btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
005-qgroup-show btrfs-progs: qgroup show: fix formatting of limit values in json output 2023-05-26 18:02:33 +02:00
006-qgroup-show-sync btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
007-check-force btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
008-subvolume-get-set-default btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
009-btrfstune btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
010-subvol-show-qgroup btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
011-defrag-recursion btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
012-defrag-recursion btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
013-subvolume-delete-by-id btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
014-multiple-profiles-warning btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
015-defrag-compress btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
016-btrfs-fi-usage btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
017-fi-show-missing btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00