Skip to content

Selftests: Fix compilation warnings due to missing _GNU_SOURCE definition

Tao Su kvm linux-kselftest linux-rtc linux-sgx linux-sound lkml netdev 1 version Applied

Status from this message: [merged mm-nonmm-stable] selftests-harness-use-1024-in-place-of-line_max.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 2 repliesApplied 2/2

Changes in v2 from the cover letter

- Stop defining _GNU_SOURCE in related selftests
- Revert commit 809216233555
- Use 1024 in place of LINE_MAX to fix 38c957f07038

Patches in v2 All 2 applied

#Subject and filesSizeRepliesApplied
1/2Revert "selftests/harness: remove use of LINE_MAX"tools/testing/selftests/kselftest_harness.h tools/testing/selftests/mm/mdwe_test.c+4 -91 replyApplied
2/2selftests/harness: Use 1024 in place of LINE_MAXtools/testing/selftests/kselftest_harness.h+1 -21 replyApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchSimon Horman
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] Selftests: Fix compilation warnings due to missing _GNU_SOURCE definition

Since kselftest_harness.h introduces asprintf()[1], many selftests have compilation warnings or errors due to missing _GNU_SOURCE definitions.

The issue stems from a lack of a LINE_MAX definition in Android (see commit 38c957f07038), which is the reason why asprintf() was introduced. We tried adding _GNU_SOURCE definitions to more selftests to fix, but asprintf() may continue to cause problems, and since it is quite late in the 6.9 cycle, we would like to revert 809216233555 first to provide testing for forks[2].

[1] https://lore.kernel.org/all/[email protected]
[2] https://lore.kernel.org/linux-kselftest/[email protected]

v1 -> v2:
- Stop defining _GNU_SOURCE in related selftests
- Revert commit 809216233555
- Use 1024 in place of LINE_MAX to fix 38c957f07038

v1: https://lore.kernel.org/all/[email protected]/

Tao Su (2):
Revert "selftests/harness: remove use of LINE_MAX" selftests/harness: Use 1024 in place of LINE_MAX

 tools/testing/selftests/kselftest_harness.h | 11 +++--------
 tools/testing/selftests/mm/mdwe_test.c      |  1 -
 2 files changed, 3 insertions(+), 9 deletions(-)

base-commit: 45db3ab70092637967967bfd8e6144017638563c

Signature · 1 line
2.34.1