Misc. musl libc fixes.
Subsystems (2)
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.
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
@@ -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
@@ -20,6 +20,8 @@* SOFTWARE. */ +#define _LARGEFILE64_SOURCE +#include <assert.h> #include <dirent.h> #include <errno.h>
Signature · 1 line
2.43.2
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
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@@ -20,6 +20,8 @@* SOFTWARE. */ +#define _LARGEFILE64_SOURCE +#include <assert.h> #include <dirent.h> #include <errno.h> Signature · 1 line
2.43.2
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
PATCH 2/3 Change sys/poll.h to poll.h
In reply to Reagan BohanFrom: 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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
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.his 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.his 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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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 2tests/kms_cursor_legacy.c +1
-1@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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
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.
PATCH 3/3 Change sys/signal.h to signal.h
In reply to Reagan BohanFrom: 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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
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.hnon standard, it also:
a) emits a warning on musl libc
b) made the code inconsistent, as some files usedsignal.hand somesys/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@@ -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@@ -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@@ -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@@ -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@@ -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
v2 cover Misc musl fixes.
In reply to Reagan BohanHello,
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.
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
@@ -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
PATCH v2 2/7 lib: use poll.h in includes
In reply to Reagan Bohansys/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
@@ -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
@@ -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
@@ -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
PATCH v2 3/7 benchmarks: use poll.h in includes
In reply to Reagan Bohansys/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
@@ -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
@@ -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
PATCH v2 4/7 runner: use poll.h in includes
In reply to Reagan Bohansys/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
@@ -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
PATCH v2 5/7 tests: use poll.h in includes
In reply to Reagan Bohansys/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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
PATCH v2 6/7 tools: use poll.h in includes
In reply to Reagan Bohansys/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
@@ -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
@@ -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
@@ -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
@@ -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
PATCH v2 7/7 Change sys/signal.h to signal.h
In reply to Reagan Bohansys/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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
Re: [PATCH i-g-t v2 0/7] Misc musl fixes.
In reply to Reagan BohanHi Reagan,
Quoted 6 lines · Reagan Bohan
Hello,
In this version I have defined
_LARGEFILE64_SOURCEin the meson.build instead of the individual files, split up the change ofpoll.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