Skip to contentSkip to conversation

Misc. musl libc fixes.

PATCH Superseded Reagan Bohan 2 participants 18 messages Apr 22, 2024 – May 6, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Misc. musl libc fixes.

These patches fix the non-standard includes sys/poll.h and sys/signal.h as well as defines _LARGEFILE64_SOURCE for musl libc, else off64_t will not be defined.

#1 lore raw

PATCH 1/3 Define _LARGEFILE64_SOURCE for musl libc

From: Reagan Bohan <[email protected]>

---
 lib/i915/gem_engine_topology.c       | 2 ++
 tools/i915-perf/i915_perf_recorder.c | 2 ++
 2 files changed, 4 insertions(+)
lib/i915/gem_engine_topology.c +2 -0
index afb576afb..9b8fb85e3 100644
@@ -21,6 +21,8 @@
  * IN THE SOFTWARE.
  */
 
+#define _LARGEFILE64_SOURCE
+
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <sys/syscall.h>
tools/i915-perf/i915_perf_recorder.c +2 -0
index ca4354832..5e7c233dd 100644
@@ -20,6 +20,8 @@
  * SOFTWARE.
  */
 
+#define _LARGEFILE64_SOURCE
+
 #include <assert.h>
 #include <dirent.h>
 #include <errno.h>
Signature · 1 line
2.43.2
#2 lore raw

Re: [PATCH 1/3] Define _LARGEFILE64_SOURCE for musl libc

Hi Reagan,

Quoted 1 line · Reagan Bohan

From: Reagan Bohan <[email protected]>

Please subscribe to igt-dev mailinglist, also add here description of the commit.

Quoted 1 line

Signed-off-by is missing here.

Quoted 10 lines
---
 lib/i915/gem_engine_topology.c       | 2 ++
 tools/i915-perf/i915_perf_recorder.c | 2 ++
 2 files changed, 4 insertions(+)
lib/i915/gem_engine_topology.c +0 -0
index afb576afb..9b8fb85e3 100644

lib/i915/gem_engine_topology.c line 24

Quoted 4 lines
lib/i915/gem_engine_topology.c +1 -0
@@ -21,6 +21,8 @@
  * IN THE SOFTWARE.
  */
 
+#define _LARGEFILE64_SOURCE

Why only in these two files? Maybe better place whould be to detect musl libc compilation and add it into meson define?

Regards,
Kamil

Quoted 20 lines
lib/i915/gem_engine_topology.c +1 -0
+
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <sys/syscall.h>
tools/i915-perf/i915_perf_recorder.c +2 -0
index ca4354832..5e7c233dd 100644
@@ -20,6 +20,8 @@
  * SOFTWARE.
  */
 
+#define _LARGEFILE64_SOURCE
+
 #include <assert.h>
 #include <dirent.h>
 #include <errno.h>
Signature · 1 line
2.43.2
#3 lore raw

Re: [PATCH 1/3] Define _LARGEFILE64_SOURCE for musl libc

Hi Kamil,

Quoted 2 lines

Why only in these two files? Maybe better place whould be to detect musl libc compilation and add it into meson define?

Yes, I agree adding it to meson.build is a better approach, but I think doing so without a check for musl libc is best, because:
a) musl developers have a policy against having an easy way of checking for musl libc - https://openwall.com/lists/musl/2013/03/29/13
b) AFAICT, there should be no affect on glibc, and all tests still pass.

Thanks,
Reagan

#4 lore raw

PATCH 2/3 Change sys/poll.h to poll.h

In reply to Reagan Bohan

From: Reagan Bohan <[email protected]>

sys/poll.h is not the correct header, and POSIX makes no mention of it. Musl libc emits a warning when sys/poll.h is used.

---
 benchmarks/gem_busy.c           | 2 +-
 benchmarks/gem_latency.c        | 2 +-
 lib/dmabuf_sync_file.h          | 2 +-
 lib/igt_aux.c                   | 2 +-
 lib/igt_dummyload.c             | 2 +-
 runner/executor.c               | 2 +-
 tests/amdgpu/amd_prime.c        | 2 +-
 tests/core_auth.c               | 2 +-
 tests/drm_read.c                | 2 +-
 tests/intel/gem_exec_capture.c  | 2 +-
 tests/intel/gem_exec_fair.c     | 2 +-
 tests/intel/gem_exec_fence.c    | 2 +-
 tests/intel/gem_exec_nop.c      | 2 +-
 tests/intel/gem_exec_schedule.c | 2 +-
 tests/intel/gem_wait.c          | 2 +-
 tests/intel/kms_busy.c          | 2 +-
 tests/intel/prime_busy.c        | 2 +-
 tests/intel/xe_dma_buf_sync.c   | 2 +-
 tests/kms_cursor_legacy.c       | 2 +-
 tests/kms_flip.c                | 2 +-
 tests/kms_lease.c               | 2 +-
 tests/kms_prime.c               | 2 +-
 tests/kms_sequence.c            | 2 +-
 tests/kms_vblank.c              | 2 +-
 tests/prime_vgem.c              | 2 +-
 tests/testdisplay.c             | 2 +-
 tests/vgem_basic.c              | 2 +-
 tests/vgem_slow.c               | 2 +-
 tools/intel_dp_compliance.c     | 2 +-
 tools/intel_guc_logger.c        | 2 +-
 tools/intel_gvtg_test.c         | 2 +-
 tools/msm_dp_compliance.c       | 2 +-
 32 files changed, 32 insertions(+), 32 deletions(-)
benchmarks/gem_busy.c +1 -1
index 514e3387e..95d0fb971 100644
@@ -33,8 +33,8 @@
 #include <fcntl.h>
 #include <inttypes.h>
 #include <errno.h>
+#include <poll.h>
 #include <sys/stat.h>
-#include <sys/poll.h>
 #include <sys/ioctl.h>
 #include <sys/time.h>
 #include <time.h>
benchmarks/gem_latency.c +1 -1
index 6abf366f9..d3ebab005 100644
@@ -36,10 +36,10 @@
 #include <inttypes.h>
 #include <limits.h>
 #include <errno.h>
+#include <poll.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
 #include <sys/time.h>
-#include <sys/poll.h>
 #include <sys/resource.h>
 
 #include "drm.h"
lib/dmabuf_sync_file.h +1 -1
index d642ff30c..e115b5f94 100644
@@ -9,7 +9,7 @@
 #ifdef __linux__
 #include <linux/dma-buf.h>
 #endif
-#include <sys/poll.h>
+#include <poll.h>
 #include <stdbool.h>
 #include <stdint.h>
 
lib/igt_aux.c +1 -1
index d6aeb876b..e7210e5be 100644
@@ -39,10 +39,10 @@
 #include <sys/mman.h>
 #include <signal.h>
 #include <pciaccess.h>
+#include <poll.h>
 #include <stdlib.h>
 #include <time.h>
 #include <unistd.h>
