In readlink03 testcase,
When 'Symlink Pathname is empty' the return value was 'ENOENT' but with newer kernels the return value is 'EINVAL'. The following patch will fix this.

readlink03:
Before patch:
...
readlink03 9 TFAIL : readlink() failed, Symlink Pathname is empty, errno=22, expected errno=2
...

After patch:
...
readlink03 9 TPASS : readlink(), Symlink Pathname is empty, returned errno 22 readlink03 10 TPASS : readlink(), Symlink Pathname is empty, returned errno 22
...

Signed-off-by: Nageswara R Sastry <[email protected]>

--
Regards
R.Nageswara Sastry

--- ltp.orig/testcases/kernel/syscalls/readlink/readlink03.c    2011-09-08 
11:32:12.000000000 +0200
+++ ltp/testcases/kernel/syscalls/readlink/readlink03.c 2011-09-12 
13:29:10.000000000 +0200
@@ -173,6 +173,11 @@ int main(int ac, char **av)
                                buf_size = sizeof(buffer);
                        }
 
+                       if (strncmp(test_desc, "Symlink Pathname is empty", 25) 
== 0) {
+                               if ((tst_kvercmp(2, 6, 39)) >= 0)
+                                       Test_cases[i].exp_errno = EINVAL;
+                       }
+
                        /*
                         * Call readlink(2) to test different test conditions.
                         * verify that it fails with -1 return value and sets
@@ -358,4 +363,4 @@ void cleanup()
 
        tst_rmdir();
 
-}
\ No newline at end of file
+}
------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to