Re: [PATCH kvm-unit-tests] scripts: Fix the check whether testname is in the only_tests list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/07/2020 12.05, Paolo Bonzini wrote:
On 01/07/20 11:52, Thomas Huth wrote:
   +function find_word()
+{
+    grep -q " $1 " <<< " $2 "
+}

Ah, clever idea with the surrounding spaces here!

That's what you gain from learning to program in GW-BASIC, who wants
regular expression when you have INSTR.

But seriously: what do you think about adding "-F"?  The use of regex in
only_tests/only_group is not documented and might have surprising
effects.  If we want to keep it, we could replace spaces with newlines
and use ^$ in the regex.

-F sounds fine to me. I'm not aware of anybody trying to use regular expressions in the list of tests, so that should be fine, I think.

 Thomas




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux