From b55902eccc01e7d8542c58880a1f524b68e97328 Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Fri, 13 Feb 2026 11:10:41 +0200 Subject: [PATCH 1/2] fix(tests): skip cache tests on NX and PS platforms --- tests/unit/test_cache.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/tests/unit/test_cache.c b/tests/unit/test_cache.c index 5a9e41a26..e161340bc 100644 --- a/tests/unit/test_cache.c +++ b/tests/unit/test_cache.c @@ -9,7 +9,7 @@ #ifdef SENTRY_PLATFORM_WINDOWS # include -#else +#elif !defined(SENTRY_PLATFORM_NX) && !defined(SENTRY_PLATFORM_PS) # include #endif @@ -28,14 +28,21 @@ set_file_mtime(const sentry_path_t *path, time_t mtime) BOOL rv = SetFileTime(h, NULL, NULL, &ft); CloseHandle(h); return rv ? 0 : -1; -#else +#elif !defined(SENTRY_PLATFORM_NX) && !defined(SENTRY_PLATFORM_PS) struct utimbuf times = { .modtime = mtime, .actime = mtime }; return utime(path->path, ×); +#else + (void)path; + (void)mtime; + return -1; #endif } SENTRY_TEST(cache_keep) { +#if defined(SENTRY_PLATFORM_NX) || defined(SENTRY_PLATFORM_PS) + SKIP_TEST(); +#endif SENTRY_TEST_OPTIONS_NEW(options); sentry_options_set_dsn(options, "https://foo@sentry.invalid/42"); sentry_options_set_cache_keep(options, true); @@ -87,6 +94,9 @@ SENTRY_TEST(cache_keep) SENTRY_TEST(cache_max_size) { +#if defined(SENTRY_PLATFORM_NX) || defined(SENTRY_PLATFORM_PS) + SKIP_TEST(); +#endif SENTRY_TEST_OPTIONS_NEW(options); sentry_options_set_dsn(options, "https://foo@sentry.invalid/42"); sentry_options_set_cache_keep(options, true); @@ -138,6 +148,9 @@ SENTRY_TEST(cache_max_size) SENTRY_TEST(cache_max_age) { +#if defined(SENTRY_PLATFORM_NX) || defined(SENTRY_PLATFORM_PS) + SKIP_TEST(); +#endif SENTRY_TEST_OPTIONS_NEW(options); sentry_options_set_dsn(options, "https://foo@sentry.invalid/42"); sentry_options_set_cache_keep(options, true); @@ -185,6 +198,9 @@ SENTRY_TEST(cache_max_age) SENTRY_TEST(cache_max_items) { +#if defined(SENTRY_PLATFORM_NX) || defined(SENTRY_PLATFORM_PS) + SKIP_TEST(); +#endif SENTRY_TEST_OPTIONS_NEW(options); sentry_options_set_dsn(options, "https://foo@sentry.invalid/42"); sentry_options_set_cache_keep(options, true); @@ -229,6 +245,9 @@ SENTRY_TEST(cache_max_items) SENTRY_TEST(cache_max_size_and_age) { +#if defined(SENTRY_PLATFORM_NX) || defined(SENTRY_PLATFORM_PS) + SKIP_TEST(); +#endif // Verify size pruning keeps newer entries, removes all older once limit // hit. A (5KB), B (6KB), C (3KB) newest-to-oldest, max_size=10KB A+B=11KB // exceeds limit -> B pruned, C (older) also pruned From 6005c18c9e81da1e99aa8662e4fadb1f04ce7a3e Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Fri, 13 Feb 2026 11:28:21 +0200 Subject: [PATCH 2/2] Skip path_rename test for NX --- tests/unit/test_path.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/unit/test_path.c b/tests/unit/test_path.c index b240554e9..a68fd270d 100644 --- a/tests/unit/test_path.c +++ b/tests/unit/test_path.c @@ -288,6 +288,9 @@ SENTRY_TEST(path_mtime) SENTRY_TEST(path_rename) { +#if defined(SENTRY_PLATFORM_NX) + SKIP_TEST(); +#endif sentry_path_t *src = sentry__path_from_str(SENTRY_TEST_PATH_PREFIX ".rename-src"); TEST_ASSERT(!!src);