-#include <sys/poll.h>
 #include <sys/wait.h>
 #include <sys/resource.h>
 #include <sys/time.h>
lib/igt_dummyload.c +1 -1
index 2e842929b..a9a2de077 100644
@@ -24,8 +24,8 @@
 
 #include <time.h>
 #include <signal.h>
+#include <poll.h>
 #include <pthread.h>
-#include <sys/poll.h>
 #include <sys/timerfd.h>
 
 #include <i915_drm.h>
runner/executor.c +1 -1
index d3e6296dd..4b374d223 100644
@@ -16,7 +16,6 @@
 #include <sys/ioctl.h>
 #include <sys/mman.h>
 #include <sys/select.h>
-#include <sys/poll.h>
 #include <sys/signalfd.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
@@ -25,6 +24,7 @@
 #include <sys/utsname.h>
 #include <sys/wait.h>
 #include <dirent.h>
+#include <poll.h>
 #include <time.h>
 #include <unistd.h>
 
tests/amdgpu/amd_prime.c +1 -1
index 6916c3173..6bcf11198 100644
@@ -24,7 +24,7 @@
 #include <amdgpu.h>
 #include <amdgpu_drm.h>
 
-#include <sys/poll.h>
+#include <poll.h>
 
 #include "i915/gem.h"
 #include "i915/gem_create.h"
tests/core_auth.c +1 -1
index 2d6ad83e9..f4381bba0 100644
@@ -34,12 +34,12 @@
 #include <fcntl.h>
 #include <inttypes.h>
 #include <errno.h>
+#include <poll.h>
 #include <sched.h>
 #include <sys/mount.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
 #include <sys/time.h>
-#include <sys/poll.h>
 #include <sys/resource.h>
 #include "drm.h"
 /**
tests/drm_read.c +1 -1
index 94c53fded..144c2140f 100644
@@ -39,10 +39,10 @@
 #include <fcntl.h>
 #include <inttypes.h>
 #include <errno.h>
+#include <poll.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
 #include <sys/time.h>
-#include <sys/poll.h>
 #include <pthread.h>
 #include "drm.h"
 
tests/intel/gem_exec_capture.c +1 -1
index 57b178f3e..3c8660ac5 100644
@@ -22,8 +22,8 @@
  */
 
 #include <ctype.h>
+#include <poll.h>
 #include <sched.h>
-#include <sys/poll.h>
 #include <zlib.h>
 
 #include "i915/gem.h"
tests/intel/gem_exec_fair.c +1 -1
index e71fa2f0d..003cd1c4f 100644
@@ -5,8 +5,8 @@
 
 #include "config.h"
 
+#include <poll.h>
 #include <pthread.h>
-#include <sys/poll.h>
 #include <sys/ioctl.h>
 #include <sys/mman.h>
 #include <sys/resource.h>
tests/intel/gem_exec_fence.c +1 -1
index e4263b3f9..28bad83f6 100644
@@ -21,9 +21,9 @@
  * IN THE SOFTWARE.
  */
 
+#include <poll.h>
 #include <string.h>
 #include <sys/ioctl.h>
-#include <sys/poll.h>
 #include <sys/signal.h>
 #include "i915/gem.h"
 #include "i915/gem_create.h"
tests/intel/gem_exec_nop.c +1 -1
index 6c547a412..0f1da1a47 100644
@@ -33,9 +33,9 @@
 #include <fcntl.h>
 #include <inttypes.h>
 #include <errno.h>
+#include <poll.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
-#include <sys/poll.h>
 #include <sys/time.h>
 #include <time.h>
 
tests/intel/gem_exec_schedule.c +1 -1
index 70243e72b..cae846794 100644
@@ -25,8 +25,8 @@
 
 #include <linux/userfaultfd.h>
 
+#include <poll.h>
 #include <pthread.h>
-#include <sys/poll.h>
 #include <sys/ioctl.h>
 #include <sys/mman.h>
 #include <sys/syscall.h>
tests/intel/gem_wait.c +1 -1
index fa6eb9f77..149f1ce71 100644
@@ -25,7 +25,7 @@
  *
  */
 
-#include <sys/poll.h>
+#include <poll.h>
 
 #include "i915/gem.h"
 #include "i915/gem_create.h"
tests/intel/kms_busy.c +1 -1
index 004d9ee6e..db45e286e 100644
@@ -31,7 +31,7 @@
  * Test category: functionality test
  */
 
-#include <sys/poll.h>
+#include <poll.h>
 #include <signal.h>
 #include <time.h>
 
tests/intel/prime_busy.c +1 -1
index 66af5f8a3..351b16138 100644
@@ -21,7 +21,7 @@
  * IN THE SOFTWARE.
  */
 
-#include <sys/poll.h>
+#include <poll.h>
 
 #include "i915/gem.h"
 #include "i915/gem_create.h"
tests/intel/xe_dma_buf_sync.c +1 -1
index b69283093..2db576ba8 100644
@@ -20,7 +20,7 @@
 #include "xe/xe_spin.h"
 #include <string.h>
 #include <linux/dma-buf.h>
-#include <sys/poll.h>
+#include <poll.h>
 
 #define MAX_N_BO	16
 #define N_FD		2
tests/kms_cursor_legacy.c +1 -1
index a430f735a..5b97028c7 100644
@@ -32,8 +32,8 @@
  * Test category: functionality test
  */
 
+#include <poll.h>
 #include <sched.h>
-#include <sys/poll.h>
 
 #include "i915/gem.h"
 #include "igt.h"
tests/kms_flip.c +1 -1
index 15c3b5ba2..d352ee14c 100755
@@ -40,9 +40,9 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <math.h>
+#include <poll.h>
 #include <stdint.h>
 #include <unistd.h>
-#include <sys/poll.h>
 #include <sys/time.h>
 #include <sys/ioctl.h>
 
tests/kms_lease.c +1 -1
index f7531c803..9e56d8b8b 100644
@@ -38,8 +38,8 @@
 #include <fcntl.h>
 #include <inttypes.h>
 #include <errno.h>
+#include <poll.h>
 #include <time.h>
-#include <sys/poll.h>
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <sys/wait.h>
tests/kms_prime.c +1 -1
index 135c75168..0b5dbf06e 100644
@@ -37,8 +37,8 @@
 #include "igt_sysfs.h"
 #include <fcntl.h>
 
+#include <poll.h>
 #include <sys/ioctl.h>
-#include <sys/poll.h>
 #include <time.h>
 
 /**
tests/kms_sequence.c +1 -1
index 23867d1aa..bf3cdf821 100644
@@ -40,7 +40,7 @@
 #include <inttypes.h>
 #include <errno.h>
 #include <time.h>
-#include <sys/poll.h>
+#include <poll.h>
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <sys/wait.h>
tests/kms_vblank.c +1 -1
index 956ba483a..696bc0b71 100644
@@ -37,8 +37,8 @@
 #include <fcntl.h>
 #include <inttypes.h>
 #include <errno.h>
+#include <poll.h>
 #include <time.h>
-#include <sys/poll.h>
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <sys/wait.h>
tests/prime_vgem.c +1 -1
index fa19d8e64..8f1cf8552 100644
@@ -21,8 +21,8 @@
  * IN THE SOFTWARE.
  */
 
