All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Misc. musl libc fixes.
@ 2024-04-21 23:20 Reagan Bohan
  2024-04-21 23:20 ` [PATCH 1/3] Define _LARGEFILE64_SOURCE for musl libc Reagan Bohan
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Reagan Bohan @ 2024-04-21 23:20 UTC (permalink / raw)
  To: igt-dev

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.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 1/3] Define _LARGEFILE64_SOURCE for musl libc
  2024-04-21 23:20 [PATCH 0/3] Misc. musl libc fixes Reagan Bohan
@ 2024-04-21 23:20 ` Reagan Bohan
  2024-04-22 15:36   ` Kamil Konieczny
  2024-04-21 23:20 ` [PATCH 2/3] Change sys/poll.h to poll.h Reagan Bohan
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 18+ messages in thread
From: Reagan Bohan @ 2024-04-21 23:20 UTC (permalink / raw)
  To: igt-dev; +Cc: Reagan Bohan

From: Reagan Bohan <xbjfk.github@gmail.com>

---
 lib/i915/gem_engine_topology.c       | 2 ++
 tools/i915-perf/i915_perf_recorder.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/lib/i915/gem_engine_topology.c b/lib/i915/gem_engine_topology.c
index afb576afb..9b8fb85e3 100644
--- a/lib/i915/gem_engine_topology.c
+++ b/lib/i915/gem_engine_topology.c
@@ -21,6 +21,8 @@
  * IN THE SOFTWARE.
  */
 
+#define _LARGEFILE64_SOURCE
+
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <sys/syscall.h>
diff --git a/tools/i915-perf/i915_perf_recorder.c b/tools/i915-perf/i915_perf_recorder.c
index ca4354832..5e7c233dd 100644
--- a/tools/i915-perf/i915_perf_recorder.c
+++ b/tools/i915-perf/i915_perf_recorder.c
@@ -20,6 +20,8 @@
  * SOFTWARE.
  */
 
