move_pages: Fix and support some specs for LTP.
1. When nodes array is NULL, move_pages doesn't move any pages, instead will return the node where each page currently resides by status array. 2. Check whether all specified node is online or not. Change-Id: Ie3534997833d797e2a9f595d1107b07d46e1c6cf Refs: #1523
This commit is contained in:
committed by
Masamichi Takagi
parent
a0d446b27f
commit
9f39d1cd88
30
test/issues/1523/C1523.sh
Executable file
30
test/issues/1523/C1523.sh
Executable file
@ -0,0 +1,30 @@
|
||||
#/bin/sh
|
||||
|
||||
USELTP=1
|
||||
USEOSTEST=0
|
||||
|
||||
MCREBOOT=0
|
||||
. ../../common.sh
|
||||
|
||||
BOOTPARAM="${BOOTPARAM} -e anon_on_demand"
|
||||
mcreboot
|
||||
|
||||
issue="1523"
|
||||
tid=01
|
||||
|
||||
for tp in move_pages01 move_pages02 move_pages04 move_pages06 move_pages09 move_pages10
|
||||
do
|
||||
tname=`printf "C${issue}T%02d" ${tid}`
|
||||
echo "*** ${tname} start *******************************"
|
||||
sudo $MCEXEC $LTPBIN/$tp 2>&1 | tee $tp.txt
|
||||
ok=`grep PASS $tp.txt | wc -l`
|
||||
ng=`grep FAIL $tp.txt | wc -l`
|
||||
if [ $ng = 0 ]; then
|
||||
echo "*** ${tname} PASSED ($ok)"
|
||||
else
|
||||
echo "*** ${tname} FAILED (ok=$ok ng=$ng)"
|
||||
fi
|
||||
let tid++
|
||||
echo ""
|
||||
done
|
||||
|
||||
11
test/issues/1523/Makefile
Normal file
11
test/issues/1523/Makefile
Normal file
@ -0,0 +1,11 @@
|
||||
CFLAGS=-g
|
||||
LDFLAGS=
|
||||
|
||||
TARGET=
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
test: all
|
||||
./C1523.sh
|
||||
clean:
|
||||
rm -f $(TARGET) *.o *.txt
|
||||
21
test/issues/1523/README
Normal file
21
test/issues/1523/README
Normal file
@ -0,0 +1,21 @@
|
||||
【Issue#1523 動作確認】
|
||||
□ テスト内容
|
||||
1. 以下のLTPがPASSすることを確認する
|
||||
- move_pages01
|
||||
- move_pages02
|
||||
- move_pages04
|
||||
- move_pages06
|
||||
- move_pages09
|
||||
- move_pages10
|
||||
|
||||
□ 実行手順
|
||||
$ make test
|
||||
|
||||
McKernelのインストール先や、OSTEST, LTPの配置場所は、
|
||||
$HOME/.mck_test_config を参照している
|
||||
.mck_test_config は、McKernelをビルドした際に生成されるmck_test_config.sample ファイルを
|
||||
$HOMEにコピーし、適宜編集する
|
||||
|
||||
□ 実行結果
|
||||
x86_64_result.log aarch64_result.log 参照。
|
||||
すべての項目をPASSしていることを確認。
|
||||
25
test/issues/1523/aarch64_result.log
Normal file
25
test/issues/1523/aarch64_result.log
Normal file
@ -0,0 +1,25 @@
|
||||
mcstop+release.sh ... done
|
||||
mcreboot.sh -c 37-43,49-55 -m 2G@2,2G@3 -r 37-43:36+49-55:48 -O -e anon_on_demand ... done
|
||||
*** C1523T01 start *******************************
|
||||
move_pages01 1 TPASS : pages are present in expected nodes
|
||||
*** C1523T01 PASSED (1)
|
||||
|
||||
*** C1523T02 start *******************************
|
||||
move_pages02 1 TPASS : pages are present in expected nodes
|
||||
*** C1523T02 PASSED (1)
|
||||
|
||||
*** C1523T03 start *******************************
|
||||
move_pages04 1 TPASS : status[1] has expected value
|
||||
*** C1523T03 PASSED (1)
|
||||
|
||||
*** C1523T04 start *******************************
|
||||
move_pages06 1 TPASS : move_pages failed with ENODEV as expected
|
||||
*** C1523T04 PASSED (1)
|
||||
|
||||
*** C1523T05 start *******************************
|
||||
move_pages09 1 TPASS : move_pages succeeded
|
||||
*** C1523T05 PASSED (1)
|
||||
|
||||
*** C1523T06 start *******************************
|
||||
move_pages10 1 TPASS : move_pages failed with EINVAL as expected
|
||||
*** C1523T06 PASSED (1)
|
||||
25
test/issues/1523/x86_64_result.log
Normal file
25
test/issues/1523/x86_64_result.log
Normal file
@ -0,0 +1,25 @@
|
||||
mcstop+release.sh ... done
|
||||
mcreboot.sh -c 1-7,9-15,17-23,25-31 -m 10G@0,10G@1 -r 1-7:0+9-15:8+17-23:16+25-31:24 -O -e anon_on_demand ... done
|
||||
*** C1523T01 start *******************************
|
||||
move_pages01 1 TPASS : pages are present in expected nodes
|
||||
*** C1523T01 PASSED (1)
|
||||
|
||||
*** C1523T02 start *******************************
|
||||
move_pages02 1 TPASS : pages are present in expected nodes
|
||||
*** C1523T02 PASSED (1)
|
||||
|
||||
*** C1523T03 start *******************************
|
||||
move_pages04 1 TPASS : status[1] has expected value
|
||||
*** C1523T03 PASSED (1)
|
||||
|
||||
*** C1523T04 start *******************************
|
||||
move_pages06 1 TPASS : move_pages failed with ENODEV as expected
|
||||
*** C1523T04 PASSED (1)
|
||||
|
||||
*** C1523T05 start *******************************
|
||||
move_pages09 1 TPASS : move_pages succeeded
|
||||
*** C1523T05 PASSED (1)
|
||||
|
||||
*** C1523T06 start *******************************
|
||||
move_pages10 1 TPASS : move_pages failed with EINVAL as expected
|
||||
*** C1523T06 PASSED (1)
|
||||
Reference in New Issue
Block a user