+#include <poll.h>
 #include <sys/ioctl.h>
-#include <sys/poll.h>
 #include <time.h>
 
 #include "i915/gem.h"
tests/testdisplay.c +1 -1
index 109ed496a..e83655fb5 100644
@@ -64,8 +64,8 @@
 #include <stdbool.h>
 #include <strings.h>
 #include <unistd.h>
+#include <poll.h>
 #include <termios.h>
-#include <sys/poll.h>
 #include <sys/time.h>
 #include <sys/ioctl.h>
 #include <sys/types.h>
tests/vgem_basic.c +1 -1
index cb92efbf5..6d4b89976 100644
@@ -27,8 +27,8 @@
 #include "igt_debugfs.h"
 #include "igt_sysfs.h"
 
+#include <poll.h>
 #include <sys/mman.h>
-#include <sys/poll.h>
 #include <sys/stat.h>
 #include <dirent.h>
 /**
tests/vgem_slow.c +1 -1
index 35761a4ee..91c3fc501 100644
@@ -26,8 +26,8 @@
 #include "igt_debugfs.h"
 #include "igt_sysfs.h"
 
+#include <poll.h>
 #include <sys/mman.h>
-#include <sys/poll.h>
 #include <sys/stat.h>
 #include <dirent.h>
 /**
tools/intel_dp_compliance.c +1 -1
index 2e20d7f09..99196a450 100644
@@ -113,9 +113,9 @@
 #include <stdint.h>
 #include <stdbool.h>
 #include <strings.h>
+#include <poll.h>
 #include <unistd.h>
 #include <termios.h>
-#include <sys/poll.h>
 #include <sys/time.h>
 #include <sys/ioctl.h>
 #include <sys/types.h>
tools/intel_guc_logger.c +1 -1
index 5f1de8db5..629b4e660 100644
@@ -29,10 +29,10 @@
 #include <sys/ioctl.h>
 #include <string.h>
 #include <errno.h>
+#include <poll.h>
 #include <signal.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <sys/poll.h>
 #include <sys/wait.h>
 #include <sys/types.h>
 #include <sys/syscall.h>
tools/intel_gvtg_test.c +1 -1
index ad5ee6a65..408e703bf 100644
@@ -37,9 +37,9 @@
 #include <stdint.h>
 #include <stdbool.h>
 #include <strings.h>
+#include <poll.h>
 #include <unistd.h>
 #include <termios.h>
-#include <sys/poll.h>
 #include <sys/time.h>
 #include <sys/ioctl.h>
 #include <sys/types.h>
tools/msm_dp_compliance.c +1 -1
index 6941d3855..c37b3bc1c 100644
@@ -115,8 +115,8 @@
 #include <stdbool.h>
 #include <strings.h>
 #include <unistd.h>
+#include <poll.h>
 #include <termios.h>
-#include <sys/poll.h>
 #include <sys/time.h>
 #include <sys/ioctl.h>
 #include <sys/types.h>
Signature · 1 line
2.43.2
#5 lore raw

Re: [PATCH 2/3] Change sys/poll.h to poll.h

Hi Reagan,

Quoted 3 lines · Reagan Bohan

From: Reagan Bohan <[email protected]>

sys/poll.h is not the correct header, and POSIX makes no mention of it.

It is correct but ot standard, could you rewrite your description a bit?

Quoted 1 line

Musl libc emits a warning when sys/poll.h is used.

In what project is it emitting this?

Missing s-o-b (note that is should be the same as From:).

Quoted 8 lines
---
 benchmarks/gem_busy.c           | 2 +-
 benchmarks/gem_latency.c        | 2 +-
 lib/dmabuf_sync_file.h          | 2 +-
 lib/igt_aux.c                   | 2 +-
 lib/igt_dummyload.c             | 2 +-
 runner/executor.c               | 2 +-
 tests/amdgpu/amd_prime.c        | 2 +-

Please split this into separate patches for each of main parts for igt, so one for benchmarks, lib, ... up to tests, also use i-g-t in all patches send to igt-dev ML, for example:

Subject: [PATCH i-g-t 2/N] lib: use poll.h in includes
Subject: [PATCH i-g-t 3/N] benchmarks: use poll.h in includes
Subject: [PATCH i-g-t 4/N] runner: use poll.h in includes
Subject: [PATCH i-g-t 5/N] tests: use poll.h in includes

with each one changing that include header.
Last nit - please use checkpatch.pl script from Linux kernel sources for checks if anything is missing in your patches.

Regards,
Kamil

Quoted 494 lines
 tests/core_auth.c               | 2 +-
 tests/drm_read.c                | 2 +-
 tests/intel/gem_exec_capture.c  | 2 +-
 tests/intel/gem_exec_fair.c     | 2 +-
 tests/intel/gem_exec_fence.c    | 2 +-
 tests/intel/gem_exec_nop.c      | 2 +-
 tests/intel/gem_exec_schedule.c | 2 +-
 tests/intel/gem_wait.c          | 2 +-
 tests/intel/kms_busy.c          | 2 +-
 tests/intel/prime_busy.c        | 2 +-
 tests/intel/xe_dma_buf_sync.c   | 2 +-
 tests/kms_cursor_legacy.c       | 2 +-
 tests/kms_flip.c                | 2 +-
 tests/kms_lease.c               | 2 +-
 tests/kms_prime.c               | 2 +-
 tests/kms_sequence.c            | 2 +-
 tests/kms_vblank.c              | 2 +-
 tests/prime_vgem.c              | 2 +-
 tests/testdisplay.c             | 2 +-
 tests/vgem_basic.c              | 2 +-
 tests/vgem_slow.c               | 2 +-
 tools/intel_dp_compliance.c     | 2 +-
 tools/intel_guc_logger.c        | 2 +-
 tools/intel_gvtg_test.c         | 2 +-
 tools/msm_dp_compliance.c       | 2 +-
 32 files changed, 32 insertions(+), 32 deletions(-)
benchmarks/gem_busy.c +1 -1
index 514e3387e..95d0fb971 100644
@@ -33,8 +33,8 @@
 #include <fcntl.h>
 #include <inttypes.h>
 #include <errno.h>
+#include <poll.h>
 #include <sys/stat.h>
-#include <sys/poll.h>
 #include <sys/ioctl.h>
 #include <sys/time.h>
 #include <time.h>
benchmarks/gem_latency.c +1 -1
index 6abf366f9..d3ebab005 100644
@@ -36,10 +36,10 @@
 #include <inttypes.h>
 #include <limits.h>
 #include <errno.h>
+#include <poll.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
 #include <sys/time.h>
-#include <sys/poll.h>
 #include <sys/resource.h>
 
 #include "drm.h"
lib/dmabuf_sync_file.h +1 -1
index d642ff30c..e115b5f94 100644
@@ -9,7 +9,7 @@
 #ifdef __linux__
 #include <linux/dma-buf.h>
 #endif
-#include <sys/poll.h>
+#include <poll.h>
 #include <stdbool.h>
 #include <stdint.h>
 
lib/igt_aux.c +1 -1
index d6aeb876b..e7210e5be 100644
@@ -39,10 +39,10 @@
 #include <sys/mman.h>
 #include <signal.h>
 #include <pciaccess.h>
+#include <poll.h>
 #include <stdlib.h>
 #include <time.h>
 #include <unistd.h>
-#include <sys/poll.h>
 #include <sys/wait.h>
 #include <sys/resource.h>
 #include <sys/time.h>
lib/igt_dummyload.c +1 -1
index 2e842929b..a9a2de077 100644
@@ -24,8 +24,8 @@
 
 #include <time.h>
 #include <signal.h>
+#include <poll.h>
 #include <pthread.h>
-#include <sys/poll.h>
 #include <sys/timerfd.h>
 
 #include <i915_drm.h>
runner/executor.c +1 -1
index d3e6296dd..4b374d223 100644
@@ -16,7 +16,6 @@
 #include <sys/ioctl.h>
 #include <sys/mman.h>
 #include <sys/select.h>
-#include <sys/poll.h>
 #include <sys/signalfd.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
@@ -25,6 +24,7 @@
 #include <sys/utsname.h>
 #include <sys/wait.h>
 #include <dirent.h>
+#include <poll.h>
 #include <time.h>
 #include <unistd.h>
 
tests/amdgpu/amd_prime.c +1 -1
index 6916c3173..6bcf11198 100644
@@ -24,7 +24,7 @@
 #include <amdgpu.h>
 #include <amdgpu_drm.h>
 
-#include <sys/poll.h>
+#include <poll.h>
 
 #include "i915/gem.h"
 #include "i915/gem_create.h"
tests/core_auth.c +1 -1
index 2d6ad83e9..f4381bba0 100644
@@ -34,12 +34,12 @@
 #include <fcntl.h>
 #include <inttypes.h>
 #include <errno.h>
+#include <poll.h>
 #include <sched.h>
 #include <sys/mount.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
 #include <sys/time.h>
-#include <sys/poll.h>
 #include <sys/resource.h>
 #include "drm.h"
 /**
tests/drm_read.c +1 -1
index 94c53fded..144c2140f 100644
@@ -39,10 +39,10 @@
 #include <fcntl.h>
 #include <inttypes.h>
 #include <errno.h>
+#include <poll.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
 #include <sys/time.h>
-#include <sys/poll.h>
 #include <pthread.h>
 #include "drm.h"
 
tests/intel/gem_exec_capture.c +1 -1
index 57b178f3e..3c8660ac5 100644
@@ -22,8 +22,8 @@
  */
 
 #include <ctype.h>
