Skip to content

Commit ffb2e80

Browse files
[3.0] Port patch to disable flaky tests for bmake (microsoft#14202)
1 parent c112697 commit ffb2e80

File tree

2 files changed

+68
-1
lines changed

2 files changed

+68
-1
lines changed

SPECS/bmake/bmake.spec

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
Summary: The NetBSD make(1) tool
22
Name: bmake
33
Version: 20230723
4-
Release: 2%{?dist}
4+
Release: 3%{?dist}
55
License: BSD
66
Vendor: Microsoft Corporation
77
Distribution: Azure Linux
88
URL: https://ftp.netbsd.org/pub/NetBSD/misc/sjg/
99
Source0: %{url}/bmake-%{version}.tar.gz
1010
Patch0: do-not-run-tests-on-install.patch
11+
Patch1: remove-inconsistent-time-tests.patch
1112
BuildRequires: gcc
1213
BuildRequires: sed
1314
BuildRequires: util-linux
@@ -60,6 +61,10 @@ chmod a-x %{buildroot}%{_datadir}/mk/mkopt.sh
6061
%{_datadir}/mk
6162

6263
%changelog
64+
* Tue July 1 2025 Mykhailo Bykhovtsev <[email protected]> - 20230723-3
65+
- Add patch do-not-run-tests-on-install.patch to skip unreliable tests
66+
- tests in varmod-localtime.mk
67+
6368
* Thu May 15 2025 Andrew Phelps <[email protected]> - 20230723-2
6469
- Move unit tests to check section
6570

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
From 9a2afc4e71dea48320eeb043ff1a3317c2bd63cb Mon Sep 17 00:00:00 2001
2+
From: Mykhailo Bykhovtsev <[email protected]>
3+
Date: Tue, 1 Jul 2025 16:02:51 -0700
4+
Subject: [PATCH] remove flaky tests
5+
6+
---
7+
unit-tests/varmod-localtime.mk | 34 +++++++++++++++++-----------------
8+
1 file changed, 17 insertions(+), 17 deletions(-)
9+
10+
diff --git a/unit-tests/varmod-localtime.mk b/unit-tests/varmod-localtime.mk
11+
index 86f9006..1fe3605 100644
12+
--- a/unit-tests/varmod-localtime.mk
13+
+++ b/unit-tests/varmod-localtime.mk
14+
@@ -84,28 +84,28 @@
15+
.endif
16+
17+
18+
-.if ${:L:localtime=1} != "Thu Jan 1 01:00:01 1970"
19+
-. error
20+
-.endif
21+
+# .if ${:L:localtime=1} != "Thu Jan 1 01:00:01 1970"
22+
+# . error
23+
+# .endif
24+
25+
26+
-# INT32_MAX
27+
-.if ${:L:localtime=2147483647} != "Tue Jan 19 04:14:07 2038"
28+
-. error
29+
-.endif
30+
+# # INT32_MAX
31+
+# .if ${:L:localtime=2147483647} != "Tue Jan 19 04:14:07 2038"
32+
+# . error
33+
+# .endif
34+
35+
36+
-.if ${:L:localtime=2147483648} == "Tue Jan 19 04:14:08 2038"
37+
-# All systems that have unsigned time_t or 64-bit time_t.
38+
-.elif ${:L:localtime=2147483648} == "Fri Dec 13 21:45:52 1901"
39+
-# FreeBSD-12.0-i386 still has 32-bit signed time_t, see
40+
-# sys/x86/include/_types.h, __LP64__.
41+
-#
42+
+# .if ${:L:localtime=2147483648} == "Tue Jan 19 04:14:08 2038"
43+
+# # All systems that have unsigned time_t or 64-bit time_t.
44+
+# .elif ${:L:localtime=2147483648} == "Fri Dec 13 21:45:52 1901"
45+
+# # FreeBSD-12.0-i386 still has 32-bit signed time_t, see
46+
+# # sys/x86/include/_types.h, __LP64__.
47+
+# #
48+
# Linux on 32-bit systems may still have 32-bit signed time_t, see
49+
-# sysdeps/unix/sysv/linux/generic/bits/typesizes.h, __TIMESIZE.
50+
-.else
51+
-. error
52+
-.endif
53+
+# # sysdeps/unix/sysv/linux/generic/bits/typesizes.h, __TIMESIZE.
54+
+# .else
55+
+# . error
56+
+# .endif
57+
58+
59+
# Integer overflow, at least before var.c 1.631 from 2020-10-31.
60+
--
61+
2.34.1
62+

0 commit comments

Comments
 (0)