autotest / autotest-client-tests

Autotest client tests
Other
29 stars 84 forks source link

autotest ltp ltplite: issue with chmod06 test pattern #38

Closed CUXIDUMDUM closed 8 years ago

CUXIDUMDUM commented 10 years ago

Hi Ruda/Martin,

I am using ltp(ltplite) test from autotest.

After the ltp tarball is unpacked and compiled,

Existing lines:

grep chmod06 ./bin/runtest/ltplite chmod06 cp -p $LTPROOT/testcases/bin/change_owner $TMPDIR;chmod06 fchmod06 cp -p $LTPROOT/testcases/bin/change_owner $TMPDIR;fchmod06 -D DEVICE -T DEVICE_FS_TYPE

Run with existing setup:

/local/0/autotest/tmp/ltp/src/bin/runltp -f ltplite -s chmod06 -q -l /local/0/autotest/results/default/ltp/results/ltp.log -C /local/0/autotest/results/default/ltp/debug/failcmdfile -d /local/0/autotest/tmp/ltp/src -S /local/0/autotest/tmp/site_tests/ltp/skipfile Checking for required user/group ids

'nobody' user id and group found. 'bin' user id and group found. 'daemon' user id and group found. Users group found. Sys group found. Required users/groups exist. INFO: Test start time: Fri Jul 11 12:16:44 BST 2014 COMMAND: /local/0/autotest/tmp/ltp/src/bin/bin/ltp-pan -q -e -S -a 56810 -n 56810 -f /local/0/autotest/tmp/ltp/src/ltp-BFu9sHEnms/alltests -l /local/0/autotest/results/default/ltp/results/ltp.log -C /local/0/autotest/results/default/ltp/debug/failcmdfile INFO: Restricted to chmod06 LOG File: /local/0/autotest/results/default/ltp/results/ltp.log FAILED COMMAND File: /local/0/autotest/results/default/ltp/debug/failcmdfile Running tests....... chmod06 1 TBROK : you must specify the device used for mounting with -D option chmod06 2 TBROK : Remaining cases broken fchmod06 0 TINFO : Formatting /dev/loop0 with ext2 extra opts='' mke2fs 1.41.12 (17-May-2010) fchmod06 1 TPASS : fchmod: test EPERM success: TEST_ERRNO=EPERM(1): Operation not permitted fchmod06 2 TPASS : fchmod: test EBADF success: TEST_ERRNO=EBADF(9): Bad file descriptor fchmod06 3 TPASS : fchmod: test EROFS success: TEST_ERRNO=EROFS(30): Read-only file system INFO: ltp-pan reported some tests FAIL LTP Version: 20140115


After updating the ltplite command file with (-D DEVICE -T DEVICE_FS_TYPE)

grep chmod06 ./bin/runtest/ltplite
chmod06 cp -p $LTPROOT/testcases/bin/change_owner $TMPDIR;chmod06 -D DEVICE -T DEVICE_FS_TYPE fchmod06 cp -p $LTPROOT/testcases/bin/change_owner $TMPDIR;fchmod06 -D DEVICE -T DEVICE_FS_TYPE

Running with updated command file:

/local/0/autotest/tmp/ltp/src/bin/runltp -f ltplite -s chmod06 -q -l /local/0/autotest/results/default/ltp/results/ltp.log -C /local/0/autotest/results/default/ltp/debug/failcmdfile -d /local/0/autotest/tmp/ltp/src -S /local/0/autotest/tmp/site_tests/ltp/skipfile Checking for required user/group ids

'nobody' user id and group found. 'bin' user id and group found. 'daemon' user id and group found. Users group found. Sys group found. Required users/groups exist. INFO: Test start time: Fri Jul 11 12:17:05 BST 2014 COMMAND: /local/0/autotest/tmp/ltp/src/bin/bin/ltp-pan -q -e -S -a 57415 -n 57415 -f /local/0/autotest/tmp/ltp/src/ltp-UP7DUHGHNZ/alltests -l /local/0/autotest/results/default/ltp/results/ltp.log -C /local/0/autotest/results/default/ltp/debug/failcmdfile INFO: Restricted to chmod06 LOG File: /local/0/autotest/results/default/ltp/results/ltp.log FAILED COMMAND File: /local/0/autotest/results/default/ltp/debug/failcmdfile Running tests....... chmod06 0 TINFO : Formatting /dev/loop0 with ext2 extra opts='' mke2fs 1.41.12 (17-May-2010) chmod06 1 TPASS : chmod failed as expected: TEST_ERRNO=EPERM(1): Operation not permitted chmod06 2 TPASS : chmod failed as expected: TEST_ERRNO=EACCES(13): Permission denied chmod06 3 TPASS : chmod failed as expected: TEST_ERRNO=EFAULT(14): Bad address chmod06 4 TPASS : chmod failed as expected: TEST_ERRNO=EFAULT(14): Bad address chmod06 5 TPASS : chmod failed as expected: TEST_ERRNO=EFAULT(14): Bad address chmod06 6 TPASS : chmod failed as expected: TEST_ERRNO=ENAMETOOLONG(36): File name too long chmod06 7 TPASS : chmod failed as expected: TEST_ERRNO=ENOENT(2): No such file or directory chmod06 8 TPASS : chmod failed as expected: TEST_ERRNO=ENOTDIR(20): Not a directory chmod06 9 TPASS : chmod failed as expected: TEST_ERRNO=EROFS(30): Read-only file system chmod06 10 TPASS : chmod failed as expected: TEST_ERRNO=ELOOP(40): Too many levels of symbolic links fchmod06 0 TINFO : Formatting /dev/loop0 with ext2 extra opts='' mke2fs 1.41.12 (17-May-2010) fchmod06 1 TPASS : fchmod: test EPERM success: TEST_ERRNO=EPERM(1): Operation not permitted fchmod06 2 TPASS : fchmod: test EBADF success: TEST_ERRNO=EBADF(9): Bad file descriptor fchmod06 3 TPASS : fchmod: test EROFS success: TEST_ERRNO=EROFS(30): Read-only file system INFO: ltp-pan reported all tests PASS LTP Version: 20140115

Do you think this is fine? Can this be merged in the autotest’s ltp test?

lmr commented 10 years ago

@CUXIDUMDUM, this should be fixed in LTP. Then we in autotest could update the tarball to the fixed version. The correct way to handle this would be:

1) Subscribe to the ltp ML (ltp-list@lists.sourceforge.net), if you haven't already 2) Create a patch against latest LTP master 3) Let us know whether the patch was accepted. We can update the version in autotest after they release LTP with your code in.

Cheers!

CUXIDUMDUM commented 10 years ago

Thanks lmr. will do the needful.

lmr commented 8 years ago

@CUXIDUMDUM, what's the status on this one?

lmr commented 8 years ago

Wow, I haven't realized this was open on 2014. I'm guessing this didn't have a follow up. I guess I'll simply update the ltp tarball and call it a day.