Skip to content

Commit

Permalink
ltp: ignore crashme: f00f and admin_tools: su01
Browse files Browse the repository at this point in the history
fix the following issue:
---------
f00f: test only for i386
su01: want to get user's password for sudo
---------

Signed-off-by: Chen Rong <[email protected]>
Signed-off-by: Philip Li <[email protected]>
  • Loading branch information
xilabao authored and rli9 committed Sep 15, 2017
1 parent 1a3655a commit 18f6b93
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
4 changes: 4 additions & 0 deletions pack/ltp-addon/ignored_by_lkp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# i386 only
crashme:f00f
# su01 want to get USER's password
admin_tools:su01
12 changes: 9 additions & 3 deletions stats/ltp
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@

BEGIN {
nr_test = 0
rst_tpass = rst_tfail = rst_tconf = 0
rst_tignore = rst_tpass = rst_tfail = rst_tconf = 0
}

/^tag=/ {
tc_name = substr($1,5)
}

$2 ~ /[0-9]*/ && $3 ~ /ignored_by_lkp/ {
rst_tignore++
}

$2 ~ /[0-9]*/ && $3 ~ /TFAIL/ {
rst_tfail++
}
Expand Down Expand Up @@ -45,7 +49,9 @@ $2 ~ /[0-9]*/ && $3 ~ /TCONF/ {
}

/<<<test_end>>>/ {
if ( rst_tfail ) {
if ( rst_tignore ) {
printf("%s.ignored_by_lkp: 1\n", tc_name)
} else if ( rst_tfail ) {
printf("%s.fail: 1\n", tc_name)
} else if ( rst_tconf ) {
printf("%s.block: 1\n", tc_name)
Expand All @@ -55,7 +61,7 @@ $2 ~ /[0-9]*/ && $3 ~ /TCONF/ {

nr_test += 1
tc_name = "unknown"
rst_tpass = rst_tfail = rst_tconf = 0
rst_tignore = rst_tpass = rst_tfail = rst_tconf = 0
}

END {
Expand Down
17 changes: 17 additions & 0 deletions tests/ltp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@ cd $BENCHMARK_ROOT/ltp || exit

export PATH=/lkp/benchmarks/ltp/bin:$PATH

check_ignored_cases()
{
test=$1
local ignored_by_lkp=$LKP_SRC/pack/ltp-addon/ignored_by_lkp

for i in $(cat "$ignored_by_lkp" | grep -v '^#' | grep -w ^$test)
do
ignore=$(echo $i | awk -F: '{print $2}')
sed -i "s/^${ignore}/#${ignore}/g" runtest/${test}
echo "<<<test_start>>>"
echo "tag=${ignore}"
echo "${ignore} 0 ignored_by_lkp"
echo "<<<test_end>>>"
done
}

workaround_env()
{
# some LTP sh scripts actually need bash. Fixes
Expand Down Expand Up @@ -56,6 +72,7 @@ fs_ext4)
;;
esac

check_ignored_cases $test
log_cmd ./runltp -f $test $big_dev_opt || exit

exit_value=$?
Expand Down

0 comments on commit 18f6b93

Please sign in to comment.