From: Alex Brainman Date: Sat, 24 Nov 2018 05:54:01 +0000 (+1100) Subject: debug/pe: use kernel32.dll in TestImportTableInUnknownSection X-Git-Tag: go1.12beta1~280 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=048c9164a0c5572df18325e377473e7893dbfb07;p=gostls13.git 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 TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- diff --git a/src/debug/pe/file_test.go b/src/debug/pe/file_test.go index 4f0510200f..79c2241eb7 100644 --- a/src/debug/pe/file_test.go +++ b/src/debug/pe/file_test.go @@ -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) }