+#include <poll.h>
 #include <sched.h>
-#include <sys/poll.h>
 #include <zlib.h>
 
 #include "i915/gem.h"
tests/intel/gem_exec_fair.c +1 -1
index e71fa2f0d..003cd1c4f 100644
@@ -5,8 +5,8 @@
 
 #include "config.h"
 
+#include <poll.h>
 #include <pthread.h>
-#include <sys/poll.h>
 #include <sys/ioctl.h>
 #include <sys/mman.h>
 #include <sys/resource.h>
tests/intel/gem_exec_fence.c +1 -1
index e4263b3f9..28bad83f6 100644
@@ -21,9 +21,9 @@
  * IN THE SOFTWARE.
  */
 
+#include <poll.h>
 #include <string.h>
 #include <sys/ioctl.h>
-#include <sys/poll.h>
 #include <sys/signal.h>
 #include "i915/gem.h"
 #include "i915/gem_create.h"
tests/intel/gem_exec_nop.c +1 -1
index 6c547a412..0f1da1a47 100644
@@ -33,9 +33,9 @@
 #include <fcntl.h>
 #include <inttypes.h>
 #include <errno.h>
+#include <poll.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
-#include <sys/poll.h>
 #include <sys/time.h>
 #include <time.h>
 
tests/intel/gem_exec_schedule.c +1 -1
index 70243e72b..cae846794 100644
@@ -25,8 +25,8 @@
 
 #include <linux/userfaultfd.h>
 
+#include <poll.h>
 #include <pthread.h>
-#include <sys/poll.h>
 #include <sys/ioctl.h>
 #include <sys/mman.h>
 #include <sys/syscall.h>
tests/intel/gem_wait.c +1 -1
index fa6eb9f77..149f1ce71 100644
@@ -25,7 +25,7 @@
  *
  */
 
-#include <sys/poll.h>
+#include <poll.h>
 
 #include "i915/gem.h"
 #include "i915/gem_create.h"
tests/intel/kms_busy.c +1 -1
index 004d9ee6e..db45e286e 100644
@@ -31,7 +31,7 @@
  * Test category: functionality test
  */
 
-#include <sys/poll.h>
+#include <poll.h>
 #include <signal.h>
 #include <time.h>
 
tests/intel/prime_busy.c +1 -1
index 66af5f8a3..351b16138 100644
@@ -21,7 +21,7 @@
  * IN THE SOFTWARE.
  */
 
-#include <sys/poll.h>
+#include <poll.h>
 
 #include "i915/gem.h"
 #include "i915/gem_create.h"
tests/intel/xe_dma_buf_sync.c +1 -1
index b69283093..2db576ba8 100644
@@ -20,7 +20,7 @@
 #include "xe/xe_spin.h"
 #include <string.h>
 #include <linux/dma-buf.h>
-#include <sys/poll.h>
+#include <poll.h>
 
 #define MAX_N_BO	16
 #define N_FD		2
tests/kms_cursor_legacy.c +1 -1
index a430f735a..5b97028c7 100644
@@ -32,8 +32,8 @@
  * Test category: functionality test
  */
 
+#include <poll.h>
 #include <sched.h>
-#include <sys/poll.h>
 
 #include "i915/gem.h"
 #include "igt.h"
tests/kms_flip.c +1 -1
index 15c3b5ba2..d352ee14c 100755
@@ -40,9 +40,9 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <math.h>
+#include <poll.h>
 #include <stdint.h>
 #include <unistd.h>
-#include <sys/poll.h>
 #include <sys/time.h>
 #include <sys/ioctl.h>
 
tests/kms_lease.c +1 -1
index f7531c803..9e56d8b8b 100644
@@ -38,8 +38,8 @@
 #include <fcntl.h>
 #include <inttypes.h>
 #include <errno.h>
+#include <poll.h>
 #include <time.h>
