kill trailing whitespace
no need for a regexp here
reduce indentation level
wrap long lines
fix test files list

closes: #2394
fix compilation
cosmetic cleanup
use DISKSIZE, not SIZE
emulate actual code to fix test
fix expected test results