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. --- .../kernel/syscalls/utimensat/utimensat_tests.sh | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/testcases/kernel/syscalls/utimensat/utimensat_tests.sh b/testcases/kernel/syscalls/utimensat/utimensat_tests.sh index 5ae252e..9431fc7 100755 --- a/testcases/kernel/syscalls/utimensat/utimensat_tests.sh +++ b/testcases/kernel/syscalls/utimensat/utimensat_tests.sh @@ -295,6 +295,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 -- 1.6.0.2 ------------------------------------------------------------------------------ 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