Run testcase "utimensat01": Pathname test chattr: Inappropriate ioctl for device while reading flags on /tmp/ltp-FAAVCPyWnz/utimensat_tests/utimensat.test_file ./utimensat01 -q /tmp/ltp-FAAVCPyWnz/utimensat_tests/utimensat.test_file 0 n 0 o EXPECTED: EPERM RESULT: SUCCESS 1421205831 0 FAILED test 46
Readable file descriptor (futimens(3)) test chattr: Inappropriate ioctl for device while reading flags on /tmp/ltp-FAAVCPyWnz/utimensat_tests/utimensat.test_file ./utimensat01 -q -d /tmp/ltp-FAAVCPyWnz/utimensat_tests/utimensat.test_file NULL 0 n 0 o EXPECTED: EPERM RESULT: SUCCESS 1421205834 0 FAILED test 47 ... Failed tests: 46 47 48 49 50 51 52 53 54 55 56 57 58 61 62 63 64 65 66 67 68 69 70 73 74 75 76 77 78 The "chattr" command in case failed in some file system (such as memory fs): chattr: Inappropriate ioctl for device while reading flags on I learn that chattr command only can be used in ext2 or ext3 (ext4 is ok now). So we check it before running and test log on no-ext2 file system: <<<test_output>>> incrementing stop test sudo for -n option, non-interactive sudo supports -n chattr: Inappropriate ioctl for device while reading flags on /tmp/ltp-eOFHLGLbuz/utimensat_tests/tmp_file utimensat01 1 TCONF : the chattr command is not supported in test dir results/log: ----------------------------------------- Testcase Result Exit Value -------- ------ ---------- utimensat01 CONF 32 Signed-off-by: Cui Bixuan <cuibix...@huawei.com> --- testcases/kernel/syscalls/utimensat/utimensat_tests.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/testcases/kernel/syscalls/utimensat/utimensat_tests.sh b/testcases/kernel/syscalls/utimensat/utimensat_tests.sh index b8eba51..5b1c287 100755 --- a/testcases/kernel/syscalls/utimensat/utimensat_tests.sh +++ b/testcases/kernel/syscalls/utimensat/utimensat_tests.sh @@ -24,6 +24,7 @@ export TCID=utimensat01 export TST_TOTAL=99 export TST_COUNT=0 +. test.sh if tst_kvercmp 2 6 22 ; then tst_resm TCONF "System kernel version is less than 2.6.22" @@ -300,6 +301,14 @@ nuke_sudoers() } sudo $s_arg -u $test_user mkdir -p $TEST_DIR + +# Make sure chattr command is supported in test dir +touch $TEST_DIR/tmp_file +chattr +a $TEST_DIR/tmp_file +if [ $? -ne 0 ] ; then + tst_brkm TCONF "the chattr command is not supported in test dir" +fi + cd $TEST_DIR chown root $LTPROOT/testcases/bin/$TEST_PROG chmod ugo+x,u+s $LTPROOT/testcases/bin/$TEST_PROG ------------------------------------------------------------------------------ BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM through live exercises http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list