Skip to content
  • Kevin Wolf's avatar
    26513a01
    block: Fix VM size column width in bdrv_snapshot_dump() · 26513a01
    Kevin Wolf authored
    
    
    size_to_str() can return a size like "4.24 MiB", with a single digit
    integer part and two fractional digits. This is eight characters, but
    commit b39847a5 changed the format string to only reserve seven
    characters for the column.
    
    This can result in unaligned columns, which in turn changes the output of
    iotests case 267 because exceeding the column size defeats the attempt
    to filter the size out of the output (observed with the ppc64 emulator).
    The resulting change is only a whitespace change, but since commit
    f203080b this is enough for iotests to consider the test failed.
    
    Taking a character away from the tag name column and adding it to the VM
    size column doesn't change anything in the common case (the tag name is
    left justified, the VM size is right justified), but fixes this case.
    
    Fixes: b39847a5
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    Message-Id: <20210202155911.179865-1-kwolf@redhat.com>
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    26513a01
    block: Fix VM size column width in bdrv_snapshot_dump()
    Kevin Wolf authored
    
    
    size_to_str() can return a size like "4.24 MiB", with a single digit
    integer part and two fractional digits. This is eight characters, but
    commit b39847a5 changed the format string to only reserve seven
    characters for the column.
    
    This can result in unaligned columns, which in turn changes the output of
    iotests case 267 because exceeding the column size defeats the attempt
    to filter the size out of the output (observed with the ppc64 emulator).
    The resulting change is only a whitespace change, but since commit
    f203080b this is enough for iotests to consider the test failed.
    
    Taking a character away from the tag name column and adding it to the VM
    size column doesn't change anything in the common case (the tag name is
    left justified, the VM size is right justified), but fixes this case.
    
    Fixes: b39847a5
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    Message-Id: <20210202155911.179865-1-kwolf@redhat.com>
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
Loading