mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
Merge pull request #16414 from FredApps/onee/k8s-gate-test-hardening
test: harden the three k8s gate flakes on GLES and memory pressure
This commit is contained in:
3 files changed
+21
-2
No files matched your search
@@ -21,11 +21,20 @@ nextest-version = "0.9.150"
|
||||
# parallelism.
|
||||
[test-groups]
|
||||
gpu = { max-threads = 4 }
|
||||
# mcp_wait builds a 6000x6000 document and a radius-1000 Gaussian Blur so the
|
||||
# waited command runs long enough to cancel. On the artcraft k8s gate pods that
|
||||
# often fails with "not enough working memory" when it shares the shard with
|
||||
# the rest of the suite; hosted ubuntu-24.04 stays green. Run these alone.
|
||||
heavy-filter = { max-threads = 1 }
|
||||
|
||||
[[profile.default.overrides]]
|
||||
filter = 'package(photocraft-gpu) | test(/(^|::|_)gpu_tests::/)'
|
||||
test-group = 'gpu'
|
||||
|
||||
[[profile.default.overrides]]
|
||||
filter = 'package(photocraft-automation) & test(/^mcp_wait::/)'
|
||||
test-group = 'heavy-filter'
|
||||
|
||||
# CI (`--profile ci`, .github/workflows/ci.yml). Collect all failures in one integration run
|
||||
# instead of exposing one regression per rebuild. A hanging test still terminates, and every
|
||||
# failure is repeated at the end of the log. The default profile's GPU override still applies.
|
||||
|
||||
@@ -55,7 +55,14 @@ fn every_compositor_pipeline_builds() {
|
||||
let info = adapter.get_info();
|
||||
let format = Compositor::preferred_acc_format(&adapter);
|
||||
// Draws build only the pipelines they use; this builds every one.
|
||||
let threads = std::thread::available_parallelism().map_or(1, std::num::NonZero::get);
|
||||
// GLES shares one adapter-context lock. Building every pipeline on
|
||||
// available_parallelism() threads panics with "Could not lock adapter
|
||||
// context. This is most-likely a deadlock." on the artcraft k8s runners,
|
||||
// which expose both Vulkan and GL on llvmpipe and can report dozens of CPUs.
|
||||
let threads = match info.backend {
|
||||
wgpu::Backend::Gl => 1,
|
||||
_ => std::thread::available_parallelism().map_or(1, std::num::NonZero::get),
|
||||
};
|
||||
if let Err(e) = Compositor::try_new_with_format_threads(&device, format, threads) {
|
||||
panic!("{:?} adapter {} (driver {}): {e}", info.backend, info.name, info.driver_info);
|
||||
}
|
||||
|
||||
@@ -159,7 +159,10 @@ fn nan_and_out_of_range_output_is_sanitised() {
|
||||
|
||||
#[test]
|
||||
fn hostile_modules_fail_quickly() {
|
||||
let quick = Duration::from_secs(5);
|
||||
// Wall-clock, not just the instruction budget: under memory pressure
|
||||
// "memory.grow forever" took 6-8s on the artcraft k8s gate pods and
|
||||
// tripped this 5s bound, then passed on the next main run.
|
||||
let quick = Duration::from_secs(15);
|
||||
let cases: Vec<(&str, Vec<u8>)> = vec![
|
||||
("infinite loop", ok_module("(loop $l (br $l)) (i32.const 0)")),
|
||||
("memory.grow bomb, then trap", ok_module("(loop $l (br_if $l (i32.ne (memory.grow (i32.const 512)) (i32.const -1)))) unreachable")),
|
||||
|
||||
Reference in new issue
Block a user