+#define _LARGEFILE64_SOURCE
+
 #include <assert.h>
 #include <dirent.h>
 #include <errno.h>
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 2/3] Change sys/poll.h to poll.h
  2024-04-21 23:20 [PATCH 0/3] Misc. musl libc fixes Reagan Bohan
  2024-04-21 23:20 ` [PATCH 1/3] Define _LARGEFILE64_SOURCE for musl libc Reagan Bohan
@ 2024-04-21 23:20 ` Reagan Bohan
  2024-04-22 15:48   ` Kamil Konieczny
  2024-04-21 23:20 ` [PATCH 3/3] Change sys/signal.h to signal.h Reagan Bohan
  2024-04-27 11:18 ` [PATCH i-g-t v2 0/7] Misc musl fixes Reagan Bohan
  3 siblings, 1 reply; 18+ messages in thread
From: Reagan Bohan @ 2024-04-21 23:20 UTC (permalink / raw)
  To: igt-dev; +Cc: Reagan Bohan

From: Reagan Bohan <xbjfk.github@gmail.com>

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(-)

diff --git a/benchmarks/gem_busy.c b/benchmarks/gem_busy.c
index 514e3387e..95d0fb971 100644
--- a/benchmarks/gem_busy.c
+++ b/benchmarks/gem_busy.c
@@ -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>
diff --git a/benchmarks/gem_latency.c b/benchmarks/gem_latency.c
index 6abf366f9..d3ebab005 100644
--- a/benchmarks/gem_latency.c
+++ b/benchmarks/gem_latency.c
@@ -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"
diff --git a/lib/dmabuf_sync_file.h b/lib/dmabuf_sync_file.h
index d642ff30c..e115b5f94 100644
--- a/lib/dmabuf_sync_file.h
+++ b/lib/dmabuf_sync_file.h
@@ -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>
 
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index d6aeb876b..e7210e5be 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -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>
diff --git a/lib/igt_dummyload.c b/lib/igt_dummyload.c
index 2e842929b..a9a2de077 100644
--- a/lib/igt_dummyload.c
+++ b/lib/igt_dummyload.c
@@ -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>
diff --git a/runner/executor.c b/runner/executor.c
index d3e6296dd..4b374d223 100644
--- a/runner/executor.c
+++ b/runner/executor.c
@@ -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>
 
diff --git a/tests/amdgpu/amd_prime.c b/tests/amdgpu/amd_prime.c
index 6916c3173..6bcf11198 100644
--- a/tests/amdgpu/amd_prime.c
+++ b/tests/amdgpu/amd_prime.c
@@ -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"
diff --git a/tests/core_auth.c b/tests/core_auth.c
index 2d6ad83e9..f4381bba0 100644
--- a/tests/core_auth.c
+++ b/tests/core_auth.c
@@ -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"
 /**
diff --git a/tests/drm_read.c b/tests/drm_read.c
index 94c53fded..144c2140f 100644
--- a/tests/drm_read.c
+++ b/tests/drm_read.c
@@ -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"
 
diff --git a/tests/intel/gem_exec_capture.c b/tests/intel/gem_exec_capture.c
index 57b178f3e..3c8660ac5 100644
--- a/tests/intel/gem_exec_capture.c
+++ b/tests/intel/gem_exec_capture.c
@@ -22,8 +22,8 @@
  */
 
 #include <ctype.h>
+#include <poll.h>
 #include <sched.h>
-#include <sys/poll.h>
 #include <zlib.h>
 
 #include "i915/gem.h"
diff --git a/tests/intel/gem_exec_fair.c b/tests/intel/gem_exec_fair.c
index e71fa2f0d..003cd1c4f 100644
--- a/tests/intel/gem_exec_fair.c
+++ b/tests/intel/gem_exec_fair.c
@@ -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>
diff --git a/tests/intel/gem_exec_fence.c b/tests/intel/gem_exec_fence.c
index e4263b3f9..28bad83f6 100644
--- a/tests/intel/gem_exec_fence.c
+++ b/tests/intel/gem_exec_fence.c
@@ -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"
diff --git a/tests/intel/gem_exec_nop.c b/tests/intel/gem_exec_nop.c
index 6c547a412..0f1da1a47 100644
--- a/tests/intel/gem_exec_nop.c
+++ b/tests/intel/gem_exec_nop.c
@@ -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>
 
diff --git a/tests/intel/gem_exec_schedule.c b/tests/intel/gem_exec_schedule.c
index 70243e72b..cae846794 100644
--- a/tests/intel/gem_exec_schedule.c
+++ b/tests/intel/gem_exec_schedule.c
@@ -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>
diff --git a/tests/intel/gem_wait.c b/tests/intel/gem_wait.c
index fa6eb9f77..149f1ce71 100644
--- a/tests/intel/gem_wait.c
+++ b/tests/intel/gem_wait.c
@@ -25,7 +25,7 @@
  *
  */
 
-#include <sys/poll.h>
+#include <poll.h>
 
 #include "i915/gem.h"
 #include "i915/gem_create.h"
diff --git a/tests/intel/kms_busy.c b/tests/intel/kms_busy.c
index 004d9ee6e..db45e286e 100644
--- a/tests/intel/kms_busy.c
+++ b/tests/intel/kms_busy.c
@@ -31,7 +31,7 @@
  * Test category: functionality test
  */
 
-#include <sys/poll.h>
+#include <poll.h>
 #include <signal.h>
 #include <time.h>
 
diff --git a/tests/intel/prime_busy.c b/tests/intel/prime_busy.c
index 66af5f8a3..351b16138 100644
--- a/tests/intel/prime_busy.c
+++ b/tests/intel/prime_busy.c
@@ -21,7 +21,7 @@
  * IN THE SOFTWARE.
  */
 
-#include <sys/poll.h>
+#include <poll.h>
 
 #include "i915/gem.h"
 #include "i915/gem_create.h"
diff --git a/tests/intel/xe_dma_buf_sync.c b/tests/intel/xe_dma_buf_sync.c
index b69283093..2db576ba8 100644
--- a/tests/intel/xe_dma_buf_sync.c
+++ b/tests/intel/xe_dma_buf_sync.c
@@ -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
diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index a430f735a..5b97028c7 100644
--- a/tests/kms_cursor_legacy.c
+++ b/tests/kms_cursor_legacy.c
@@ -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"
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 15c3b5ba2..d352ee14c 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -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>
 
diff --git a/tests/kms_lease.c b/tests/kms_lease.c
index f7531c803..9e56d8b8b 100644
--- a/tests/kms_lease.c
+++ b/tests/kms_lease.c
@@ -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>
diff --git a/tests/kms_prime.c b/tests/kms_prime.c
index 135c75168..0b5dbf06e 100644
--- a/tests/kms_prime.c
+++ b/tests/kms_prime.c
@@ -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>
 
 /**
diff --git a/tests/kms_sequence.c b/tests/kms_sequence.c
index 23867d1aa..bf3cdf821 100644
--- a/tests/kms_sequence.c
+++ b/tests/kms_sequence.c
@@ -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>
diff --git a/tests/kms_vblank.c b/tests/kms_vblank.c
index 956ba483a..696bc0b71 100644
--- a/tests/kms_vblank.c
+++ b/tests/kms_vblank.c
@@ -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>
diff --git a/tests/prime_vgem.c b/tests/prime_vgem.c
index fa19d8e64..8f1cf8552 100644
--- a/tests/prime_vgem.c
+++ b/tests/prime_vgem.c
@@ -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"
diff --git a/tests/testdisplay.c b/tests/testdisplay.c
index 109ed496a..e83655fb5 100644
--- a/tests/testdisplay.c
+++ b/tests/testdisplay.c
@@ -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>
diff --git a/tests/vgem_basic.c b/tests/vgem_basic.c
index cb92efbf5..6d4b89976 100644
--- a/tests/vgem_basic.c
+++ b/tests/vgem_basic.c
@@ -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>
 /**
diff --git a/tests/vgem_slow.c b/tests/vgem_slow.c
index 35761a4ee..91c3fc501 100644
--- a/tests/vgem_slow.c
+++ b/tests/vgem_slow.c
@@ -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>
 /**
diff --git a/tools/intel_dp_compliance.c b/tools/intel_dp_compliance.c
index 2e20d7f09..99196a450 100644
--- a/tools/intel_dp_compliance.c
+++ b/tools/intel_dp_compliance.c
@@ -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>
diff --git a/tools/intel_guc_logger.c b/tools/intel_guc_logger.c
index 5f1de8db5..629b4e660 100644
--- a/tools/intel_guc_logger.c
+++ b/tools/intel_guc_logger.c
@@ -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>
diff --git a/tools/intel_gvtg_test.c b/tools/intel_gvtg_test.c
index ad5ee6a65..408e703bf 100644
--- a/tools/intel_gvtg_test.c
+++ b/tools/intel_gvtg_test.c
@@ -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>
diff --git a/tools/msm_dp_compliance.c b/tools/msm_dp_compliance.c
index 6941d3855..c37b3bc1c 100644
--- a/tools/msm_dp_compliance.c
+++ b/tools/msm_dp_compliance.c
@@ -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>
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 3/3] Change sys/signal.h to signal.h
  2024-04-21 23:20 [PATCH 0/3] Misc. musl libc fixes Reagan Bohan
  2024-04-21 23:20 ` [PATCH 1/3] Define _LARGEFILE64_SOURCE for musl libc Reagan Bohan
  2024-04-21 23:20 ` [PATCH 2/3] Change sys/poll.h to poll.h Reagan Bohan
@ 2024-04-21 23:20 ` Reagan Bohan
  2024-04-22 15:49   ` Kamil Konieczny
  2024-04-27 11:18 ` [PATCH i-g-t v2 0/7] Misc musl fixes Reagan Bohan
  3 siblings, 1 reply; 18+ messages in thread
From: Reagan Bohan @ 2024-04-21 23:20 UTC (permalink / raw)
  To: igt-dev; +Cc: Reagan Bohan

