Bryan, I've confirmed that the linkat01 test passes with this fix on x86 with 2.6.21 kernel and arm on 2.6.33 kernel. Thanks!
Henry Yei <[email protected]> On Thu, Apr 22, 2010 at 2:40 PM, Bryan Freed <[email protected]> wrote: > 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 > > ------------------------------------------------------------------------------ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
