Skip to content

Conversation

@dbaarda
Copy link
Member

@dbaarda dbaarda commented Feb 18, 2023

The iwyu tool doesn't handle config.h files well, and these includes were incorrectly removed, which breaks things on some platforms. Add them back to most src/*.c files with /* IWYU pragma: keep */ to make iwyu ignore them. We skip src/hashtable.c because it is a standalone utilty that is platform independent.

Also add /* IWYU pragma: keep */ to includes in src/fileutil.c that are needed on some platforms but not others. This means we can remove the special exemptions to skip this file for the iwyu and iwyu-fix targets in CMakeLists.txt.

The iwyu tool doesn't handle `config.h` files well, and these includes were
incorrectly removed, which breaks things on some platforms. Add them back to
most `src/*.c` files with `/* IWYU pragma: keep */` to make iwyu ignore them.
We skip `src/hashtable.c` because it is a standalone tool that is platform
independent.

Also add `/* IWYU pragma: keep */` to includes in `src/fileutil.c` that are
needed on some platforms but not others. This means we can remove the special
exemptions to skip this file for the `iwyu` and `iwyu-fix` targets in
`CMakeLists.txt`.
Copy link
Contributor

@robert-scheck robert-scheck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using this patch, tests on s390x succeed again (actually the builds and tests on all supported Fedora and EPEL branches on all supported architectures succeed):

/usr/bin/ctest -C Debug
Test project /builddir/build/BUILD/librsync-2.3.2/redhat-linux-build
      Start  1: isprefix_test
 1/15 Test  #1: isprefix_test ....................   Passed    0.00 sec
      Start  2: netint_test
 2/15 Test  #2: netint_test ......................   Passed    0.00 sec
      Start  3: rollsum_test
 3/15 Test  #3: rollsum_test .....................   Passed    0.00 sec
      Start  4: rabinkarp_test
 4/15 Test  #4: rabinkarp_test ...................   Passed    0.00 sec
      Start  5: hashtable_test
 5/15 Test  #5: hashtable_test ...................   Passed    0.00 sec
      Start  6: checksum_test
 6/15 Test  #6: checksum_test ....................   Passed    0.00 sec
      Start  7: sumset_test
 7/15 Test  #7: sumset_test ......................   Passed    0.00 sec
      Start  8: rdiff_bad_option
 8/15 Test  #8: rdiff_bad_option .................   Passed    0.00 sec
      Start  9: Help
 9/15 Test  #9: Help .............................   Passed    0.00 sec
      Start 10: Mutate
10/15 Test #10: Mutate ...........................   Passed    0.99 sec
      Start 11: Signature
11/15 Test #11: Signature ........................   Passed    0.26 sec
      Start 12: Sources
12/15 Test #12: Sources ..........................   Passed    1.18 sec
      Start 13: Triple
13/15 Test #13: Triple ...........................   Passed    1.96 sec
      Start 14: Delta
14/15 Test #14: Delta ............................   Passed    0.05 sec
      Start 15: Changes
15/15 Test #15: Changes ..........................   Passed    0.96 sec
100% tests passed, 0 tests failed out of 15
Total Test time (real) =   5.42 sec

@dbaarda
Copy link
Member Author

dbaarda commented Feb 19, 2023

OK, I'm going to merge this PR and do a quick release of v2.3.4 with this fix.

@dbaarda dbaarda merged commit ec0c93b into librsync:master Feb 19, 2023
@dbaarda dbaarda deleted the fix_248 branch February 19, 2023 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants