Fix 3 test failures
Resolves: RHEL-83939 Resolves: RHEL-83958 Resolves: RHEL-7373
This commit is contained in:
parent
9730674234
commit
dc3256fc48
13
delve.spec
13
delve.spec
@ -4,7 +4,7 @@
|
||||
|
||||
Name: delve
|
||||
Version: 1.24.1
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: A debugger for the Go programming language
|
||||
|
||||
License: MIT
|
||||
@ -21,6 +21,11 @@ Provides: dlv = %{version}
|
||||
|
||||
Patch0001: modify-ports.patch
|
||||
|
||||
# TODO: remove these once version 1.24.2 is released.
|
||||
Patch0002: fix-rhel-83939.patch
|
||||
Patch0003: fix-rhel-83958.patch
|
||||
|
||||
|
||||
%description
|
||||
Delve is a debugger for the Go programming language. The goal of the project
|
||||
is to provide a simple, full featured debugging tool for Go. Delve should be
|
||||
@ -70,6 +75,12 @@ done
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Mar 20 2025 Derek Parker <deparker@redhat.com> - 1.24.1-2
|
||||
- Fix 3 test failures
|
||||
- Resolves: RHEL-83939
|
||||
- Resolves: RHEL-83958
|
||||
- Resolves: RHEL-7373
|
||||
|
||||
* Thu Mar 13 2025 David Benoit <dbenoit@redhat.com> - 1.24.1-1
|
||||
- Rebase to Delve 1.24.1
|
||||
- Resolves: RHEL-64445
|
||||
|
||||
63
fix-rhel-83939.patch
Normal file
63
fix-rhel-83939.patch
Normal file
@ -0,0 +1,63 @@
|
||||
diff --git a/pkg/proc/core/core_test.go b/pkg/proc/core/core_test.go
|
||||
index dddc1d3e7..52b210b6f 100644
|
||||
--- a/pkg/proc/core/core_test.go
|
||||
+++ b/pkg/proc/core/core_test.go
|
||||
@@ -249,15 +249,8 @@ func logRegisters(t *testing.T, regs proc.Registers, arch *proc.Arch) {
|
||||
}
|
||||
|
||||
func TestCore(t *testing.T) {
|
||||
- if runtime.GOOS != "linux" || runtime.GOARCH == "386" {
|
||||
- t.Skip("unsupported")
|
||||
- }
|
||||
- if runtime.GOOS != "linux" || runtime.GOARCH == "loong64" {
|
||||
- t.Skip("could not read runtime.sigtrampgo context")
|
||||
- }
|
||||
- if runtime.GOOS == "linux" && os.Getenv("CI") == "true" && buildMode == "pie" {
|
||||
- t.Skip("disabled on linux, Github Actions, with PIE buildmode")
|
||||
- }
|
||||
+ mustSupportCore(t)
|
||||
+
|
||||
grp := withCoreFile(t, "panic", "")
|
||||
p := grp.Selected
|
||||
|
||||
@@ -412,15 +405,8 @@ func TestCoreFpRegisters(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestCoreWithEmptyString(t *testing.T) {
|
||||
- if runtime.GOOS != "linux" || runtime.GOARCH == "386" {
|
||||
- t.Skip("unsupported")
|
||||
- }
|
||||
- if runtime.GOOS != "linux" || runtime.GOARCH == "loong64" {
|
||||
- t.Skip("could not read runtime.sigtrampgo context")
|
||||
- }
|
||||
- if runtime.GOOS == "linux" && os.Getenv("CI") == "true" && buildMode == "pie" {
|
||||
- t.Skip("disabled on linux, Github Actions, with PIE buildmode")
|
||||
- }
|
||||
+ mustSupportCore(t)
|
||||
+
|
||||
grp := withCoreFile(t, "coreemptystring", "")
|
||||
p := grp.Selected
|
||||
|
||||
@@ -536,3 +522,22 @@ func procdump(t *testing.T, exePath string) string {
|
||||
t.Fatalf("could not find dump file")
|
||||
return ""
|
||||
}
|
||||
+
|
||||
+func mustSupportCore(t *testing.T) {
|
||||
+ t.Helper()
|
||||
+
|
||||
+ if runtime.GOOS != "linux" {
|
||||
+ t.Skip("test must be run on linux")
|
||||
+ }
|
||||
+
|
||||
+ switch runtime.GOARCH {
|
||||
+ case "386", "ppc64le":
|
||||
+ t.Skip("unsupported")
|
||||
+ case "loong64":
|
||||
+ t.Skip("could not read runtime.sigtrampgo context")
|
||||
+ }
|
||||
+
|
||||
+ if os.Getenv("CI") == "true" && buildMode == "pie" {
|
||||
+ t.Skip("disabled on linux, Github Actions, with PIE buildmode")
|
||||
+ }
|
||||
+}
|
||||
30
fix-rhel-83958.patch
Normal file
30
fix-rhel-83958.patch
Normal file
@ -0,0 +1,30 @@
|
||||
diff --git a/pkg/proc/test/support.go b/pkg/proc/test/support.go
|
||||
index d1f25bd49..c8efea360 100644
|
||||
--- a/pkg/proc/test/support.go
|
||||
+++ b/pkg/proc/test/support.go
|
||||
@@ -392,6 +392,12 @@ func MustHaveCgo(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
+func MustHaveModules(t *testing.T) {
|
||||
+ if os.Getenv("GO111MODULE") == "off" {
|
||||
+ t.Skip("skipping test which requires go modules")
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
func RegabiSupported() bool {
|
||||
// Tracks regabiSupported variable in ParseGOEXPERIMENT internal/buildcfg/exp.go
|
||||
switch {
|
||||
diff --git a/service/test/integration2_test.go b/service/test/integration2_test.go
|
||||
index 9ef131a3e..2e3928fb8 100644
|
||||
--- a/service/test/integration2_test.go
|
||||
+++ b/service/test/integration2_test.go
|
||||
@@ -3157,6 +3157,8 @@ func TestBreakpointVariablesWithoutG(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGuessSubstitutePath(t *testing.T) {
|
||||
+ protest.MustHaveModules(t)
|
||||
+
|
||||
t.Setenv("NOCERT", "1")
|
||||
ver, _ := goversion.Parse(runtime.Version())
|
||||
if ver.IsDevelBuild() && os.Getenv("CI") != "" && runtime.GOOS == "linux" {
|
||||
Loading…
Reference in New Issue
Block a user