-#include <sys/poll.h>
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <sys/wait.h>
tests/kms_prime.c +1 -1
index 135c75168..0b5dbf06e 100644
@@ -37,8 +37,8 @@
 #include "igt_sysfs.h"
 #include <fcntl.h>
 
+#include <poll.h>
 #include <sys/ioctl.h>
-#include <sys/poll.h>
 #include <time.h>
 
 /**
tests/kms_sequence.c +1 -1
index 23867d1aa..bf3cdf821 100644
@@ -40,7 +40,7 @@
 #include <inttypes.h>
 #include <errno.h>
 #include <time.h>
-#include <sys/poll.h>
+#include <poll.h>
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <sys/wait.h>
tests/kms_vblank.c +1 -1
index 956ba483a..696bc0b71 100644
@@ -37,8 +37,8 @@
 #include <fcntl.h>
 #include <inttypes.h>
 #include <errno.h>
+#include <poll.h>
 #include <time.h>
-#include <sys/poll.h>
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <sys/wait.h>
tests/prime_vgem.c +1 -1
index fa19d8e64..8f1cf8552 100644
@@ -21,8 +21,8 @@
  * IN THE SOFTWARE.
  */
 
+#include <poll.h>
 #include <sys/ioctl.h>
-#include <sys/poll.h>
 #include <time.h>
 
 #include "i915/gem.h"
tests/testdisplay.c +1 -1
index 109ed496a..e83655fb5 100644
@@ -64,8 +64,8 @@
 #include <stdbool.h>
 #include <strings.h>
 #include <unistd.h>
+#include <poll.h>
 #include <termios.h>
-#include <sys/poll.h>
 #include <sys/time.h>
 #include <sys/ioctl.h>
 #include <sys/types.h>
tests/vgem_basic.c +1 -1
index cb92efbf5..6d4b89976 100644
@@ -27,8 +27,8 @@
 #include "igt_debugfs.h"
 #include "igt_sysfs.h"
 
+#include <poll.h>
 #include <sys/mman.h>
-#include <sys/poll.h>
 #include <sys/stat.h>
 #include <dirent.h>
 /**
tests/vgem_slow.c +1 -1
index 35761a4ee..91c3fc501 100644
@@ -26,8 +26,8 @@
 #include "igt_debugfs.h"
 #include "igt_sysfs.h"
 
+#include <poll.h>
 #include <sys/mman.h>
-#include <sys/poll.h>
 #include <sys/stat.h>
 #include <dirent.h>
 /**
tools/intel_dp_compliance.c +1 -1
index 2e20d7f09..99196a450 100644
@@ -113,9 +113,9 @@
 #include <stdint.h>
 #include <stdbool.h>
 #include <strings.h>
+#include <poll.h>
 #include <unistd.h>
 #include <termios.h>
-#include <sys/poll.h>
 #include <sys/time.h>
 #include <sys/ioctl.h>
 #include <sys/types.h>
tools/intel_guc_logger.c +1 -1
index 5f1de8db5..629b4e660 100644
@@ -29,10 +29,10 @@
 #include <sys/ioctl.h>
 #include <string.h>
 #include <errno.h>
+#include <poll.h>
 #include <signal.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <sys/poll.h>
 #include <sys/wait.h>
 #include <sys/types.h>
 #include <sys/syscall.h>
tools/intel_gvtg_test.c +1 -1
index ad5ee6a65..408e703bf 100644
@@ -37,9 +37,9 @@
 #include <stdint.h>
 #include <stdbool.h>
 #include <strings.h>
+#include <poll.h>
 #include <unistd.h>
 #include <termios.h>
-#include <sys/poll.h>
 #include <sys/time.h>
 #include <sys/ioctl.h>
 #include <sys/types.h>
tools/msm_dp_compliance.c +1 -1
index 6941d3855..c37b3bc1c 100644
@@ -115,8 +115,8 @@
 #include <stdbool.h>
 #include <strings.h>
 #include <unistd.h>
+#include <poll.h>
 #include <termios.h>
-#include <sys/poll.h>
 #include <sys/time.h>
 #include <sys/ioctl.h>
 #include <sys/types.h>
Signature · 1 line
2.43.2
#6 lore raw

Re: [PATCH 2/3] Change sys/poll.h to poll.h

Hi Kamil,

I am relatively inexperienced with email patches, so I appreciate your patience.

Quoted 1 line

In what project is it emitting this?

musl libc installs sys/poll.h as a header which just includes poll.h and emits a warning (with #warning), so each usage of sys/poll.h emits a noisy compiler warning.

I will take the rest of your feedback into account and send a new patch soon.

#7 lore raw

PATCH 3/3 Change sys/signal.h to signal.h

In reply to Reagan Bohan

From: Reagan Bohan <[email protected]>

Not only is sys/signal.h non standard, it also:
a) emits a warning on musl libc
b) made the code inconsistent, as some files used signal.h and some sys/signal.h

---
 tests/intel/gem_exec_await.c           | 2 +-
 tests/intel/gem_exec_balancer.c        | 2 +-
 tests/intel/gem_exec_fence.c           | 2 +-
 tests/intel/gem_exec_latency.c         | 2 +-
 tests/intel/gem_unref_active_buffers.c | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
tests/intel/gem_exec_await.c +1 -1
index fcbca1547..cc976f09d 100644
@@ -22,8 +22,8 @@
  *
  */
 
+#include <signal.h>
 #include <sys/ioctl.h>
-#include <sys/signal.h>
 
 #include "drmtest.h"
 #include "i915/gem.h"
tests/intel/gem_exec_balancer.c +1 -1
index 7504f3737..83cc7eea4 100644
@@ -23,8 +23,8 @@
 
 #include <fcntl.h>
 #include <sched.h>
+#include <signal.h>
 #include <sys/ioctl.h>
-#include <sys/signal.h>
 #include <poll.h>
 
 #include "dmabuf_sync_file.h"
tests/intel/gem_exec_fence.c +1 -1
index 28bad83f6..deff18abc 100644
@@ -23,8 +23,8 @@
 
 #include <poll.h>
 #include <string.h>
+#include <signal.h>
 #include <sys/ioctl.h>
-#include <sys/signal.h>
 #include "i915/gem.h"
 #include "i915/gem_create.h"
 #include "igt.h"
tests/intel/gem_exec_latency.c +1 -1
index b9d086afc..b802c2f31 100644
@@ -30,10 +30,10 @@
 #include <fcntl.h>
 #include <inttypes.h>
 #include <errno.h>
+#include <signal.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
 #include <sys/time.h>
-#include <sys/signal.h>
 #include <time.h>
 #include <sched.h>
 
tests/intel/gem_unref_active_buffers.c +1 -1
index f8138c7ac..47f792738 100644
@@ -34,8 +34,8 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <inttypes.h>
+#include <signal.h>
 #include <sys/ioctl.h>
-#include <sys/signal.h>
 #include <sys/time.h>
 
 #include "igt.h"
Signature · 1 line
2.43.2
#8 lore raw

