[Lsb-messages] /var/www/bzr/lsb/devel/runtime-test r1277: Switch to /dev/null for EINVAL ioctl test.

Jeff Licquia licquia at linuxfoundation.org
Thu May 2 18:01:55 UTC 2013


------------------------------------------------------------
revno: 1277
committer: Jeff Licquia <licquia at linuxfoundation.org>
branch nick: runtime-test-devel-stablefixes
timestamp: Thu 2013-05-02 14:01:55 -0400
message:
  Switch to /dev/null for EINVAL ioctl test.
  
  Using /dev/tty as the test file for EINVAL on a bad ioctl code turns
  out to get the test confused when the test isn't attached to a tty.
  This used to work by accident, but now doesn't because the kernel
  returns ENOTTY instead of EINVAL, which isn't wrong (there are two
  different error conditions, and it's not defined which one should
  have priority).  So, switch the test to use a device that's a lot
  more predictable.
modified:
  modules/vsx-pcts/tset/POSIX.os/files/ioctl/ioctl.c
-------------- next part --------------
=== modified file 'modules/vsx-pcts/tset/POSIX.os/files/ioctl/ioctl.c'
--- a/modules/vsx-pcts/tset/POSIX.os/files/ioctl/ioctl.c	2008-12-10 19:42:07 +0000
+++ b/modules/vsx-pcts/tset/POSIX.os/files/ioctl/ioctl.c	2013-05-02 18:01:55 +0000
@@ -165,8 +165,8 @@
     }
 
     
-    if ((fd=open("/dev/tty", O_RDWR)) == -1) {
-        tet_printf("open() syscall failed for /dev/tty");
+    if ((fd=open("/dev/null", O_RDWR)) == -1) {
+        tet_printf("open() syscall failed for /dev/null");
 	return;
     }
 



More information about the lsb-messages mailing list