attached the patch. (fix the `need a tty to run sudo ' problem) Thanks, Caspar
----- "Caspar ZHANG" <[email protected]> wrote: > ----- "Caspar ZHANG" <[email protected]> wrote: > > > ----- "Subrata Modak" <[email protected]> wrote: > > > > > Hi, > > > > > > Anybody seeing it on their system(s): > > > > +1 :-| > > > > I believe some automated testing systems don't have a tty when > > running tests, so this test can't pass. > > > > There's one line in /etc/sudoers > > > > Defaults requiretty > > > > Comment this (need logout?) and it may work. But I have tried yet. > > Update: comment or delete this line and the test can work. no need to > logout. > > But I met the following failure(it seems to be another problem): > > <<<test_output>>> > ============================================================ > > Testing read-only file, owned by self > > ***** Testing times==NULL case ***** > Pathname test > Owner=nobody; perms=-r--------.; EFAs=Extents > ./utimensat01 -q > /mnt/testarea/ltp-W0ugFUAL14/utimensat_tests/utimensat.test_file > EXPECTED: SUCCESS y y > RESULT: SUCCESS 1272358497 1272358497 > PASSED test 1 > > Readable file descriptor (futimens(3)) test > Owner=nobody; perms=-r--------.; EFAs=Extents > ./utimensat01 -q -d > /mnt/testarea/ltp-W0ugFUAL14/utimensat_tests/utimensat.test_file NULL > > EXPECTED: SUCCESS y y > RESULT: SUCCESS 1272358497 1272358497 > PASSED test 2 > > Writable file descriptor (futimens(3)) test > Owner=nobody; perms=-r--------.; EFAs=Extents > ./utimensat01 -q -w -d > /mnt/testarea/ltp-W0ugFUAL14/utimensat_tests/utimensat.test_file NULL > > open: Permission denied > FAILED (bad test setup) > <<<execution_status>>> > initiation_status="ok" > duration=0 termination_type=exited termination_id=1 corefile=no > cutime=5 cstime=10 > <<<test_end>>> > > Thanks, > Caspar > > -- > Kernel Associate Quality Engineer > Red Hat Inc. (Beijing R&D Branch) > > Red Hat China R&D Branch Unit 907, North Tower C, > Raycom Infotech Park, No.2 Kexueyuan Nanlu, > Haidian District, Beijing 100190 > > TEL: +86-10-62608150 > Web: http://www.redhat.com/ > > ------------------------------------------------------------------------------ > _______________________________________________ > Ltp-list mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/ltp-list -- Kernel Associate Quality Engineer Red Hat Inc. (Beijing R&D Branch) Red Hat China R&D Branch Unit 907, North Tower C, Raycom Infotech Park, No.2 Kexueyuan Nanlu, Haidian District, Beijing 100190 TEL: +86-10-62608150 Web: http://www.redhat.com/
Hi, Most automated testing systems have no tty when running tests, so the utimensat01 test may fail with the following error msg: sudo: sorry, you must have a tty to run sudo to avoid this, deleting `Defaults requiretty' line in /etc/sudoers can make this testcase work. Signed-off-by: Caspar ZHANG <[email protected]> --- diff --git a/testcases/kernel/syscalls/utimensat/utimensat_tests.sh b/testcases/kernel/syscalls/utimensat/utimensat_tests.sh index cc136f9..c161476 100644 --- a/testcases/kernel/syscalls/utimensat/utimensat_tests.sh +++ b/testcases/kernel/syscalls/utimensat/utimensat_tests.sh @@ -31,6 +31,11 @@ if tst_kvercmp 2 6 22 ; then exit 0 fi +# Since some automated testing systems have no tty while testing, +# delete this line in /etc/sudoers to avoid the error message: +# `sudo: sorry, you must have a tty to run sudo' +sed -i "/^Defaults.*requiretty$/d" /etc/sudoers + RESULT_FILE=$TMPDIR/utimensat.result TEST_DIR=$TMPDIR/utimensat_tests
------------------------------------------------------------------------------
_______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