Re: [PATCH 3/3] Change sys/signal.h to signal.h

Hi Reagan,

Quoted 6 lines · Reagan Bohan

From: Reagan Bohan <[email protected]>

Not only is sys/signal.h non standard, it also:
a) emits a warning on musl libc
b) made the code inconsistent, as some files used signal.h and some sys/signal.h

Missing s-o-b.

Regards,
Kamil

Quoted 83 lines
---
 tests/intel/gem_exec_await.c           | 2 +-
 tests/intel/gem_exec_balancer.c        | 2 +-
 tests/intel/gem_exec_fence.c           | 2 +-
 tests/intel/gem_exec_latency.c         | 2 +-
 tests/intel/gem_unref_active_buffers.c | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
tests/intel/gem_exec_await.c +1 -1
index fcbca1547..cc976f09d 100644
@@ -22,8 +22,8 @@
  *
  */
 
+#include <signal.h>
 #include <sys/ioctl.h>
-#include <sys/signal.h>
 
 #include "drmtest.h"
 #include "i915/gem.h"
tests/intel/gem_exec_balancer.c +1 -1
index 7504f3737..83cc7eea4 100644
@@ -23,8 +23,8 @@
 
 #include <fcntl.h>
 #include <sched.h>
+#include <signal.h>
 #include <sys/ioctl.h>
-#include <sys/signal.h>
 #include <poll.h>
 
 #include "dmabuf_sync_file.h"
tests/intel/gem_exec_fence.c +1 -1
index 28bad83f6..deff18abc 100644
@@ -23,8 +23,8 @@
 
 #include <poll.h>
 #include <string.h>
+#include <signal.h>
 #include <sys/ioctl.h>
-#include <sys/signal.h>
 #include "i915/gem.h"
 #include "i915/gem_create.h"
 #include "igt.h"
tests/intel/gem_exec_latency.c +1 -1
index b9d086afc..b802c2f31 100644
@@ -30,10 +30,10 @@
 #include <fcntl.h>
 #include <inttypes.h>
 #include <errno.h>
+#include <signal.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
 #include <sys/time.h>
-#include <sys/signal.h>
 #include <time.h>
 #include <sched.h>
 
tests/intel/gem_unref_active_buffers.c +1 -1
index f8138c7ac..47f792738 100644
@@ -34,8 +34,8 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <inttypes.h>
+#include <signal.h>
 #include <sys/ioctl.h>
-#include <sys/signal.h>
 #include <sys/time.h>
 
 #include "igt.h"
Signature · 1 line
2.43.2
#9 lore raw

v2 cover Misc musl fixes.

In reply to Reagan Bohan

Hello,

In this version I have defined _LARGEFILE64_SOURCE in the meson.build instead of the individual files, split up the change of poll.h, and rewrote commit messages to be more concise.

#10 lore raw

PATCH v2 1/7 Define _LARGEFILE64_SOURCE for musl libc

musl libc expects this macro to be defined when using the types off64_t and ino64_t. This does not affect glibc.

---
 meson.build | 2 ++
 1 file changed, 2 insertions(+)
meson.build +2 -0
index cee8a7446..4a9c7d55e 100644
@@ -74,6 +74,8 @@ cc_args = [
 # well with longjmp which is heavily used by IGT framework.
 	'-fno-builtin-malloc',
 	'-fno-builtin-calloc',
+# Required to use off64_t and ino64_t on musl libc
+	'-D_LARGEFILE64_SOURCE=1',
 ]
 
 foreach cc_arg : cc_args
Signature · 1 line
2.43.2
#11 lore raw

PATCH v2 2/7 lib: use poll.h in includes

In reply to Reagan Bohan

sys/poll.h is non-standard and including it on musl produces a warning.

---
 lib/dmabuf_sync_file.h | 2 +-
 lib/igt_aux.c          | 2 +-
 lib/igt_dummyload.c    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
lib/dmabuf_sync_file.h +1 -1
index d642ff30c..e115b5f94 100644
@@ -9,7 +9,7 @@
 #ifdef __linux__
 #include <linux/dma-buf.h>
 #endif
-#include <sys/poll.h>
+#include <poll.h>
 #include <stdbool.h>
 #include <stdint.h>
 
lib/igt_aux.c +1 -1
index d6aeb876b..e7210e5be 100644
@@ -39,10 +39,10 @@
 #include <sys/mman.h>
 #include <signal.h>
 #include <pciaccess.h>
+#include <poll.h>
 #include <stdlib.h>
 #include <time.h>
 #include <unistd.h>
-#include <sys/poll.h>
 #include <sys/wait.h>
 #include <sys/resource.h>
 #include <sys/time.h>
lib/igt_dummyload.c +1 -1
index 2e842929b..a9a2de077 100644
@@ -24,8 +24,8 @@
 
 #include <time.h>
 #include <signal.h>
+#include <poll.h>
 #include <pthread.h>
-#include <sys/poll.h>
 #include <sys/timerfd.h>
 
 #include <i915_drm.h>
Signature · 1 line
2.43.2
#12 lore raw

PATCH v2 3/7 benchmarks: use poll.h in includes

In reply to Reagan Bohan

sys/poll.h is non-standard and including it on musl produces a warning.

---
 benchmarks/gem_busy.c    | 2 +-
 benchmarks/gem_latency.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
benchmarks/gem_busy.c +1 -1
index 514e3387e..95d0fb971 100644
@@ -33,8 +33,8 @@
 #include <fcntl.h>
 #include <inttypes.h>
 #include <errno.h>
+#include <poll.h>
 #include <sys/stat.h>
-#include <sys/poll.h>
 #include <sys/ioctl.h>
 #include <sys/time.h>
 #include <time.h>
benchmarks/gem_latency.c +1 -1
index 6abf366f9..d3ebab005 100644
@@ -36,10 +36,10 @@
 #include <inttypes.h>
 #include <limits.h>
 #include <errno.h>
+#include <poll.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
 #include <sys/time.h>
-#include <sys/poll.h>
 #include <sys/resource.h>
 
 #include "drm.h"
Signature · 1 line
2.43.2
#13 lore raw

PATCH v2 4/7 runner: use poll.h in includes

In reply to Reagan Bohan

sys/poll.h is non-standard and including it on musl produces a warning.

---
 runner/executor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
runner/executor.c +1 -1
index d3e6296dd..4b374d223 100644
@@ -16,7 +16,6 @@
 #include <sys/ioctl.h>
 #include <sys/mman.h>
 #include <sys/select.h>
-#include <sys/poll.h>
 #include <sys/signalfd.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
@@ -25,6 +24,7 @@
 #include <sys/utsname.h>
 #include <sys/wait.h>
 #include <dirent.h>
+#include <poll.h>
 #include <time.h>
 #include <unistd.h>
 
Signature · 1 line
2.43.2
#14 lore raw

PATCH v2 5/7 tests: use poll.h in includes

In reply to Reagan Bohan

