test: Fix test programs for #1195

Add chmod 666 /dev/mcos0 for fork after setuid()

Refs: #1195
Change-Id: I2bec6a9a8378d246f50a9fc08a345b3235096a06
This commit is contained in:
Ken Sato
2019-02-25 17:36:46 +09:00
committed by Masamichi Takagi
parent 7da5fede8b
commit 764948b51f
3 changed files with 10 additions and 6 deletions

View File

@ -5,6 +5,9 @@ USEOSTEST=0
. ../../common.sh . ../../common.sh
# for fork after setuid()
chmod 666 /dev/mcos0
tid=001 tid=001
echo "*** CT$tid start *******************************" echo "*** CT$tid start *******************************"
sudo ${MCEXEC} ${LTPBIN}/nftw01 2>&1 | tee ./CT${tid}.txt sudo ${MCEXEC} ${LTPBIN}/nftw01 2>&1 | tee ./CT${tid}.txt

View File

@ -24,3 +24,10 @@ $HOMEにコピーし、適宜編集する
□ 実行結果 □ 実行結果
result.log 参照。 result.log 参照。
すべての項目をPASSしていることを確認。 すべての項目をPASSしていることを確認。
なお、以下のようなメッセージが出力されることがあるが、これは本件とは無
関係な不具合により、テスト用ディレクトリの削除に失敗するためである。こ
の失敗はテスト結果に影響を与えないため、無視して構わない。
main_loop: Error: open_exec() fails for /home/centos/project/src/ltp/install/testcases/bin/nftw01: -1 (fd: 3)
fork(): error with child process after fork

View File

@ -1,7 +1,4 @@
*** CT001 start ******************************* *** CT001 start *******************************
Error: Failed to open /dev/mcos0.
ERROR: opening /dev/mcos0
fork(): error with child process after fork
nftw01 1 TPASS : Test block 0 nftw01 1 TPASS : Test block 0
nftw01 2 TPASS : Test block 1 nftw01 2 TPASS : Test block 1
nftw01 3 TPASS : Test block 2 nftw01 3 TPASS : Test block 2
@ -36,9 +33,6 @@ nftw01 31 TPASS : Test passed
*** CT001: PASSED (ok:31, ng:0) *** CT001: PASSED (ok:31, ng:0)
*** CT002 start ******************************* *** CT002 start *******************************
Error: Failed to open /dev/mcos0.
ERROR: opening /dev/mcos0
fork(): error with child process after fork
nftw6401 1 TPASS : Test block 0 nftw6401 1 TPASS : Test block 0
nftw6401 2 TPASS : Test block 1 nftw6401 2 TPASS : Test block 1
nftw6401 3 TPASS : Test block 2 nftw6401 3 TPASS : Test block 2