]> xenbits.xensource.com Git - libvirt.git/commitdiff
cfg.mk: join not_streq and not_strneq tests
authorJán Tomko <jtomko@redhat.com>
Thu, 16 Jun 2016 12:16:43 +0000 (14:16 +0200)
committerJán Tomko <jtomko@redhat.com>
Thu, 18 Aug 2016 11:37:08 +0000 (13:37 +0200)
The marginally nicer error message is not worth the extra lines in
cfg.mk.

Also drop the excludes since there was only one offender in the tests.

cfg.mk
tests/virstoragetest.c

diff --git a/cfg.mk b/cfg.mk
index 9f236c2c8b759c0a1597c959e49def2fede7d779..9f5949cb250a340e483a890c6e04be8b3dcc9856 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -986,13 +986,8 @@ sc_prohibit_pthread_create:
          $(_sc_search_regexp)
 
 sc_prohibit_not_streq:
-       @prohibit='! *STREQ *\(.*\)'            \
-       halt='Use STRNEQ instead of !STREQ'     \
-         $(_sc_search_regexp)
-
-sc_prohibit_not_strneq:
-       @prohibit='! *STRNEQ *\(.*\)'       \
-       halt='Use STREQ instead of !STRNEQ'     \
+       @prohibit='! *STRN?EQ *\(.*\)'          \
+       halt='Use STRNEQ instead of !STREQ and STREQ instead of !STRNEQ'        \
          $(_sc_search_regexp)
 
 sc_prohibit_verbose_strcat:
@@ -1246,12 +1241,6 @@ exclude_file_name_regexp--sc_prohibit_sysconf_pagesize = \
 exclude_file_name_regexp--sc_prohibit_pthread_create = \
   ^(cfg\.mk|src/util/virthread\.c|tests/.*)$$
 
-exclude_file_name_regexp--sc_prohibit_not_streq = \
-  ^tests/.*\.[ch]$$
-
-exclude_file_name_regexp--sc_prohibit_not_strneq = \
-  ^tests/.*\.[ch]$$
-
 exclude_file_name_regexp--sc_prohibit_dt_without_code = \
   ^docs/(newapi\.xsl|(apps|contact)\.html\.in)$$
 
index b3d59adc3fc97d7178e5a2380b946be4381ed066..f7f5030daa4ea5b55311804d5a49980382437d22 100644 (file)
@@ -698,7 +698,7 @@ testBackingParse(const void *args)
         goto cleanup;
     }
 
-    if (!STREQ(xml, data->expect)) {
+    if (STRNEQ(xml, data->expect)) {
         fprintf(stderr, "\n backing store string '%s'\n"
                         "expected storage source xml:\n%s\n"
                         "actual storage source xml:\n%s\n",