Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-98923

BLACKLIST entry "opensuse" does not match "opensuse-tumbleweed" or "opensuse-leap"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4: Low P4: Low
    • None
    • Some future release
    • Testing: qtestlib
    • None

      I am not sure where qtestlib gets the distro definitions from, but here are some lines from /etc/os-release:

      NAME="openSUSE Tumbleweed"
      # VERSION="20211127"
      ID="opensuse-tumbleweed"
      ID_LIKE="opensuse suse"
      VERSION_ID="20211127"
      PRETTY_NAME="openSUSE Tumbleweed"
      

      Please note that the ID_LIKE line includes "opensuse" and "suse" so maybe these should be considered by qtestlib.

      In order to match the BLACKLIST file I have to write in full "opensuse-tumbleweed". I also tried using wildcards ("opensuse*" or "opensuse.*"), but with no luck.

      EDIT:
      A bit of gdb-ing later, and I see that qtestlib gets the system's keywords by invoking

      • QSysInfo::productType().toLower().toUtf8() --> "opensuse-tumbleweed"
      • QSysInfo::productVersion() --> "20211127"

      src/testlib/qtestblacklist.cpp

      static QSet<QByteArray> activeConditions()
      {
          QSet<QByteArray> result = keywords();
      
          QByteArray distributionName = QSysInfo::productType().toLower().toUtf8();
          QByteArray distributionRelease = QSysInfo::productVersion().toLower().toUtf8();
      

      And productType() ends up invoking readOsRelease() which apparently gets the ID from /etc/os-release.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            macadder Jason McDonald
            jimis Dimitrios Apostolou
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes