summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/dumb_buffer.c2
-rw-r--r--tests/i915/gem_gtt_speed.c2
-rw-r--r--tests/i915/gem_madvise.c2
-rw-r--r--tests/i915/gem_userptr_blits.c5
-rw-r--r--tests/i915/i915_pm_rpm.c2
-rw-r--r--tests/i915/perf_pmu.c2
-rw-r--r--tests/kms_atomic.c10
-rw-r--r--tests/kms_vblank.c18
-rw-r--r--tests/prime_nv_pcopy.c2
-rw-r--r--tests/prime_nv_test.c2
-rw-r--r--tests/testdisplay.c2
-rw-r--r--tests/vc4_purgeable_bo.c2
12 files changed, 26 insertions, 25 deletions
diff --git a/tests/dumb_buffer.c b/tests/dumb_buffer.c
index 44f60b6f..cb8d2f51 100644
--- a/tests/dumb_buffer.c
+++ b/tests/dumb_buffer.c
@@ -278,7 +278,7 @@ static void *thread_clear(void *data)
static jmp_buf sigjmp;
-static void sigprobe(int sig)
+__noreturn static void sigprobe(int sig)
{
longjmp(sigjmp, sig);
}
diff --git a/tests/i915/gem_gtt_speed.c b/tests/i915/gem_gtt_speed.c
index 06fe70f8..644af3d3 100644
--- a/tests/i915/gem_gtt_speed.c
+++ b/tests/i915/gem_gtt_speed.c
@@ -82,7 +82,7 @@ static inline unsigned x86_64_features(void)
{
return 0;
}
-static void streaming_load(void *src, int len)
+__noreturn static void streaming_load(void *src, int len)
{
igt_assert(!"reached");
}
diff --git a/tests/i915/gem_madvise.c b/tests/i915/gem_madvise.c
index 623c8b09..2cd0b5d7 100644
--- a/tests/i915/gem_madvise.c
+++ b/tests/i915/gem_madvise.c
@@ -51,7 +51,7 @@ IGT_TEST_DESCRIPTION("Checks that the kernel reports EFAULT when trying to use"
static jmp_buf jmp;
-static void __attribute__((noreturn)) sigtrap(int sig)
+__noreturn static void sigtrap(int sig)
{
siglongjmp(jmp, sig);
}
diff --git a/tests/i915/gem_userptr_blits.c b/tests/i915/gem_userptr_blits.c
index 2f3954c5..1bc2d360 100644
--- a/tests/i915/gem_userptr_blits.c
+++ b/tests/i915/gem_userptr_blits.c
@@ -55,8 +55,6 @@
#include <pthread.h>
#include <time.h>
-#include <linux/memfd.h>
-
#include "drm.h"
#include "i915_drm.h"
@@ -1550,7 +1548,8 @@ static void test_readonly(int i915)
}
static jmp_buf sigjmp;
-static void sigjmp_handler(int sig)
+
+__noreturn static void sigjmp_handler(int sig)
{
siglongjmp(sigjmp, sig);
}
diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c
index 6321dd40..d9ec0388 100644
--- a/tests/i915/i915_pm_rpm.c
+++ b/tests/i915/i915_pm_rpm.c
@@ -1483,7 +1483,7 @@ static void pci_d3_state_subtest(void)
}
}
-static void __attribute__((noreturn)) stay_subtest(void)
+__noreturn static void stay_subtest(void)
{
disable_all_screens_and_wait(&ms_data);
diff --git a/tests/i915/perf_pmu.c b/tests/i915/perf_pmu.c
index 7b175ea8..50b5c82b 100644
--- a/tests/i915/perf_pmu.c
+++ b/tests/i915/perf_pmu.c
@@ -1092,7 +1092,7 @@ event_wait(int gem_fd, const struct intel_execution_engine2 *e)
for (;;) {
union drm_wait_vblank vbl = { };
- vbl.request.type = DRM_VBLANK_RELATIVE;
+ vbl.request.type = _DRM_VBLANK_RELATIVE;
vbl.request.type |= pipe_id_flag;
vbl.request.sequence = 1;
igt_assert_eq(wait_vblank(gem_fd, &vbl), 0);
diff --git a/tests/kms_atomic.c b/tests/kms_atomic.c
index fa6190c9..2965b350 100644
--- a/tests/kms_atomic.c
+++ b/tests/kms_atomic.c
@@ -448,11 +448,11 @@ plane_immutable_zpos(igt_display_t *display, igt_pipe_t *pipe,
for (int i = 0; i < n_planes - 1; i++) {
igt_plane_t *plane_lower, *plane_upper;
- if (plane_ptr[i] != NULL)
- plane_lower = plane_ptr[i];
- else
+ if (plane_ptr[i] == NULL)
continue;
+ plane_lower = plane_ptr[i];
+ plane_upper = NULL;
while (i < (n_planes - 1)) {
if (plane_ptr[i + 1] != NULL) {
plane_upper = plane_ptr[i + 1];
@@ -462,9 +462,11 @@ plane_immutable_zpos(igt_display_t *display, igt_pipe_t *pipe,
continue;
}
}
+ if (!plane_upper)
+ continue;
if ((plane_upper->type == DRM_PLANE_TYPE_CURSOR) ||
- (plane_lower->type == DRM_PLANE_TYPE_CURSOR))
+ (plane_lower->type == DRM_PLANE_TYPE_CURSOR))
continue;
igt_plane_set_position(plane_lower, 0, 0);
diff --git a/tests/kms_vblank.c b/tests/kms_vblank.c
index b00ebec5..31b3f0a6 100644
--- a/tests/kms_vblank.c
+++ b/tests/kms_vblank.c
@@ -230,14 +230,14 @@ static void accuracy(data_t *data, int fd, int nchildren)
int n;
memset(&vbl, 0, sizeof(vbl));
- vbl.request.type = DRM_VBLANK_RELATIVE;
+ vbl.request.type = _DRM_VBLANK_RELATIVE;
vbl.request.type |= pipe_id_flag;
vbl.request.sequence = 1;
igt_assert_eq(wait_vblank(fd, &vbl), 0);
target = vbl.reply.sequence + total;
for (n = 0; n < total; n++) {
- vbl.request.type = DRM_VBLANK_RELATIVE;
+ vbl.request.type = _DRM_VBLANK_RELATIVE;
vbl.request.type |= pipe_id_flag;
vbl.request.sequence = 1;
igt_assert_eq(wait_vblank(fd, &vbl), 0);
@@ -247,7 +247,7 @@ static void accuracy(data_t *data, int fd, int nchildren)
vbl.request.sequence = target;
igt_assert_eq(wait_vblank(fd, &vbl), 0);
}
- vbl.request.type = DRM_VBLANK_RELATIVE;
+ vbl.request.type = _DRM_VBLANK_RELATIVE;
vbl.request.type |= pipe_id_flag;
vbl.request.sequence = 0;
igt_assert_eq(wait_vblank(fd, &vbl), 0);
@@ -268,7 +268,7 @@ static void vblank_query(data_t *data, int fd, int nchildren)
unsigned long sq, count = 0;
memset(&vbl, 0, sizeof(vbl));
- vbl.request.type = DRM_VBLANK_RELATIVE;
+ vbl.request.type = _DRM_VBLANK_RELATIVE;
vbl.request.type |= pipe_id_flag;
vbl.request.sequence = 0;
igt_assert_eq(wait_vblank(fd, &vbl), 0);
@@ -277,7 +277,7 @@ static void vblank_query(data_t *data, int fd, int nchildren)
clock_gettime(CLOCK_MONOTONIC, &start);
do {
- vbl.request.type = DRM_VBLANK_RELATIVE;
+ vbl.request.type = _DRM_VBLANK_RELATIVE;
vbl.request.type |= pipe_id_flag;
vbl.request.sequence = 0;
igt_assert_eq(wait_vblank(fd, &vbl), 0);
@@ -297,7 +297,7 @@ static void vblank_wait(data_t *data, int fd, int nchildren)
unsigned long sq, count = 0;
memset(&vbl, 0, sizeof(vbl));
- vbl.request.type = DRM_VBLANK_RELATIVE;
+ vbl.request.type = _DRM_VBLANK_RELATIVE;
vbl.request.type |= pipe_id_flag;
vbl.request.sequence = 0;
igt_assert_eq(wait_vblank(fd, &vbl), 0);
@@ -306,7 +306,7 @@ static void vblank_wait(data_t *data, int fd, int nchildren)
clock_gettime(CLOCK_MONOTONIC, &start);
do {
- vbl.request.type = DRM_VBLANK_RELATIVE;
+ vbl.request.type = _DRM_VBLANK_RELATIVE;
vbl.request.type |= pipe_id_flag;
vbl.request.sequence = 1;
igt_assert_eq(wait_vblank(fd, &vbl), 0);
@@ -367,7 +367,7 @@ static void vblank_ts_cont(data_t *data, int fd, int nchildren)
if (data->flags & (MODESET | DPMS)) {
/* Attempting to do a vblank while disabled should return -EINVAL */
memset(&vbl, 0, sizeof(vbl));
- vbl.request.type = DRM_VBLANK_RELATIVE;
+ vbl.request.type = _DRM_VBLANK_RELATIVE;
vbl.request.type |= kmstest_get_vbl_flag(data->pipe);
igt_assert_eq(wait_vblank(fd, &vbl), -EINVAL);
}
@@ -476,7 +476,7 @@ static void invalid_subtest(data_t *data, int fd)
/* First check all is well with a simple query */
memset(&vbl, 0, sizeof(vbl));
- vbl.request.type = DRM_VBLANK_RELATIVE;
+ vbl.request.type = _DRM_VBLANK_RELATIVE;
igt_assert_eq(wait_vblank(fd, &vbl), 0);
valid_flags = (_DRM_VBLANK_TYPES_MASK |
diff --git a/tests/prime_nv_pcopy.c b/tests/prime_nv_pcopy.c
index bbcf7680..e465e5fc 100644
--- a/tests/prime_nv_pcopy.c
+++ b/tests/prime_nv_pcopy.c
@@ -139,7 +139,7 @@ BEGIN_NV04(struct nouveau_pushbuf *push, int subc, int mthd, int size)
PUSH_DATA (push, 0x00000000 | (size << 18) | (subc << 13) | mthd);
}
-static inline void
+__maybe_unused static inline void
BEGIN_NI04(struct nouveau_pushbuf *push, int subc, int mthd, int size)
{
PUSH_DATA (push, 0x40000000 | (size << 18) | (subc << 13) | mthd);
diff --git a/tests/prime_nv_test.c b/tests/prime_nv_test.c
index b4714dcb..81d142f4 100644
--- a/tests/prime_nv_test.c
+++ b/tests/prime_nv_test.c
@@ -190,7 +190,7 @@ static void test_nv_write_i915_gtt_mmap_read(void)
/* test drm_intel_bo_map doesn't work properly,
this tries to map the backing shmem fd, which doesn't exist
for these objects */
-static void test_i915_import_cpu_mmap(void)
+__noreturn static void test_i915_import_cpu_mmap(void)
{
drm_intel_bo *test_intel_bo;
int prime_fd;
diff --git a/tests/testdisplay.c b/tests/testdisplay.c
index ef033dc6..e2560eaf 100644
--- a/tests/testdisplay.c
+++ b/tests/testdisplay.c
@@ -542,7 +542,7 @@ int update_display(bool probe)
#define dump_resource(res) if (res) dump_##res()
-static void __attribute__((noreturn)) cleanup_and_exit(int ret)
+__noreturn static void cleanup_and_exit(int ret)
{
close(drm_fd);
exit(ret);
diff --git a/tests/vc4_purgeable_bo.c b/tests/vc4_purgeable_bo.c
index ee89e153..d9f7547f 100644
--- a/tests/vc4_purgeable_bo.c
+++ b/tests/vc4_purgeable_bo.c
@@ -44,7 +44,7 @@ struct igt_vc4_bo {
static jmp_buf jmp;
-static void __attribute__((noreturn)) sigtrap(int sig)
+__noreturn static void sigtrap(int sig)
{
longjmp(jmp, sig);
}