From: Reagan Bohan <xbjfk.github@gmail.com>

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(-)

diff --git a/tests/intel/gem_exec_await.c b/tests/intel/gem_exec_await.c
index fcbca1547..cc976f09d 100644
--- a/tests/intel/gem_exec_await.c
+++ b/tests/intel/gem_exec_await.c
@@ -22,8 +22,8 @@
  *
  */
 
+#include <signal.h>
 #include <sys/ioctl.h>
-#include <sys/signal.h>
 
 #include "drmtest.h"
 #include "i915/gem.h"
diff --git a/tests/intel/gem_exec_balancer.c b/tests/intel/gem_exec_balancer.c
index 7504f3737..83cc7eea4 100644
--- a/tests/intel/gem_exec_balancer.c
+++ b/tests/intel/gem_exec_balancer.c
@@ -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"
diff --git a/tests/intel/gem_exec_fence.c b/tests/intel/gem_exec_fence.c
index 28bad83f6..deff18abc 100644
--- a/tests/intel/gem_exec_fence.c
+++ b/tests/intel/gem_exec_fence.c
@@ -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"
diff --git a/tests/intel/gem_exec_latency.c b/tests/intel/gem_exec_latency.c
index b9d086afc..b802c2f31 100644
--- a/tests/intel/gem_exec_latency.c
+++ b/tests/intel/gem_exec_latency.c
@@ -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>
 
diff --git a/tests/intel/gem_unref_active_buffers.c b/tests/intel/gem_unref_active_buffers.c
index f8138c7ac..47f792738 100644
--- a/tests/intel/gem_unref_active_buffers.c
+++ b/tests/intel/gem_unref_active_buffers.c
@@ -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"
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/3] Define _LARGEFILE64_SOURCE for musl libc
  2024-04-21 23:20 ` [PATCH 1/3] Define _LARGEFILE64_SOURCE for musl libc Reagan Bohan
@ 2024-04-22 15:36   ` Kamil Konieczny
  2024-04-27  7:11     ` Reagan Bohan
  0 siblings, 1 reply; 18+ messages in thread
From: Kamil Konieczny @ 2024-04-22 15:36 UTC (permalink / raw)
  To: igt-dev; +Cc: Reagan Bohan, Reagan Bohan

Hi Reagan,
On 2024-04-21 at 23:20:46 +0000, Reagan Bohan wrote:
> From: Reagan Bohan <xbjfk.github@gmail.com>

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


> 

Signed-off-by is missing here.

> ---
>  lib/i915/gem_engine_topology.c       | 2 ++
>  tools/i915-perf/i915_perf_recorder.c | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/lib/i915/gem_engine_topology.c b/lib/i915/gem_engine_topology.c
> index afb576afb..9b8fb85e3 100644
> --- a/lib/i915/gem_engine_topology.c
> +++ b/lib/i915/gem_engine_topology.c
> @@ -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

> +
>  #include <fcntl.h>
>  #include <sys/stat.h>
>  #include <sys/syscall.h>
> diff --git a/tools/i915-perf/i915_perf_recorder.c b/tools/i915-perf/i915_perf_recorder.c
> index ca4354832..5e7c233dd 100644
> --- a/tools/i915-perf/i915_perf_recorder.c
> +++ b/tools/i915-perf/i915_perf_recorder.c
> @@ -20,6 +20,8 @@
>   * SOFTWARE.
>   */
>  
> +#define _LARGEFILE64_SOURCE
> +
>  #include <assert.h>
>  #include <dirent.h>
>  #include <errno.h>
> -- 
> 2.43.2
> 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/3] Change sys/poll.h to poll.h
  2024-04-21 23:20 ` [PATCH 2/3] Change sys/poll.h to poll.h Reagan Bohan
@ 2024-04-22 15:48   ` Kamil Konieczny
  2024-04-27  7:06     ` Reagan Bohan
  0 siblings, 1 reply; 18+ messages in thread
From: Kamil Konieczny @ 2024-04-22 15:48 UTC (permalink / raw)
  To: igt-dev; +Cc: Reagan Bohan, Reagan Bohan

Hi Reagan,
On 2024-04-21 at 23:20:47 +0000, Reagan Bohan wrote:
> From: Reagan Bohan <xbjfk.github@gmail.com>
> 
> 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?

> 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:).

> ---
>  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