sys/poll.h is non-standard and including it on musl produces a warning.

---
 tests/amdgpu/amd_prime.c        | 2 +-
 tests/core_auth.c               | 2 +-
 tests/drm_read.c                | 2 +-
 tests/intel/gem_exec_capture.c  | 2 +-
 tests/intel/gem_exec_fair.c     | 2 +-
 tests/intel/gem_exec_fence.c    | 2 +-
 tests/intel/gem_exec_nop.c      | 2 +-
 tests/intel/gem_exec_schedule.c | 2 +-
 tests/intel/gem_wait.c          | 2 +-
 tests/intel/kms_busy.c          | 2 +-
 tests/intel/prime_busy.c        | 2 +-
 tests/intel/xe_dma_buf_sync.c   | 2 +-
 tests/kms_cursor_legacy.c       | 2 +-
 tests/kms_flip.c                | 2 +-
 tests/kms_lease.c               | 2 +-
 tests/kms_prime.c               | 2 +-
 tests/kms_sequence.c            | 2 +-
 tests/kms_vblank.c              | 2 +-
 tests/prime_vgem.c              | 2 +-
 tests/testdisplay.c             | 2 +-
 tests/vgem_basic.c              | 2 +-
 tests/vgem_slow.c               | 2 +-
 22 files changed, 22 insertions(+), 22 deletions(-)
tests/amdgpu/amd_prime.c +1 -1
index 6916c3173..6bcf11198 100644
@@ -24,7 +24,7 @@
 #include <amdgpu.h>
 #include <amdgpu_drm.h>
 
-#include <sys/poll.h>
+#include <poll.h>
 
 #include "i915/gem.h"
 #include "i915/gem_create.h"
tests/core_auth.c +1 -1
index 2d6ad83e9..f4381bba0 100644
@@ -34,12 +34,12 @@
 #include <fcntl.h>
 #include <inttypes.h>
 #include <errno.h>
+#include <poll.h>
 #include <sched.h>
 #include <sys/mount.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
 #include <sys/time.h>
-#include <sys/poll.h>
 #include <sys/resource.h>
 #include "drm.h"
 /**
tests/drm_read.c +1 -1
index 94c53fded..144c2140f 100644
@@ -39,10 +39,10 @@
 #include <fcntl.h>
 #include <inttypes.h>
 #include <errno.h>
+#include <poll.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
 #include <sys/time.h>
-#include <sys/poll.h>
 #include <pthread.h>
 #include "drm.h"
 
tests/intel/gem_exec_capture.c +1 -1
index 57b178f3e..3c8660ac5 100644
@@ -22,8 +22,8 @@
  */
 
 #include <ctype.h>
+#include <poll.h>
 #include <sched.h>
-#include <sys/poll.h>
 #include <zlib.h>
 
 #include "i915/gem.h"
tests/intel/gem_exec_fair.c +1 -1
index e71fa2f0d..003cd1c4f 100644
@@ -5,8 +5,8 @@
 
 #include "config.h"
 
+#include <poll.h>
 #include <pthread.h>
-#include <sys/poll.h>
 #include <sys/ioctl.h>
 #include <sys/mman.h>
 #include <sys/resource.h>
tests/intel/gem_exec_fence.c +1 -1
index e4263b3f9..28bad83f6 100644
@@ -21,9 +21,9 @@
  * IN THE SOFTWARE.
  */
 
+#include <poll.h>
 #include <string.h>
 #include <sys/ioctl.h>
-#include <sys/poll.h>
 #include <sys/signal.h>
 #include "i915/gem.h"
 #include "i915/gem_create.h"
tests/intel/gem_exec_nop.c +1 -1
index 6c547a412..0f1da1a47 100644
@@ -33,9 +33,9 @@
 #include <fcntl.h>
 #include <inttypes.h>
 #include <errno.h>
+#include <poll.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
-#include <sys/poll.h>
 #include <sys/time.h>
 #include <time.h>
 
tests/intel/gem_exec_schedule.c +1 -1
index 70243e72b..cae846794 100644
@@ -25,8 +25,8 @@
 
 #include <linux/userfaultfd.h>
 
+#include <poll.h>
 #include <pthread.h>
-#include <sys/poll.h>
 #include <sys/ioctl.h>
 #include <sys/mman.h>
 #include <sys/syscall.h>
tests/intel/gem_wait.c +1 -1
index fa6eb9f77..149f1ce71 100644
@@ -25,7 +25,7 @@
  *
  */
 
-#include <sys/poll.h>
+#include <poll.h>
 
 #include "i915/gem.h"
 #include "i915/gem_create.h"
tests/intel/kms_busy.c +1 -1
index 004d9ee6e..db45e286e 100644
@@ -31,7 +31,7 @@
  * Test category: functionality test
  */
 
-#include <sys/poll.h>
+#include <poll.h>
 #include <signal.h>
 #include <time.h>
 
tests/intel/prime_busy.c +1 -1
index 66af5f8a3..351b16138 100644
@@ -21,7 +21,7 @@
  * IN THE SOFTWARE.
  */
 
-#include <sys/poll.h>
+#include <poll.h>
 
 #include "i915/gem.h"
 #include "i915/gem_create.h"
tests/intel/xe_dma_buf_sync.c +1 -1
index b69283093..2db576ba8 100644
@@ -20,7 +20,7 @@
 #include "xe/xe_spin.h"
 #include <string.h>
 #include <linux/dma-buf.h>
-#include <sys/poll.h>
+#include <poll.h>
 
 #define MAX_N_BO	16
 #define N_FD		2
tests/kms_cursor_legacy.c +1 -1
index a430f735a..5b97028c7 100644
@@ -32,8 +32,8 @@
  * Test category: functionality test
  */
 
+#include <poll.h>
 #include <sched.h>
-#include <sys/poll.h>
 
 #include "i915/gem.h"
 #include "igt.h"
tests/kms_flip.c +1 -1
index 15c3b5ba2..d352ee14c 100755
@@ -40,9 +40,9 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <math.h>
+#include <poll.h>
 #include <stdint.h>
 #include <unistd.h>
-#include <sys/poll.h>
 #include <sys/time.h>
 #include <sys/ioctl.h>
 
tests/kms_lease.c +1 -1
index f7531c803..9e56d8b8b 100644
@@ -38,8 +38,8 @@
 #include <fcntl.h>
 #include <inttypes.h>
 #include <errno.h>
+#include <poll.h>
 #include <time.h>
-#include <sys/poll.h>
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <sys/wait.h>
tests/kms_prime.c +1 -1
index 135c75168..0b5dbf06e 100644
@@ -37,8 +37,8 @@
 #include "igt_sysfs.h"
 #include <fcntl.h>
 
+#include <poll.h>
 #include <sys/ioctl.h>
