mirror of
https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git
synced 2026-10-25 12:39:18 +03:00
A bug was recently discovered in the kernel that can result in the edge event fifo not being correctly initialised and stack contents being returned in edge events. The trigger for the bug is requesting a line with debounce, but not edge detection, and then reconfiguring the line to enable edge detection. Add a test case that triggers the bug. This will fail on kernels that do not contain the fix for the bug. The test is located in a new test file, tests-kernel-uapi.c, intended to contain tests specifically testing some aspect of the kernel uAPI, not libgpiod itself. Signed-off-by: Kent Gibson <warthog618@gmail.com> Link: https://lore.kernel.org/r/20240513160031.309139-1-warthog618@gmail.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
34 lines
902 B
Makefile
34 lines
902 B
Makefile
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
# SPDX-FileCopyrightText: 2017-2022 Bartosz Golaszewski <brgl@bgdev.pl>
|
|
|
|
SUBDIRS = gpiosim
|
|
|
|
AM_CFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/tests/gpiosim/
|
|
AM_CFLAGS += -include $(top_builddir)/config.h
|
|
AM_CFLAGS += -Wall -Wextra -g -std=gnu89 $(GLIB_CFLAGS) $(GIO_CFLAGS)
|
|
AM_CFLAGS += -DG_LOG_DOMAIN=\"gpiod-test\"
|
|
LDADD = $(top_builddir)/lib/libgpiod.la
|
|
LDADD += $(top_builddir)/tests/gpiosim/libgpiosim.la
|
|
LDADD += $(GLIB_LIBS) $(GIO_LIBS)
|
|
|
|
noinst_PROGRAMS = gpiod-test
|
|
|
|
gpiod_test_SOURCES = \
|
|
gpiod-test.c \
|
|
gpiod-test.h \
|
|
gpiod-test-helpers.c \
|
|
gpiod-test-helpers.h \
|
|
gpiod-test-sim.c \
|
|
gpiod-test-sim.h \
|
|
tests-chip.c \
|
|
tests-chip-info.c \
|
|
tests-edge-event.c \
|
|
tests-info-event.c \
|
|
tests-kernel-uapi.c \
|
|
tests-line-config.c \
|
|
tests-line-info.c \
|
|
tests-line-request.c \
|
|
tests-line-settings.c \
|
|
tests-misc.c \
|
|
tests-request-config.c
|