>  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(-)
> 
> diff --git a/benchmarks/gem_busy.c b/benchmarks/gem_busy.c
> index 514e3387e..95d0fb971 100644
> --- a/benchmarks/gem_busy.c
> +++ b/benchmarks/gem_busy.c
> @@ -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>
> diff --git a/benchmarks/gem_latency.c b/benchmarks/gem_latency.c
> index 6abf366f9..d3ebab005 100644
> --- a/benchmarks/gem_latency.c
> +++ b/benchmarks/gem_latency.c
> @@ -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"
> diff --git a/lib/dmabuf_sync_file.h b/lib/dmabuf_sync_file.h
> index d642ff30c..e115b5f94 100644
> --- a/lib/dmabuf_sync_file.h
> +++ b/lib/dmabuf_sync_file.h
> @@ -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>
>  
> diff --git a/lib/igt_aux.c b/lib/igt_aux.c
> index d6aeb876b..e7210e5be 100644
> --- a/lib/igt_aux.c
> +++ b/lib/igt_aux.c
> @@ -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>
> diff --git a/lib/igt_dummyload.c b/lib/igt_dummyload.c
> index 2e842929b..a9a2de077 100644
> --- a/lib/igt_dummyload.c
> +++ b/lib/igt_dummyload.c
> @@ -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>
> diff --git a/runner/executor.c b/runner/executor.c
> index d3e6296dd..4b374d223 100644
> --- a/runner/executor.c
> +++ b/runner/executor.c
> @@ -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>
>  
> diff --git a/tests/amdgpu/amd_prime.c b/tests/amdgpu/amd_prime.c
> index 6916c3173..6bcf11198 100644
> --- a/tests/amdgpu/amd_prime.c
> +++ b/tests/amdgpu/amd_prime.c
> @@ -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"
> diff --git a/tests/core_auth.c b/tests/core_auth.c
> index 2d6ad83e9..f4381bba0 100644
> --- a/tests/core_auth.c
> +++ b/tests/core_auth.c
> @@ -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"
>  /**
> diff --git a/tests/drm_read.c b/tests/drm_read.c
> index 94c53fded..144c2140f 100644
> --- a/tests/drm_read.c
> +++ b/tests/drm_read.c
> @@ -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"
>  
> diff --git a/tests/intel/gem_exec_capture.c b/tests/intel/gem_exec_capture.c
> index 57b178f3e..3c8660ac5 100644
> --- a/tests/intel/gem_exec_capture.c
> +++ b/tests/intel/gem_exec_capture.c
> @@ -22,8 +22,8 @@
>   */
>  
>  #include <ctype.h>
> +#include <poll.h>
>  #include <sched.h>
> -#include <sys/poll.h>
>  #include <zlib.h>
>  
>  #include "i915/gem.h"
> diff --git a/tests/intel/gem_exec_fair.c b/tests/intel/gem_exec_fair.c
> index e71fa2f0d..003cd1c4f 100644
> --- a/tests/intel/gem_exec_fair.c
> +++ b/tests/intel/gem_exec_fair.c
> @@ -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>
> diff --git a/tests/intel/gem_exec_fence.c b/tests/intel/gem_exec_fence.c
> index e4263b3f9..28bad83f6 100644
> --- a/tests/intel/gem_exec_fence.c
> +++ b/tests/intel/gem_exec_fence.c
> @@ -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"
> diff --git a/tests/intel/gem_exec_nop.c b/tests/intel/gem_exec_nop.c
> index 6c547a412..0f1da1a47 100644
> --- a/tests/intel/gem_exec_nop.c
> +++ b/tests/intel/gem_exec_nop.c
> @@ -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>
>  
> diff --git a/tests/intel/gem_exec_schedule.c b/tests/intel/gem_exec_schedule.c
> index 70243e72b..cae846794 100644
> --- a/tests/intel/gem_exec_schedule.c
> +++ b/tests/intel/gem_exec_schedule.c
> @@ -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>
> diff --git a/tests/intel/gem_wait.c b/tests/intel/gem_wait.c
> index fa6eb9f77..149f1ce71 100644
> --- a/tests/intel/gem_wait.c
> +++ b/tests/intel/gem_wait.c
> @@ -25,7 +25,7 @@
>   *
>   */
>  
> -#include <sys/poll.h>
> +#include <poll.h>
>  
>  #include "i915/gem.h"
>  #include "i915/gem_create.h"
> diff --git a/tests/intel/kms_busy.c b/tests/intel/kms_busy.c
> index 004d9ee6e..db45e286e 100644
> --- a/tests/intel/kms_busy.c
> +++ b/tests/intel/kms_busy.c
> @@ -31,7 +31,7 @@
>   * Test category: functionality test
>   */
>  
> -#include <sys/poll.h>
> +#include <poll.h>
>  #include <signal.h>
>  #include <time.h>
>  
> diff --git a/tests/intel/prime_busy.c b/tests/intel/prime_busy.c
> index 66af5f8a3..351b16138 100644
> --- a/tests/intel/prime_busy.c
> +++ b/tests/intel/prime_busy.c
> @@ -21,7 +21,7 @@
>   * IN THE SOFTWARE.
>   */
>  
> -#include <sys/poll.h>
> +#include <poll.h>
>  
>  #include "i915/gem.h"
>  #include "i915/gem_create.h"
> diff --git a/tests/intel/xe_dma_buf_sync.c b/tests/intel/xe_dma_buf_sync.c
> index b69283093..2db576ba8 100644
> --- a/tests/intel/xe_dma_buf_sync.c
> +++ b/tests/intel/xe_dma_buf_sync.c
> @@ -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
> diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
> index a430f735a..5b97028c7 100644
> --- a/tests/kms_cursor_legacy.c
> +++ b/tests/kms_cursor_legacy.c
> @@ -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"
> diff --git a/tests/kms_flip.c b/tests/kms_flip.c
> index 15c3b5ba2..d352ee14c 100755
> --- a/tests/kms_flip.c
> +++ b/tests/kms_flip.c
> @@ -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>
>  
> diff --git a/tests/kms_lease.c b/tests/kms_lease.c
> index f7531c803..9e56d8b8b 100644
> --- a/tests/kms_lease.c
> +++ b/tests/kms_lease.c
> @@ -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>
> diff --git a/tests/kms_prime.c b/tests/kms_prime.c
> index 135c75168..0b5dbf06e 100644
> --- a/tests/kms_prime.c
> +++ b/tests/kms_prime.c
> @@ -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>
>  
>  /**
> diff --git a/tests/kms_sequence.c b/tests/kms_sequence.c
> index 23867d1aa..bf3cdf821 100644
> --- a/tests/kms_sequence.c
> +++ b/tests/kms_sequence.c
> @@ -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>
> diff --git a/tests/kms_vblank.c b/tests/kms_vblank.c
> index 956ba483a..696bc0b71 100644
> --- a/tests/kms_vblank.c
> +++ b/tests/kms_vblank.c
> @@ -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>
> diff --git a/tests/prime_vgem.c b/tests/prime_vgem.c
> index fa19d8e64..8f1cf8552 100644
> --- a/tests/prime_vgem.c
> +++ b/tests/prime_vgem.c
> @@ -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"
> diff --git a/tests/testdisplay.c b/tests/testdisplay.c
> index 109ed496a..e83655fb5 100644
> --- a/tests/testdisplay.c
> +++ b/tests/testdisplay.c
> @@ -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>
> diff --git a/tests/vgem_basic.c b/tests/vgem_basic.c
> index cb92efbf5..6d4b89976 100644
> --- a/tests/vgem_basic.c
> +++ b/tests/vgem_basic.c
> @@ -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>
>  /**
> diff --git a/tests/vgem_slow.c b/tests/vgem_slow.c
> index 35761a4ee..91c3fc501 100644
> --- a/tests/vgem_slow.c
> +++ b/tests/vgem_slow.c
> @@ -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>
>  /**
> diff --git a/tools/intel_dp_compliance.c b/tools/intel_dp_compliance.c
> index 2e20d7f09..99196a450 100644
> --- a/tools/intel_dp_compliance.c
> +++ b/tools/intel_dp_compliance.c
> @@ -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>
> diff --git a/tools/intel_guc_logger.c b/tools/intel_guc_logger.c
> index 5f1de8db5..629b4e660 100644
> --- a/tools/intel_guc_logger.c
> +++ b/tools/intel_guc_logger.c
> @@ -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>
> diff --git a/tools/intel_gvtg_test.c b/tools/intel_gvtg_test.c
> index ad5ee6a65..408e703bf 100644
> --- a/tools/intel_gvtg_test.c
> +++ b/tools/intel_gvtg_test.c
> @@ -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>
> diff --git a/tools/msm_dp_compliance.c b/tools/msm_dp_compliance.c
> index 6941d3855..c37b3bc1c 100644
> --- a/tools/msm_dp_compliance.c
> +++ b/tools/msm_dp_compliance.c
> @@ -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>
> -- 
> 2.43.2
> 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 3/3] Change sys/signal.h to signal.h
  2024-04-21 23:20 ` [PATCH 3/3] Change sys/signal.h to signal.h Reagan Bohan
@ 2024-04-22 15:49   ` Kamil Konieczny
  0 siblings, 0 replies; 18+ messages in thread
From: Kamil Konieczny @ 2024-04-22 15:49 UTC (permalink / raw)
  To: igt-dev; +Cc: Reagan Bohan, Reagan Bohan

Hi Reagan,
On 2024-04-21 at 23:20:48 +0000, Reagan Bohan wrote:
> From: Reagan Bohan <xbjfk.github@gmail.com>
> 
> 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

> ---
>  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(-)
> 
> diff --git a/tests/intel/gem_exec_await.c b/tests/intel/gem_exec_await.c
> index fcbca1547..cc976f09d 100644
> --- a/tests/intel/gem_exec_await.c
> +++ b/tests/intel/gem_exec_await.c
> @@ -22,8 +22,8 @@
>   *
>   */
>  
> +#include <signal.h>
>  #include <sys/ioctl.h>
> -#include <sys/signal.h>
>  
>  #include "drmtest.h"
>  #include "i915/gem.h"
> diff --git a/tests/intel/gem_exec_balancer.c b/tests/intel/gem_exec_balancer.c
> index 7504f3737..83cc7eea4 100644
> --- a/tests/intel/gem_exec_balancer.c
> +++ b/tests/intel/gem_exec_balancer.c
> @@ -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"
> diff --git a/tests/intel/gem_exec_fence.c b/tests/intel/gem_exec_fence.c
> index 28bad83f6..deff18abc 100644
> --- a/tests/intel/gem_exec_fence.c
> +++ b/tests/intel/gem_exec_fence.c
> @@ -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"
> diff --git a/tests/intel/gem_exec_latency.c b/tests/intel/gem_exec_latency.c
> index b9d086afc..b802c2f31 100644
> --- a/tests/intel/gem_exec_latency.c
> +++ b/tests/intel/gem_exec_latency.c
> @@ -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>
>  
> diff --git a/tests/intel/gem_unref_active_buffers.c b/tests/intel/gem_unref_active_buffers.c
> index f8138c7ac..47f792738 100644
> --- a/tests/intel/gem_unref_active_buffers.c
> +++ b/tests/intel/gem_unref_active_buffers.c
> @@ -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"
> -- 
> 2.43.2
> 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/3] Change sys/poll.h to poll.h
  2024-04-22 15:48   ` Kamil Konieczny
@ 2024-04-27  7:06     ` Reagan Bohan
  0 siblings, 0 replies; 18+ messages in thread
