Bug#1109731: piglit: please make the build reproducible

Chris Lamb lamby at debian.org
Tue Jul 22 17:13:19 BST 2025


Source: piglit
Version: 0.0~git20250409.af62c0dea-2
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: randomness
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed that
piglit could not be built reproducibly.

This is because when rendering sets in an XML file, it does so via by
calling repr() on the set object, which results in nondeterminstic
output.

Patch attached that renders the set as sorted whilst retaining the
"{a, b, c}" nomenclature. 

  [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
diff --git tests/serializer.py tests/serializer.py
index 5ee9a15..e2c48e1 100644
--- tests/serializer.py
+++ tests/serializer.py
@@ -67,6 +67,8 @@ def _serialize_skips(test, elem):
         if not value:
             value = getattr(test, f, None)
         if value:
+            if isinstance(value, set):
+                value = "{" + repr(sorted(value))[1:-1] + "}"
             et.SubElement(elem, 'option', name=f, value=repr(value))
 
 


More information about the Reproducible-bugs mailing list