summaryrefslogtreecommitdiff
path: root/lib/kunit
diff options
context:
space:
mode:
authorDaniel Latypov <dlatypov@google.com>2021-09-28 15:11:11 -0700
committerShuah Khan <skhan@linuxfoundation.org>2021-10-19 14:18:49 -0600
commita54ea2e0572537b283cb0edd95851c5f1fb20a90 (patch)
treef39a6fb76a31c3b2a7d6355e5c18faa200e9108a /lib/kunit
parentcd94fbc2cafb61cc1394cdba3f92b99ce07b03ae (diff)
kunit: tool: misc fixes (unused vars, imports, leaked files)
Drop some variables in unit tests that were unused and/or add assertions based on them. For ExitStack, it was imported, but the `es` variable wasn't used so it didn't do anything, and we were leaking the file objects. Refactor it to just use nested `with` statements to properly close them. And drop the direct use of .close() on file objects in the kunit tool unit test, as these can be leaked if test assertions fail. Signed-off-by: Daniel Latypov <dlatypov@google.com> Reviewed-by: David Gow <davidgow@google.com> Reviewed-by: Brendan Higgins <brendanhiggins@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'lib/kunit')
0 files changed, 0 insertions, 0 deletions