From: Reagan Bohan @ 2024-04-27  7:06 UTC (permalink / raw)
  To: Kamil Konieczny, igt-dev, Reagan Bohan

Hi Kamil,

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

> 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.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/3] Define _LARGEFILE64_SOURCE for musl libc
  2024-04-22 15:36   ` Kamil Konieczny
@ 2024-04-27  7:11     ` Reagan Bohan
  0 siblings, 0 replies; 18+ messages in thread
From: Reagan Bohan @ 2024-04-27  7:11 UTC (permalink / raw)
  To: Kamil Konieczny, igt-dev, Reagan Bohan

Hi Kamil,

> 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH i-g-t v2 0/7] Misc musl fixes.
  2024-04-21 23:20 [PATCH 0/3] Misc. musl libc fixes Reagan Bohan
                   ` (2 preceding siblings ...)
  2024-04-21 23:20 ` [PATCH 3/3] Change sys/signal.h to signal.h Reagan Bohan
@ 2024-04-27 11:18 ` Reagan Bohan
  2024-04-27 11:18   ` [PATCH i-g-t v2 1/7] Define _LARGEFILE64_SOURCE for musl libc Reagan Bohan
                     ` (7 more replies)
  3 siblings, 8 replies; 18+ messages in thread
From: Reagan Bohan @ 2024-04-27 11:18 UTC (permalink / raw)
  To: igt-dev

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.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH i-g-t v2 1/7] Define _LARGEFILE64_SOURCE for musl libc
  2024-04-27 11:18 ` [PATCH i-g-t v2 0/7] Misc musl fixes Reagan Bohan
