From 8f21c8ed2a3bb4de2a39a09c4c8dc59337398e4d Mon Sep 17 00:00:00 2001 From: Ryan Macnak Date: Thu, 29 Jun 2023 19:39:05 +0000 Subject: [PATCH] [gardening] Don't attempt to measure RSS under sanitizers or with reload. Bug: https://github.com/dart-lang/sdk/issues/52816 Change-Id: I4e50180a9285727cc2e275dd17dd6855f21a0b6e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311926 Commit-Queue: Ryan Macnak Reviewed-by: Alexander Aprelev --- tests/standalone/regress_52715_test.dart | 12 ++++++------ tests/standalone/standalone_kernel.status | 4 ++++ tests/standalone_2/regress_52715_test.dart | 12 ++++++------ 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/tests/standalone/regress_52715_test.dart b/tests/standalone/regress_52715_test.dart index fb6341030a0..7ac3aa604a8 100644 --- a/tests/standalone/regress_52715_test.dart +++ b/tests/standalone/regress_52715_test.dart @@ -9,16 +9,16 @@ import 'dart:io'; import 'package:expect/expect.dart'; void main() async { - final startRss = ProcessInfo.currentRss; + final startRss = ProcessInfo.currentRss; //# measure: ok for (var i = 0; i < 1024; i++) { final subscription = Directory.systemTemp.watch().listen((event) {}); await subscription.cancel(); } - final endRss = ProcessInfo.currentRss; - final allocatedBytes = (endRss - startRss); - final limit = 10 * 1024 * 1024; - Expect.isTrue(allocatedBytes < limit, - 'expected VM RSS growth to be below ${limit} but got ${allocatedBytes}'); + final endRss = ProcessInfo.currentRss; //# measure: continued + final allocatedBytes = (endRss - startRss); //# measure: continued + final limit = 10 * 1024 * 1024; //# measure: continued + Expect.isTrue(allocatedBytes < limit, //# measure: continued + 'expected VM RSS growth to be below ${limit} but got ${allocatedBytes}'); //# measure: continued } diff --git a/tests/standalone/standalone_kernel.status b/tests/standalone/standalone_kernel.status index 9e150f595df..b0002144eda 100644 --- a/tests/standalone/standalone_kernel.status +++ b/tests/standalone/standalone_kernel.status @@ -66,6 +66,7 @@ io/socket_close_test: Skip # Timeout io/socket_many_connections_test: Skip # Timeout io/web_socket_compression_test: Skip # Timeout io/web_socket_test: Skip # Timeout +regress_52715_test/measure: Skip # kernel-service interferes with measuring RSS [ $compiler == dartkp && $mode == debug && $runtime == dart_precompiled ] io/raw_socket_test: Crash @@ -97,6 +98,9 @@ io/web_socket_test: Skip # Flaky. map_insert_remove_oom_test: Skip # Heap limit too low. no_support_debugger_test: Skip # kernel-service snapshot not compatible with flag disabled +[ $builder_tag == asan || $builder_tag == lsan || $builder_tag == msan || $builder_tag == tsan ] +regress_52715_test/measure: Skip # Shadow memory and scudo quarantine interfere with measuring RSS + [ $builder_tag == crossword || $compiler != dartk && $compiler != dartkp || $compiler == dartkp && $system == windows ] entrypoints_verification_test: SkipByDesign # Requires VM to run. Cannot run in precompiled Windows because the DLL is linked against dart.exe instead of dart_precompiled_runtime.exe. Cannot run in cross-word environment as native extension is not built. diff --git a/tests/standalone_2/regress_52715_test.dart b/tests/standalone_2/regress_52715_test.dart index 6bf7043743c..8c783c252cb 100644 --- a/tests/standalone_2/regress_52715_test.dart +++ b/tests/standalone_2/regress_52715_test.dart @@ -11,16 +11,16 @@ import 'dart:io'; import 'package:expect/expect.dart'; void main() async { - final startRss = ProcessInfo.currentRss; + final startRss = ProcessInfo.currentRss; //# measure: ok for (var i = 0; i < 1024; i++) { final subscription = Directory.systemTemp.watch().listen((event) {}); await subscription.cancel(); } - final endRss = ProcessInfo.currentRss; - final allocatedBytes = (endRss - startRss); - final limit = 10 * 1024 * 1024; - Expect.isTrue(allocatedBytes < limit, - 'expected VM RSS growth to be below ${limit} but got ${allocatedBytes}'); + final endRss = ProcessInfo.currentRss; //# measure: continued + final allocatedBytes = (endRss - startRss); //# measure: continued + final limit = 10 * 1024 * 1024; //# measure: continued + Expect.isTrue(allocatedBytes < limit, //# measure: continued + 'expected VM RSS growth to be below ${limit} but got ${allocatedBytes}'); //# measure: continued }