[LTP] [PATCH] syscalls/ioctl03: add IFF_NO_CARRIER feature flag

Jan Stancek jstancek@redhat.com
Mon Oct 10 09:08:16 CEST 2022


commit 195624d9c26b ("tun: support not enabling carrier in TUNSETIFF")
introduced IFF_NO_CARRIER feature flag. Add it to known flags
to avoid triggering:
  ioctl03.c:85: TFAIL: (UNKNOWN 0x40)

Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
 testcases/kernel/syscalls/ioctl/ioctl03.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/ioctl/ioctl03.c b/testcases/kernel/syscalls/ioctl/ioctl03.c
index 3d4ac3e240ad..d46c60787644 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl03.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl03.c
@@ -40,6 +40,11 @@
 #define IFF_NAPI_FRAGS	0x0020
 #endif
 
+#ifndef IFF_NO_CARRIER
+#define IFF_NO_CARRIER	0x0040
+#endif
+
+
 static struct {
 	unsigned int flag;
 	const char *name;
@@ -51,7 +56,8 @@ static struct {
 	{IFF_VNET_HDR, "VNET_HDR"},
 	{IFF_MULTI_QUEUE, "MULTI_QUEUE"},
 	{IFF_NAPI, "IFF_NAPI"},
-	{IFF_NAPI_FRAGS, "IFF_NAPI_FRAGS"}
+	{IFF_NAPI_FRAGS, "IFF_NAPI_FRAGS"},
+	{IFF_NO_CARRIER, "IFF_NO_CARRIER"},
 };
 
 static void verify_features(void)
-- 
2.27.0



More information about the ltp mailing list