* [PATCH] selftests/liveupdate: include <termios.h> for TCGETS
@ 2026-12-04 12:33 Sasha Levin
2026-12-04 12:35 ` sashiko-bot
2026-12-04 15:10 ` Pratyush Yadav
0 siblings, 2 replies; 3+ messages in thread
From: Sasha Levin @ 2026-12-04 12:33 UTC (permalink / raw)
To: Mike Rapoport, Pasha Tatashin, Pratyush Yadav
Cc: Chris Down, Shuah Khan, kexec, linux-kselftest, linux-kernel
The unknown_ioctl_number test passes TCGETS to a session fd. On powerpc
TCGETS is _IOR('t', 19, struct termios), and nothing that liveupdate.c
includes declares struct termios, so the test does not build there:
liveupdate.c:560:37: error: invalid application of 'sizeof' to
incomplete type 'struct termios'
Include <termios.h>. The test only needs a command that is not a
liveupdate ioctl, so it does not matter that glibc's struct termios is
larger than the kernel's on powerpc.
Fixes: 6f8be8fa8e6f ("selftests/liveupdate: Test ENOTTY for unknown ioctl numbers")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Based on the liveupdate-7.5 branch (6f8be8fa8e6f).
KernelCI hit this in the ppc64le_defconfig selftest builds of my
all-next tree, with gcc 14 and gcc 15. next-20261203 does not have the
commit yet.
Tested by compiling liveupdate.c for powerpc64le with clang 21, the
powerpc UAPI headers of this tree and the glibc 2.43 headers: it fails
with the error above before the patch and compiles with it. On x86_64
"make -C tools/testing/selftests TARGETS=liveupdate" still builds.
tools/testing/selftests/liveupdate/liveupdate.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/liveupdate/liveupdate.c b/tools/testing/selftests/liveupdate/liveupdate.c
index e6ed7a4142ff3..3e5a29b070f55 100644
--- a/tools/testing/selftests/liveupdate/liveupdate.c
+++ b/tools/testing/selftests/liveupdate/liveupdate.c
@@ -22,6 +22,7 @@
#include <fcntl.h>
#include <string.h>
#include <sys/ioctl.h>
+#include <termios.h>
#include <unistd.h>
#include <libliveupdate.h>
base-commit: 6f8be8fa8e6f98d30949762d4e73cedad280dbdb
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] selftests/liveupdate: include <termios.h> for TCGETS
2026-12-04 12:33 [PATCH] selftests/liveupdate: include <termios.h> for TCGETS Sasha Levin
@ 2026-12-04 12:35 ` sashiko-bot
2026-12-04 15:10 ` Pratyush Yadav
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-12-04 12:35 UTC (permalink / raw)
To: Sasha Levin, Mike Rapoport, Pasha Tatashin, Pratyush Yadav
Cc: Chris Down, Shuah Khan, kexec
> The unknown_ioctl_number test passes TCGETS to a session fd. On powerpc
> TCGETS is _IOR('t', 19, struct termios), and nothing that liveupdate.c
> includes declares struct termios, so the test does not build there:
>
> liveupdate.c:560:37: error: invalid application of 'sizeof' to
> incomplete type 'struct termios'
>
> Include <termios.h>. The test only needs a command that is not a
> liveupdate ioctl, so it does not matter that glibc's struct termios is
> larger than the kernel's on powerpc.
>
> Fixes: 6f8be8fa8e6f ("selftests/liveupdate: Test ENOTTY for unknown ioctl numbers")
> Signed-off-by: Sasha Levin <sashal@kernel.org>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261204123303.3067471-1-sashal@kernel.org?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] selftests/liveupdate: include <termios.h> for TCGETS
2026-12-04 12:33 [PATCH] selftests/liveupdate: include <termios.h> for TCGETS Sasha Levin
2026-12-04 12:35 ` sashiko-bot
@ 2026-12-04 15:10 ` Pratyush Yadav
1 sibling, 0 replies; 3+ messages in thread
From: Pratyush Yadav @ 2026-12-04 15:10 UTC (permalink / raw)
To: Sasha Levin
Cc: Mike Rapoport, Pasha Tatashin, Pratyush Yadav, Chris Down,
Shuah Khan, kexec, linux-kselftest, linux-kernel
On Fri, Dec 04 2026, Sasha Levin wrote:
> The unknown_ioctl_number test passes TCGETS to a session fd. On powerpc
> TCGETS is _IOR('t', 19, struct termios), and nothing that liveupdate.c
> includes declares struct termios, so the test does not build there:
>
> liveupdate.c:560:37: error: invalid application of 'sizeof' to
> incomplete type 'struct termios'
>
> Include <termios.h>. The test only needs a command that is not a
> liveupdate ioctl, so it does not matter that glibc's struct termios is
> larger than the kernel's on powerpc.
>
> Fixes: 6f8be8fa8e6f ("selftests/liveupdate: Test ENOTTY for unknown ioctl numbers")
> Signed-off-by: Sasha Levin <sashal@kernel.org>
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
[...]
--
Regards,
Pratyush Yadav
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-12-04 15:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 12:33 [PATCH] selftests/liveupdate: include <termios.h> for TCGETS Sasha Levin
2026-12-04 12:35 ` sashiko-bot
2026-12-04 15:10 ` Pratyush Yadav
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox