public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] sockioctl01: fix expected errno for pipe ioctl
@ 2012-08-03 11:48 Jan Stancek
  2012-08-06  1:46 ` Wanlong Gao
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Stancek @ 2012-08-03 11:48 UTC (permalink / raw)
  To: ltp-list

[-- Attachment #1: Type: text/plain, Size: 499 bytes --]


commit 46ce341b2f176c2611f12ac390adf862e932eb02
Author: Will Deacon <will.deacon@arm.com>
Date:   Fri May 25 11:39:13 2012 +0100

    pipe: return -ENOIOCTLCMD instead of -EINVAL on unknown ioctl
command

This commit (v3.4-8603-g46ce341 in linux-stable) changed pipe_ioctl,
so vfs_ioctl() now returns ENOTTY instead of EINVAL.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
 testcases/kernel/syscalls/sockioctl/sockioctl01.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-sockioctl01-fix-expected-errno-for-pipe-ioctl.patch --]
[-- Type: text/x-patch; name="0001-sockioctl01-fix-expected-errno-for-pipe-ioctl.patch", Size: 662 bytes --]

diff --git a/testcases/kernel/syscalls/sockioctl/sockioctl01.c b/testcases/kernel/syscalls/sockioctl/sockioctl01.c
index 2b51b26..3300423 100644
--- a/testcases/kernel/syscalls/sockioctl/sockioctl01.c
+++ b/testcases/kernel/syscalls/sockioctl/sockioctl01.c
@@ -202,6 +202,13 @@ void setup0(void)
 		if ((s = open("test", O_RDWR)) == -1)
 			tst_brkm(TBROK, cleanup, "Could not open test - "
 				 "errno: %s", strerror(errno));
+		/*
+		 * kernel commit 46ce341b2f176c2611f12ac390adf862e932eb02
+		 * changed -EINVAL to -ENOIOCTLCMD, so vfs_ioctl now
+		 * returns -ENOTTY.
+		 */
+		if ((tst_kvercmp(3, 5, 0)) >= 0)
+			tdat[testno].experrno = ENOTTY;
 	}
 }
 

[-- Attachment #3: Type: text/plain, Size: 395 bytes --]

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

[-- Attachment #4: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-06  1:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-03 11:48 [LTP] [PATCH] sockioctl01: fix expected errno for pipe ioctl Jan Stancek
2012-08-06  1:46 ` Wanlong Gao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox