diff options
| author | Julian Andres Klode <julian.klode@canonical.com> | 2025-03-20 15:03:23 +0100 |
|---|---|---|
| committer | Julian Andres Klode <julian.klode@canonical.com> | 2025-03-20 15:09:56 +0100 |
| commit | a2cb87afcbc89d1f8e770c26121a75d9c1654458 (patch) | |
| tree | ae9708cbc7a21788074b8d2a0ebbfb19284115f1 /test/integration | |
| parent | 109fdcac9a16ffa06b06366134dcaaef7e2b3379 (diff) | |
solver3: Use zstd-compressed, base64-encoded dumps
Store the solver dumps with zstd compression and base64-encode
them in the crash report; such that they take up significantly
less space and can fit in cassandra's schema.
Base64 is wrapped at 76 characters as the base64 tool does. Do
some magic std::string_view conversion to avoid string copies
for the substr() used to get 76 characters at a time.
Note we can rely on substr(i, 76) to handle less than 76 characters
just fine; it uses std::min(76, size() - i) characters.
Diffstat (limited to 'test/integration')
| -rwxr-xr-x | test/integration/test-solver3-evaluation | 96 |
1 files changed, 2 insertions, 94 deletions
diff --git a/test/integration/test-solver3-evaluation b/test/integration/test-solver3-evaluation index a873d5b21..b05e7cb9b 100755 --- a/test/integration/test-solver3-evaluation +++ b/test/integration/test-solver3-evaluation @@ -32,99 +32,7 @@ Title: Failure: The 3.0 solver produced a worse result SourcePackage: apt ErrorMessage: AptSolverDump: - Request: EDSP 0.5 - Architecture: amd64 - Architectures: amd64 - Machine-ID: 912e43bd1c1d4ba481f9f8ccab25f9ee - Install: x:amd64 y:amd64 - Solver: internal - - Package: a - Architecture: all - Version: 3 - APT-ID: 2 - Source: a - Source-Version: 3 - Priority: optional - Section: other - Size: 42 - APT-Release: - a=unstable,n=sid,c=main,b=all - APT-Pin: 500 - APT-Candidate: yes - Depends: c - - Package: b - Architecture: all - Version: 3 - APT-ID: 3 - Source: b - Source-Version: 3 - Priority: optional - Section: other - Size: 42 - APT-Release: - a=unstable,n=sid,c=main,b=all - APT-Pin: 500 - APT-Candidate: yes - - Package: c - Architecture: all - Version: 3 - APT-ID: 4 - Source: c - Source-Version: 3 - Priority: optional - Section: other - Size: 42 - APT-Release: - a=unstable,n=sid,c=main,b=all - APT-Pin: 500 - APT-Candidate: yes - - Package: x - Architecture: all - Version: 3 - APT-ID: 0 - Source: x - Source-Version: 3 - Priority: optional - Section: other - Size: 42 - APT-Release: - a=unstable,n=sid,c=main,b=all - APT-Pin: 500 - APT-Candidate: yes - Depends: a | b - - Package: y - Architecture: all - Version: 3 - APT-ID: 1 - Source: y - Source-Version: 3 - Priority: optional - Section: other - Size: 42 - APT-Release: - a=unstable,n=sid,c=main,b=all - APT-Pin: 500 - APT-Candidate: yes - Depends: b | a - - Package: apport - Architecture: all - Version: 3 - APT-ID: 6 - Source: apport - Source-Version: 3 - Priority: optional - Section: other - Installed: yes - APT-Pin: 100 - APT-Candidate: yes - " cat rootdir/var/crash/apt-edsp.$(id -u).crash - +$(cat rootdir/var/log/apt/edsp.log.zst | base64 | sed 's#^# #')" cat rootdir/var/crash/apt-edsp.$(id -u).crash testsuccessequal "Request: EDSP 0.5 Architecture: amd64 @@ -217,7 +125,7 @@ Section: other Installed: yes APT-Pin: 100 APT-Candidate: yes -" cat rootdir/var/log/apt/edsp.log +" apthelper cat-file rootdir/var/log/apt/edsp.log.zst testfailureequal "Reading package lists... Building dependency tree... |