-#include <sys/poll.h>
 #include <time.h>
 
 /**
tests/kms_sequence.c +1 -1
index 23867d1aa..bf3cdf821 100644
@@ -40,7 +40,7 @@
 #include <inttypes.h>
 #include <errno.h>
 #include <time.h>
-#include <sys/poll.h>
+#include <poll.h>
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <sys/wait.h>
tests/kms_vblank.c +1 -1
index 956ba483a..696bc0b71 100644
@@ -37,8 +37,8 @@
 #include <fcntl.h>
 #include <inttypes.h>
 #include <errno.h>
+#include <poll.h>
 #include <time.h>
-#include <sys/poll.h>
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <sys/wait.h>
tests/prime_vgem.c +1 -1
index fa19d8e64..8f1cf8552 100644
@@ -21,8 +21,8 @@
  * IN THE SOFTWARE.
  */
 
+#include <poll.h>
 #include <sys/ioctl.h>
-#include <sys/poll.h>
 #include <time.h>
 
 #include "i915/gem.h"
tests/testdisplay.c +1 -1
index 109ed496a..e83655fb5 100644
@@ -64,8 +64,8 @@
 #include <stdbool.h>
 #include <strings.h>
 #include <unistd.h>
+#include <poll.h>
 #include <termios.h>
-#include <sys/poll.h>
 #include <sys/time.h>
 #include <sys/ioctl.h>
 #include <sys/types.h>
tests/vgem_basic.c +1 -1
index cb92efbf5..6d4b89976 100644
@@ -27,8 +27,8 @@
 #include "igt_debugfs.h"
 #include "igt_sysfs.h"
 
+#include <poll.h>
 #include <sys/mman.h>
-#include <sys/poll.h>
 #include <sys/stat.h>
 #include <dirent.h>
 /**
tests/vgem_slow.c +1 -1
index 35761a4ee..91c3fc501 100644
@@ -26,8 +26,8 @@
 #include "igt_debugfs.h"
 #include "igt_sysfs.h"
 
+#include <poll.h>
 #include <sys/mman.h>
-#include <sys/poll.h>
 #include <sys/stat.h>
 #include <dirent.h>
 /**
Signature · 1 line
2.43.2
#15 lore raw

PATCH v2 6/7 tools: use poll.h in includes

In reply to Reagan Bohan

sys/poll.h is non-standard and including it on musl produces a warning.

---
 tools/intel_dp_compliance.c | 2 +-
 tools/intel_guc_logger.c    | 2 +-
 tools/intel_gvtg_test.c     | 2 +-
 tools/msm_dp_compliance.c   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
tools/intel_dp_compliance.c +1 -1
index 2e20d7f09..99196a450 100644
@@ -113,9 +113,9 @@
 #include <stdint.h>
 #include <stdbool.h>
 #include <strings.h>
+#include <poll.h>
 #include <unistd.h>
 #include <termios.h>
-#include <sys/poll.h>
 #include <sys/time.h>
 #include <sys/ioctl.h>
 #include <sys/types.h>
tools/intel_guc_logger.c +1 -1
index 5f1de8db5..629b4e660 100644
@@ -29,10 +29,10 @@
 #include <sys/ioctl.h>
 #include <string.h>
 #include <errno.h>
+#include <poll.h>
 #include <signal.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <sys/poll.h>
 #include <sys/wait.h>
 #include <sys/types.h>
 #include <sys/syscall.h>
tools/intel_gvtg_test.c +1 -1
index ad5ee6a65..408e703bf 100644
@@ -37,9 +37,9 @@
 #include <stdint.h>
 #include <stdbool.h>
 #include <strings.h>
+#include <poll.h>
 #include <unistd.h>
 #include <termios.h>
-#include <sys/poll.h>
 #include <sys/time.h>
 #include <sys/ioctl.h>
 #include <sys/types.h>
tools/msm_dp_compliance.c +1 -1
index 6941d3855..c37b3bc1c 100644
@@ -115,8 +115,8 @@
 #include <stdbool.h>
 #include <strings.h>
 #include <unistd.h>
+#include <poll.h>
 #include <termios.h>
-#include <sys/poll.h>
 #include <sys/time.h>
 #include <sys/ioctl.h>
 #include <sys/types.h>
Signature · 1 line
2.43.2
#16 lore raw

PATCH v2 7/7 Change sys/signal.h to signal.h

In reply to Reagan Bohan

sys/signal.h is non standard, emits a warning on musl libc and is inconsistent with other files (which use just signal.h):

---
 tests/intel/gem_exec_await.c           | 2 +-
 tests/intel/gem_exec_balancer.c        | 2 +-
 tests/intel/gem_exec_fence.c           | 2 +-
 tests/intel/gem_exec_latency.c         | 2 +-
 tests/intel/gem_unref_active_buffers.c | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
tests/intel/gem_exec_await.c +1 -1
index fcbca1547..cc976f09d 100644
@@ -22,8 +22,8 @@
  *
  */
 
+#include <signal.h>
 #include <sys/ioctl.h>
-#include <sys/signal.h>
 
 #include "drmtest.h"
 #include "i915/gem.h"
tests/intel/gem_exec_balancer.c +1 -1
index 7504f3737..83cc7eea4 100644
@@ -23,8 +23,8 @@
 
 #include <fcntl.h>
 #include <sched.h>
+#include <signal.h>
 #include <sys/ioctl.h>
-#include <sys/signal.h>
 #include <poll.h>
 
 #include "dmabuf_sync_file.h"
tests/intel/gem_exec_fence.c +1 -1
index 28bad83f6..deff18abc 100644
@@ -23,8 +23,8 @@
 
 #include <poll.h>
 #include <string.h>
+#include <signal.h>
 #include <sys/ioctl.h>
-#include <sys/signal.h>
 #include "i915/gem.h"
 #include "i915/gem_create.h"
 #include "igt.h"
tests/intel/gem_exec_latency.c +1 -1
index b9d086afc..b802c2f31 100644
@@ -30,10 +30,10 @@
 #include <fcntl.h>
 #include <inttypes.h>
 #include <errno.h>
+#include <signal.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
 #include <sys/time.h>
-#include <sys/signal.h>
 #include <time.h>
 #include <sched.h>
 
tests/intel/gem_unref_active_buffers.c +1 -1
index f8138c7ac..47f792738 100644
@@ -34,8 +34,8 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <inttypes.h>
+#include <signal.h>
 #include <sys/ioctl.h>
-#include <sys/signal.h>
 #include <sys/time.h>
 
 #include "igt.h"
Signature · 1 line
2.43.2
Reviewed-by on the v2 series
#17 lore raw

Re: [PATCH i-g-t v2 0/7] Misc musl fixes.

In reply to Reagan Bohan

Hi Reagan,

Quoted 6 lines · Reagan Bohan

Hello,

In this version I have defined _LARGEFILE64_SOURCE in the meson.build instead of the individual files, split up the change of poll.h, and rewrote commit messages to be more concise.

For series:

Btw I will do small corrections - adding tests: to subject in last patch and also move one include up to keep it in alphabeticall order.

Regards,
Kamil