[pve-devel] [PATCH storage 0/2] bwlimit: ignore undef in storage_list and add tests

Stoiko Ivanov s.ivanov at proxmox.com
Fri Apr 5 16:33:33 CEST 2019


While discussing the bug in [0], Dominik quickly came up with the patch,
ignoring undef as passed storage to storage_list, and gently hinted me to the
existance of our bwlimit tests. The first patch ignores undef as storage, which
IMO is semantically correct, although dying on unclean/unexpected input could
help in catching bugs in callers of get_bandwidth_limit (see [0]).

The second patch adds tests for a few use-cases of get_bandwidth_limit, which
are used in the recent bwlimit-patch-series [1].

I quickly skimmed through the other uses of get_bandwidth_limit and they should
not pass 'undef' as one element of $storage_list.


[0] https://pve.proxmox.com/pipermail/pve-devel/2019-April/036515.html
[1] https://pve.proxmox.com/pipermail/pve-devel/2019-April/036332.html

Stoiko Ivanov (2):
  get_bandwidt_limits: ignore 'undef' as storage
  add 3 bwlimit tests

 PVE/Storage.pm            | 1 +
 test/run_bwlimit_tests.pl | 3 +++
 2 files changed, 4 insertions(+)

-- 
2.11.0





More information about the pve-devel mailing list