Commit 048c9164 authored by Alex Brainman's avatar Alex Brainman

debug/pe: use kernel32.dll in TestImportTableInUnknownSection

TestImportTableInUnknownSection was introduced in CL 110555 to
test PE executable with import table located in section other than
".idata". We used atmfd.dll for that purpose, but it seems
atmfd.dll is not present on some systems.

Use kernel32.dll instead. kernel32.dll import table is located in
".rdata" section, so it should do the job. And every Windows
system has kernel32.dll file.

Also make TestImportTableInUnknownSection run on windows-arm,
since windows-arm should also have kernel32.dll file.

Updates #27904

Change-Id: Ie005ee10e46ae0c06e83929d581e89f86c051eea
Reviewed-on: https://go-review.googlesource.com/c/151137
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 04105ef1
......@@ -602,13 +602,10 @@ func TestImportTableInUnknownSection(t *testing.T) {
if runtime.GOOS != "windows" {
t.Skip("skipping Windows-only test")
}
if runtime.GOARCH == "arm" {
// Issue 27904
t.Skip("skipping test on arm; no atmfd.dll available")
}
// first we need to find this font driver
path, err := exec.LookPath("atmfd.dll")
// kernel32.dll import table is located in ".rdata" section,
// so it is good enough to test issue #16103.
path, err := exec.LookPath("kernel32.dll")
if err != nil {
t.Fatalf("unable to locate required file %q in search path: %s", "atmfd.dll", err)
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment