From lamby at debian.org Tue Jul 22 17:13:19 2025 From: lamby at debian.org (Chris Lamb) Date: Tue, 22 Jul 2025 09:13:19 -0700 Subject: Bug#1109731: piglit: please make the build reproducible Message-ID: <175320072790.66112.9078328872279435465@copycat> 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))