testcases/kernel/syscalls/ioctl/ioctl01.c has a bug where, if the open()
fails, the error message it prints uses an uninitialized char * variable
instead of the one that holds the device.  This only affects the error
message.  The solution is to use 'devname' instead of 'tty' in the tst_brkm
(), and you can also delete the unused variable, 'char *tty;'.

diff -r a58e88d4c024 testcases/kernel/syscalls/ioctl/ioctl01.c
--- a/testcases/kernel/syscalls/ioctl/ioctl01.c Fri Mar 25 17:21:49 2011
-0400
+++ b/testcases/kernel/syscalls/ioctl/ioctl01.c Thu Apr 14 10:08:39 2011
-0400
@@ -71,7 +71,6 @@
 int fd, fd1;
 int bfd = -1;

-char *tty;
 struct termio termio;

 struct test_case_t {
@@ -125,7 +124,7 @@

        if ((fd = open(devname, O_RDWR, 0777)) < 0) {
                tst_brkm(TBROK, cleanup, "Couldn't open %s, errno = %d",
-                        tty, errno);
+                        devname, errno);
        }

        TEST_EXP_ENOS(exp_enos);

Signed-off-by: Scott Romanowski <[email protected]>,

--
Scott Romanowski
978-899-5384
IBM
Cubicle BG125C
550 King St.
Littleton, MA 01460
------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to