Ai
13 Star 20 Fork 181

src-openEuler/glibc

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
support-Add-support_record_failure_barrier.patch 1.49 KB
Copy Edit Raw Blame History
liqingqing_1229 authored 2025-05-21 09:23 +08:00 . sync from glibc upstream 2.38 branch
From 4335cd9b58d1449abfba1bb5060970785940a399 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Mon, 23 Dec 2024 13:57:55 +0100
Subject: [PATCH] support: Add support_record_failure_barrier
This can be used to stop execution after a TEST_COMPARE_BLOB
failure, for example.
(cherry picked from commit d0b8aa6de4529231fadfe604ac2c434e559c2d9e)
---
support/check.h | 3 +++
support/support_record_failure.c | 10 ++++++++++
2 files changed, 13 insertions(+)
diff --git a/support/check.h b/support/check.h
index 0a9fff484f..632fe5298a 100644
--- a/support/check.h
+++ b/support/check.h
@@ -207,6 +207,9 @@ void support_record_failure_reset (void);
failures or not. */
int support_record_failure_is_failed (void);
+/* Terminate the process if any failures have been encountered so far. */
+void support_record_failure_barrier (void);
+
__END_DECLS
#endif /* SUPPORT_CHECK_H */
diff --git a/support/support_record_failure.c b/support/support_record_failure.c
index 711f08801b..8466b895dc 100644
--- a/support/support_record_failure.c
+++ b/support/support_record_failure.c
@@ -112,3 +112,13 @@ support_record_failure_is_failed (void)
synchronization for reliable test error reporting anyway. */
return __atomic_load_n (&state->failed, __ATOMIC_RELAXED);
}
+
+void
+support_record_failure_barrier (void)
+{
+ if (__atomic_load_n (&state->failed, __ATOMIC_RELAXED))
+ {
+ puts ("error: exiting due to previous errors");
+ exit (1);
+ }
+}
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/glibc.git
git@gitee.com:src-openeuler/glibc.git
src-openeuler
glibc
glibc
master

Search