@ 2024-04-27 11:18   ` Reagan Bohan
  2024-04-27 11:18   ` [PATCH i-g-t v2 2/7] lib: use poll.h in includes Reagan Bohan
                     ` (6 subsequent siblings)
  7 siblings, 0 replies; 18+ messages in thread
From: Reagan Bohan @ 2024-04-27 11:18 UTC (permalink / raw)
  To: igt-dev; +Cc: Reagan Bohan

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

Signed-off-by: Reagan Bohan <reagan@ourmail.work>
---
 meson.build | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meson.build b/meson.build
index cee8a7446..4a9c7d55e 100644
--- a/meson.build
+++ b/meson.build
@@ -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
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH i-g-t v2 2/7] lib: use poll.h in includes
  2024-04-27 11:18 ` [PATCH i-g-t v2 0/7] Misc musl fixes Reagan Bohan
  2024-04-27 11:18   ` [PATCH i-g-t v2 1/7] Define _LARGEFILE64_SOURCE for musl libc Reagan Bohan
@ 2024-04-27 11:18   ` Reagan Bohan
  2024-04-27 11:18   ` [PATCH i-g-t v2 3/7] benchmarks: " Reagan Bohan
                     ` (5 subsequent siblings)
  7 siblings, 0 replies; 18+ messages in thread
From: Reagan Bohan @ 2024-04-27 11:18 UTC (permalink / raw)
  To: igt-dev; +Cc: Reagan Bohan

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

Signed-off-by: Reagan Bohan <reagan@ourmail.work>
---
 lib/dmabuf_sync_file.h | 2 +-
 lib/igt_aux.c          | 2 +-
 lib/igt_dummyload.c    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/dmabuf_sync_file.h b/lib/dmabuf_sync_file.h
index d642ff30c..e115b5f94 100644
--- a/lib/dmabuf_sync_file.h
+++ b/lib/dmabuf_sync_file.h
@@ -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>
 
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index d6aeb876b..e7210e5be 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -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>
diff --git a/lib/igt_dummyload.c b/lib/igt_dummyload.c
index 2e842929b..a9a2de077 100644
--- a/lib/igt_dummyload.c
+++ b/lib/igt_dummyload.c
@@ -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>
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH i-g-t v2 3/7] benchmarks: use poll.h in includes
  2024-04-27 11:18 ` [PATCH i-g-t v2 0/7] Misc musl fixes Reagan Bohan
  2024-04-27 11:18   ` [PATCH i-g-t v2 1/7] Define _LARGEFILE64_SOURCE for musl libc Reagan Bohan
  2024-04-27 11:18   ` [PATCH i-g-t v2 2/7] lib: use poll.h in includes Reagan Bohan
@ 2024-04-27 11:18   ` Reagan Bohan
  2024-04-27 11:18   ` [PATCH i-g-t v2 4/7] runner: " Reagan Bohan
                     ` (4 subsequent siblings)
  7 siblings, 0 replies; 18+ messages in thread
From: Reagan Bohan @ 2024-04-27 11:18 UTC (permalink / raw)
  To: igt-dev; +Cc: Reagan Bohan

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

Signed-off-by: Reagan Bohan <reagan@ourmail.work>
---
 benchmarks/gem_busy.c    | 2 +-
 benchmarks/gem_latency.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/benchmarks/gem_busy.c b/benchmarks/gem_busy.c
index 514e3387e..95d0fb971 100644
--- a/benchmarks/gem_busy.c
+++ b/benchmarks/gem_busy.c
@@ -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>
diff --git a/benchmarks/gem_latency.c b/benchmarks/gem_latency.c
index 6abf366f9..d3ebab005 100644
--- a/benchmarks/gem_latency.c
+++ b/benchmarks/gem_latency.c
@@ -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"
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH i-g-t v2 4/7] runner: use poll.h in includes
  2024-04-27 11:18 ` [PATCH i-g-t v2 0/7] Misc musl fixes Reagan Bohan
                     ` (2 preceding siblings ...)
  2024-04-27 11:18   ` [PATCH i-g-t v2 3/7] benchmarks: " Reagan Bohan
@ 2024-04-27 11:18   ` Reagan Bohan
  2024-04-27 11:18   ` [PATCH i-g-t v2 5/7] tests: " Reagan Bohan
                     ` (3 subsequent siblings)
  7 siblings, 0 replies; 18+ messages in thread
From: Reagan Bohan @ 2024-04-27 11:18 UTC (permalink / raw)
  To: igt-dev; +Cc: Reagan Bohan

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

Signed-off-by: Reagan Bohan <reagan@ourmail.work>
---
 runner/executor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/runner/executor.c b/runner/executor.c
index d3e6296dd..4b374d223 100644
--- a/runner/executor.c
+++ b/runner/executor.c
@@ -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>
 
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH i-g-t v2 5/7] tests: use poll.h in includes
  2024-04-27 11:18 ` [PATCH i-g-t v2 0/7] Misc musl fixes Reagan Bohan
                     ` (3 preceding siblings ...)
  2024-04-27 11:18   ` [PATCH i-g-t v2 4/7] runner: " Reagan Bohan
@ 2024-04-27 11:18   ` Reagan Bohan
  2024-04-27 11:18   ` [PATCH i-g-t v2 6/7] tools: " Reagan Bohan
                     ` (2 subsequent siblings)
  7 siblings, 0 replies; 18+ messages in thread
From: Reagan Bohan @ 2024-04-27 11:18 UTC (permalink / raw)
  To: igt-dev; +Cc: Reagan Bohan

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

Signed-off-by: Reagan Bohan <reagan@ourmail.work>
---
 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(-)

diff --git a/tests/amdgpu/amd_prime.c b/tests/amdgpu/amd_prime.c
index 6916c3173..6bcf11198 100644
--- a/tests/amdgpu/amd_prime.c
+++ b/tests/amdgpu/amd_prime.c
@@ -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"
diff --git a/tests/core_auth.c b/tests/core_auth.c
index 2d6ad83e9..f4381bba0 100644
--- a/tests/core_auth.c
+++ b/tests/core_auth.c
@@ -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"
 /**
diff --git a/tests/drm_read.c b/tests/drm_read.c
index 94c53fded..144c2140f 100644
--- a/tests/drm_read.c
+++ b/tests/drm_read.c
@@ -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"
 
diff --git a/tests/intel/gem_exec_capture.c b/tests/intel/gem_exec_capture.c
index 57b178f3e..3c8660ac5 100644
--- a/tests/intel/gem_exec_capture.c
+++ b/tests/intel/gem_exec_capture.c
@@ -22,8 +22,8 @@
  */
 
 #include <ctype.h>
