1. 29 Oct, 2021 1 commit
    • Shuah Khan's avatar
      selftests/core: fix conflicting types compile error for close_range() · f35dcaa0
      Shuah Khan authored
      close_range() test type conflicts with close_range() library call in
      x86_64-linux-gnu/bits/unistd_ext.h. Fix it by changing the name to
      core_close_range().
      
      gcc -g -I../../../../usr/include/    close_range_test.c  -o ../tools/testing/selftests/core/close_range_test
      In file included from close_range_test.c:16:
      close_range_test.c:57:6: error: conflicting types for ‘close_range’; have ‘void(struct __test_metadata *)’
         57 | TEST(close_range)
            |      ^~~~~~~~~~~
      ../kselftest_harness.h:181:21: note: in definition of macro ‘__TEST_IMPL’
        181 |         static void test_name(struct __test_metadata *_metadata); \
            |                     ^~~~~~~~~
      close_range_test.c:57:1: note: in expansion of macro ‘TEST’
         57 | TEST(close_range)
            | ^~~~
      In file included from /usr/include/unistd.h:1204,
                       from close_range_test.c:13:
      /usr/include/x86_64-linux-gnu/bits/unistd_ext.h:56:12: note: previous declaration of ‘close_range’ with type ‘int(unsigned int,  unsigned int,  int)’
         56 | extern int close_range (unsigned int __fd, unsigned int __max_fd,
            |            ^~~~~~~~~~~
      Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
      f35dcaa0
  2. 25 Oct, 2021 1 commit
  3. 21 Oct, 2021 1 commit
    • Shuah Khan's avatar
      selftests: kvm: fix mismatched fclose() after popen() · c3867ab5
      Shuah Khan authored
      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: default avatarShuah Khan <skhan@linuxfoundation.org>
      Acked-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
      c3867ab5
  4. 18 Oct, 2021 17 commits
  5. 17 Oct, 2021 3 commits
  6. 16 Oct, 2021 17 commits