I have a fix for a failing LTP testcase.  Section 6 of the online LTP doc
http://ltp.sourceforge.net/documentation/how-to/ltp.php#_7 says I can
request a test be added by sending to this list, and it looks from the
archive like the subject line for patches should contain "[LTP][PATCH]", so
here goes.  There appears to be no standard diff format, so I will use what
is convenient...

Running the ltp suite on ChromeOS (x86 with a 2.6.32 kernel) fails linkat01
testcase 21:

linkat01   21  TFAIL  :  linkat() failed: TEST_ERRNO=EXDEV(18): Invalid
cross-device link

This is probably because my /tmp is mounted from someplace other than the
filesystem that contains newdirfd.
The goal of testcase 21 is to demonstrate that linking a directory will fail
EPERM.  The fix is to use olddir/. instead of /tmp.

diff -urN
ltp-full-20091231_vanilla/testcases/kernel/syscalls/linkat/linkat01.c
ltp-full-20091231/testcases/kernel/syscalls/linkat/linkat01.c
--- ltp-full-20091231_vanilla/testcases/kernel/syscalls/linkat/linkat01.c
    2009-11-26 23:43:12.000000000 -0800
+++ ltp-full-20091231/testcases/kernel/syscalls/linkat/linkat01.c
2010-04-12 16:28:59.000000000 -0700
@@ -158,7 +158,7 @@
        { &cwd_fd, "/proc/cpuinfo", &newdirfd, TEST_FILE1, 0,
          0, 0, EXDEV },
        /* 21. directory link */
-       { &cwd_fd, "/tmp", &newdirfd, TEST_FILE1, 0,
+       { &olddirfd, ".", &newdirfd, TEST_FILE1, 0,
          0, 0, EPERM },
        /* 22. invalid flag */
        { &olddirfd, TEST_FILE1, &newdirfd, TEST_FILE1, 1,


Let me know if this is the incorrect process for upstreaming LTP patches.

bryan.
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to