+#include <poll.h>
 #include <sched.h>
-#include <sys/poll.h>
 #include <zlib.h>
 
 #include "i915/gem.h"
diff --git a/tests/intel/gem_exec_fair.c b/tests/intel/gem_exec_fair.c
index e71fa2f0d..003cd1c4f 100644
--- a/tests/intel/gem_exec_fair.c
+++ b/tests/intel/gem_exec_fair.c
@@ -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>
diff --git a/tests/intel/gem_exec_fence.c b/tests/intel/gem_exec_fence.c
index e4263b3f9..28bad83f6 100644
--- a/tests/intel/gem_exec_fence.c
+++ b/tests/intel/gem_exec_fence.c
@@ -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"
diff --git a/tests/intel/gem_exec_nop.c b/tests/intel/gem_exec_nop.c
index 6c547a412..0f1da1a47 100644
--- a/tests/intel/gem_exec_nop.c
+++ b/tests/intel/gem_exec_nop.c
@@ -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>
 
diff --git a/tests/intel/gem_exec_schedule.c b/tests/intel/gem_exec_schedule.c
index 70243e72b..cae846794 100644
--- a/tests/intel/gem_exec_schedule.c
+++ b/tests/intel/gem_exec_schedule.c
@@ -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>
diff --git a/tests/intel/gem_wait.c b/tests/intel/gem_wait.c
index fa6eb9f77..149f1ce71 100644
--- a/tests/intel/gem_wait.c
+++ b/tests/intel/gem_wait.c
@@ -25,7 +25,7 @@
  *
  */
 
-#include <sys/poll.h>
+#include <poll.h>
 
 #include "i915/gem.h"
 #include "i915/gem_create.h"
diff --git a/tests/intel/kms_busy.c b/tests/intel/kms_busy.c
index 004d9ee6e..db45e286e 100644
--- a/tests/intel/kms_busy.c
+++ b/tests/intel/kms_busy.c
@@ -31,7 +31,7 @@
  * Test category: functionality test
  */
 
-#include <sys/poll.h>
+#include <poll.h>
 #include <signal.h>
 #include <time.h>
 
diff --git a/tests/intel/prime_busy.c b/tests/intel/prime_busy.c
index 66af5f8a3..351b16138 100644
--- a/tests/intel/prime_busy.c
+++ b/tests/intel/prime_busy.c
@@ -21,7 +21,7 @@
  * IN THE SOFTWARE.
  */
 
-#include <sys/poll.h>
+#include <poll.h>
 
 #include "i915/gem.h"
 #include "i915/gem_create.h"
diff --git a/tests/intel/xe_dma_buf_sync.c b/tests/intel/xe_dma_buf_sync.c
index b69283093..2db576ba8 100644
--- a/tests/intel/xe_dma_buf_sync.c
+++ b/tests/intel/xe_dma_buf_sync.c
@@ -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
diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index a430f735a..5b97028c7 100644
--- a/tests/kms_cursor_legacy.c
+++ b/tests/kms_cursor_legacy.c
@@ -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"
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 15c3b5ba2..d352ee14c 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -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>
 
diff --git a/tests/kms_lease.c b/tests/kms_lease.c
index f7531c803..9e56d8b8b 100644
--- a/tests/kms_lease.c
+++ b/tests/kms_lease.c
@@ -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>
diff --git a/tests/kms_prime.c b/tests/kms_prime.c
index 135c75168..0b5dbf06e 100644
--- a/tests/kms_prime.c
+++ b/tests/kms_prime.c
@@ -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>
 
 /**
diff --git a/tests/kms_sequence.c b/tests/kms_sequence.c
index 23867d1aa..bf3cdf821 100644
--- a/tests/kms_sequence.c
+++ b/tests/kms_sequence.c
@@ -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>
diff --git a/tests/kms_vblank.c b/tests/kms_vblank.c
index 956ba483a..696bc0b71 100644
--- a/tests/kms_vblank.c
+++ b/tests/kms_vblank.c
@@ -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>
diff --git a/tests/prime_vgem.c b/tests/prime_vgem.c
index fa19d8e64..8f1cf8552 100644
--- a/tests/prime_vgem.c
+++ b/tests/prime_vgem.c
@@ -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"
diff --git a/tests/testdisplay.c b/tests/testdisplay.c
index 109ed496a..e83655fb5 100644
--- a/tests/testdisplay.c
+++ b/tests/testdisplay.c
@@ -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>
diff --git a/tests/vgem_basic.c b/tests/vgem_basic.c
index cb92efbf5..6d4b89976 100644
--- a/tests/vgem_basic.c
+++ b/tests/vgem_basic.c
@@ -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>
 /**
diff --git a/tests/vgem_slow.c b/tests/vgem_slow.c
index 35761a4ee..91c3fc501 100644
--- a/tests/vgem_slow.c
+++ b/tests/vgem_slow.c
@@ -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>
 /**
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH i-g-t v2 6/7] tools: use poll.h in includes
  2024-04-27 11:18 ` [PATCH i-g-t v2 0/7] Misc musl fixes Reagan Bohan
                     ` (4 preceding siblings ...)
  2024-04-27 11:18   ` [PATCH i-g-t v2 5/7] tests: " Reagan Bohan
@ 2024-04-27 11:18   ` Reagan Bohan
  2024-04-27 11:18   ` [PATCH i-g-t v2 7/7] Change sys/signal.h to signal.h Reagan Bohan
  2024-05-06 16:30   ` [PATCH i-g-t v2 0/7] Misc musl fixes Kamil Konieczny
  7 siblings, 0 replies; 18+ messages in thread
From: Reagan Bohan @ 2024-04-27 11:18 UTC (permalink / raw)
  To: igt-dev; +Cc: Reagan Bohan

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

Signed-off-by: Reagan Bohan <reagan@ourmail.work>
---
 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(-)

diff --git a/tools/intel_dp_compliance.c b/tools/intel_dp_compliance.c
index 2e20d7f09..99196a450 100644
--- a/tools/intel_dp_compliance.c
+++ b/tools/intel_dp_compliance.c
@@ -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>
diff --git a/tools/intel_guc_logger.c b/tools/intel_guc_logger.c
index 5f1de8db5..629b4e660 100644
--- a/tools/intel_guc_logger.c
+++ b/tools/intel_guc_logger.c
@@ -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>
diff --git a/tools/intel_gvtg_test.c b/tools/intel_gvtg_test.c
index ad5ee6a65..408e703bf 100644
--- a/tools/intel_gvtg_test.c
+++ b/tools/intel_gvtg_test.c
@@ -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>
diff --git a/tools/msm_dp_compliance.c b/tools/msm_dp_compliance.c
index 6941d3855..c37b3bc1c 100644
--- a/tools/msm_dp_compliance.c
+++ b/tools/msm_dp_compliance.c
@@ -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>
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH i-g-t v2 7/7] Change sys/signal.h to signal.h
  2024-04-27 11:18 ` [PATCH i-g-t v2 0/7] Misc musl fixes Reagan Bohan
                     ` (5 preceding siblings ...)
  2024-04-27 11:18   ` [PATCH i-g-t v2 6/7] tools: " Reagan Bohan
@ 2024-04-27 11:18   ` Reagan Bohan
  2024-05-06 16:30   ` [PATCH i-g-t v2 0/7] Misc musl fixes Kamil Konieczny
  7 siblings, 0 replies; 18+ messages in thread
From: Reagan Bohan @ 2024-04-27 11:18 UTC (permalink / raw)
  To: igt-dev; +Cc: 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):

Signed-off-by: Reagan Bohan <reagan@ourmail.work>
---
 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(-)

diff --git a/tests/intel/gem_exec_await.c b/tests/intel/gem_exec_await.c
index fcbca1547..cc976f09d 100644
--- a/tests/intel/gem_exec_await.c
+++ b/tests/intel/gem_exec_await.c
@@ -22,8 +22,8 @@
  *
  */
 
