On Fri, Jun 30, 2023 at 08:28:29PM +0800, yuezhang.mo@xxxxxxxxxxx wrote: >> From: Yuezhang Mo <yuezhang.mo@xxxxxxxxxxx> >> >> If iterating more than once and excluding some tests, the >> excluded tests are expunged in the first iteration, but run in >> subsequent iterations. This is not expected. > > Can you provide an example about how to reproduce the issue you metioned above. If run `./check -i 5 -e generic/013`. - generic/013 is expunged in the iteration 1. generic/013 [expunged] - But generic/013 is not expunged in the iteration 2/3/4/5. generic/013 76s ... 78s >> -e) >> xfile=$2; shift ; >> - echo "$xfile" | tr ', ' '\n\n' >> $tmp.xlist >> + exclude_tests+=($(echo "$xfile" | tr ', ' '\n\n')) > > If print to a file, I don't mind above way. But if to an array, how about: > > read -a tmpxlist < <(echo "$xfile" | tr ',' ' ') > exclude_tests+=(${tmpxlist[@]}) >> + exclude_tests+=($(sed "s/#.*$//" "$xfile")) >> + fi > > Similar as above, how about: > > readarray tmpxlist < <(sed "s/#.*$//" $xfile) > exclude_tests+=(${tmpxlist[@]}) > > Feel free to provide better methods if anyone has. >> + if echo ${exclude_tests[*]} | grep -q $TEST_ID; then > > How about using the "-w" option to grep. Due to the number of fstests' cases > will out of 999 (I'm thinking about how to deal with it), we might have > generic/1000 in one day. If so "grep generic/100" will match generic/1000 and > generic/100 both. OK, I will update the patch.