mbind: Fix test programs

Refs: #1226
Change-Id: I12bf807812d93b7eca8f452e70e70e7c4e32f6a3
This commit is contained in:
Masamichi Takagi
2018-11-30 15:44:58 +09:00
parent b94247c478
commit 6b293409e5
107 changed files with 494 additions and 295 deletions

View File

@@ -1,26 +1,33 @@
#!/bin/sh
START_NG_TEST_NO=0085
for test_case in `ls -1 ./testcases/*.txt`
# Tests with the number >= 0085 are invalid
make -C mcexec_test_proc
for i in {1..84}
do
test_case="./testcases/"`printf "%04d" $i`"_mbind.txt"
test_number=`basename ${test_case} _mbind.txt`
case_name=`basename ${test_case} .txt`
# Skip MPOL_INTERLEAVE tests because it's not supported
if [ "`awk '/USR_PROC/ {print $2}' $test_case`" == "0x8003" ] ||
[ "`awk '/USR_PROC/ {print $5}' $test_case`" == "0x8003" ]; then
echo "[INFO] ${case_name} is skipped because it's trying to test MPOL_INTERLEAVE"
continue
fi
logfile="./result/${case_name}.log"
./mbind_test.sh ${test_case} &> ${logfile}
if [ $? -eq 0 ]; then
./chk_mbind_result.sh ${case_name}
if [ $? -eq 0 ]; then
echo "[OK] ${case_name} is done."
echo "[ OK ] ${case_name} is done."
else
echo "[NG] failed to test ${case_name}. Please check ${logfile}"
echo "[ NG ] failed to test ${case_name}. Please check ${logfile}"
fi
else
test_number=`basename ${test_case} _mbind.txt`
if [ $test_number -ge $START_NG_TEST_NO ]; then
echo "[OK] ${case_name} is done(NG test case)."
else
echo "[NG] failed to test ${case_name}. Please check ${logfile}"
fi
echo "[ NG ] failed to test ${case_name}. Please check ${logfile}"
fi
done