android_kernel_motorola_sm6375/tools/testing
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Shuah Khan 41e583edb1 selftests: kvm: fix mismatched fclose() after popen()
[ Upstream commit c3867ab5924b7a9a0b4a117902a08669d8be7c21 ]

get_warnings_count() does fclose() using File * returned from popen().
Fix it to call pclose() as it should.

tools/testing/selftests/kvm/x86_64/mmio_warning_test
x86_64/mmio_warning_test.c: In function ‘get_warnings_count’:
x86_64/mmio_warning_test.c:87:9: warning: ‘fclose’ called on pointer returned from a mismatched allocation function [-Wmismatched-dealloc]
   87 |         fclose(f);
      |         ^~~~~~~~~
x86_64/mmio_warning_test.c:84:13: note: returned from ‘popen’
   84 |         f = popen("dmesg | grep \"WARNING:\" | wc -l", "r");
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Shuah Khan <[email protected]>
Acked-by: Paolo Bonzini <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2021-11-17 09:48:32 +01:00
..
fault-injection
ktest tweewide: Fix most Shebang lines 2021-05-22 11:38:30 +02:00
nvdimm
radix-tree idr test suite: Create anchor before launching throbber 2021-04-16 11:46:38 +02:00
scatterlist
selftests selftests: kvm: fix mismatched fclose() after popen() 2021-11-17 09:48:32 +01:00
vsock