+#include <signal.h>
 #include <sys/ioctl.h>
-#include <sys/signal.h>
 
 #include "drmtest.h"
 #include "i915/gem.h"
diff --git a/tests/intel/gem_exec_balancer.c b/tests/intel/gem_exec_balancer.c
index 7504f3737..83cc7eea4 100644
--- a/tests/intel/gem_exec_balancer.c
+++ b/tests/intel/gem_exec_balancer.c
@@ -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"
diff --git a/tests/intel/gem_exec_fence.c b/tests/intel/gem_exec_fence.c
index 28bad83f6..deff18abc 100644
--- a/tests/intel/gem_exec_fence.c
+++ b/tests/intel/gem_exec_fence.c
@@ -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"
diff --git a/tests/intel/gem_exec_latency.c b/tests/intel/gem_exec_latency.c
index b9d086afc..b802c2f31 100644
--- a/tests/intel/gem_exec_latency.c
+++ b/tests/intel/gem_exec_latency.c
@@ -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>
 
diff --git a/tests/intel/gem_unref_active_buffers.c b/tests/intel/gem_unref_active_buffers.c
index f8138c7ac..47f792738 100644
--- a/tests/intel/gem_unref_active_buffers.c
+++ b/tests/intel/gem_unref_active_buffers.c
@@ -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"
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH i-g-t v2 0/7] Misc musl fixes.
  2024-04-27 11:18 ` [PATCH i-g-t v2 0/7] Misc musl fixes Reagan Bohan
                     ` (6 preceding siblings ...)
  2024-04-27 11:18   ` [PATCH i-g-t v2 7/7] Change sys/signal.h to signal.h Reagan Bohan
@ 2024-05-06 16:30   ` Kamil Konieczny
  7 siblings, 0 replies; 18+ messages in thread
From: Kamil Konieczny @ 2024-05-06 16:30 UTC (permalink / raw)
  To: Reagan Bohan; +Cc: igt-dev

Hi Reagan,
On 2024-04-27 at 11:18:38 +0000, Reagan Bohan wrote:
> 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:
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>

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


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2024-05-06 16:31 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-21 23:20 [PATCH 0/3] Misc. musl libc fixes Reagan Bohan
2024-04-21 23:20 ` [PATCH 1/3] Define _LARGEFILE64_SOURCE for musl libc Reagan Bohan
2024-04-22 15:36   ` Kamil Konieczny
2024-04-27  7:11     ` Reagan Bohan
2024-04-21 23:20 ` [PATCH 2/3] Change sys/poll.h to poll.h Reagan Bohan
2024-04-22 15:48   ` Kamil Konieczny
2024-04-27  7:06     ` Reagan Bohan
2024-04-21 23:20 ` [PATCH 3/3] Change sys/signal.h to signal.h Reagan Bohan
2024-04-22 15:49   ` Kamil Konieczny
2024-04-27 11:18 ` [PATCH i-g-t v2 0/7] Misc musl fixes Reagan Bohan
2024-04-27 11:18   ` [PATCH i-g-t v2 1/7] Define _LARGEFILE64_SOURCE for musl libc Reagan Bohan
2024-04-27 11:18   ` [PATCH i-g-t v2 2/7] lib: use poll.h in includes Reagan Bohan
2024-04-27 11:18   ` [PATCH i-g-t v2 3/7] benchmarks: " Reagan Bohan
2024-04-27 11:18   ` [PATCH i-g-t v2 4/7] runner: " Reagan Bohan
2024-04-27 11:18   ` [PATCH i-g-t v2 5/7] tests: " Reagan Bohan
2024-04-27 11:18   ` [PATCH i-g-t v2 6/7] tools: " Reagan Bohan
2024-04-27 11:18   ` [PATCH i-g-t v2 7/7] Change sys/signal.h to signal.h Reagan Bohan
2024-05-06 16:30   ` [PATCH i-g-t v2 0/7] Misc musl fixes Kamil Konieczny

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.