Skip to content

Fix long running codeview tests#1743

Merged
kinke merged 1 commit intoldc-developers:masterfrom
rainers:cv4
Sep 4, 2016
Merged

Fix long running codeview tests#1743
kinke merged 1 commit intoldc-developers:masterfrom
rainers:cv4

Conversation

@rainers
Copy link
Contributor

@rainers rainers commented Sep 4, 2016

this disables the default symbol search path that might access the MS symbol servers

@kinke
Copy link
Member

kinke commented Sep 4, 2016

I just spent quite a while trying to understand and fix this thing too. ;)

My patch is bigger though, I've had to enable local PDB loading (if that's what disabling SYMOPT_NO_IMAGE_SEARCH is) for codeview.d and chose to fully qualify the breakpoints, otherwise cdb tries to fetch the symbols of all loaded modules from the (dummy) symbol server:

diff --git a/tests/debuginfo/codeview.d b/tests/debuginfo/codeview.d
index 2db0111..9c163c3 100644
--- a/tests/debuginfo/codeview.d
+++ b/tests/debuginfo/codeview.d
@@ -1,9 +1,9 @@
 // REQUIRES: atleast_llvm308
 // REQUIRES: Windows
 // REQUIRES: cdb
-// RUN: %ldc -g -of=%t.exe %s
+// RUN: %ldc -g -of=%T\codeview.exe %s
 // RUN: sed -e "/^\\/\\/ CDB:/!d" -e "s,// CDB:,," %s \
-// RUN:    | %cdb -snul -lines %t.exe >%t.out
+// RUN:    | %cdb -snul -sins -y srv*http://127.0.0.1/noSymbols -lines %T\codeview.exe >%t.out
 // RUN: FileCheck %s -check-prefix=CHECK -check-prefix=%arch < %t.out

 int main(string[] args)
@@ -13,10 +13,11 @@ int main(string[] args)
     wstring ws = "b";
     dstring ds = "c";

-// CDB: ld /f codeview*
+// disable SYMOPT_NO_IMAGE_SEARCH
+// CDB: .symopt-0x20000
 // enable case sensitive symbol lookup
 // CDB: .symopt-1
-// CDB: bp `codeview.d:21`
+// CDB: bp `codeview!codeview.d:21`
 // CDB: g
     return 0;
 // CHECK: !D main
diff --git a/tests/debuginfo/cvbasictypes.d b/tests/debuginfo/cvbasictypes.d
index 265c6c9..75a9cb4 100644
--- a/tests/debuginfo/cvbasictypes.d
+++ b/tests/debuginfo/cvbasictypes.d
@@ -1,9 +1,9 @@
 // REQUIRES: atleast_llvm308
 // REQUIRES: Windows
 // REQUIRES: cdb
-// RUN: %ldc -g -of=%t.exe %s
+// RUN: %ldc -g -of=%T\cvbasictypes.exe %s
 // RUN: sed -e "/^\\/\\/ CDB:/!d" -e "s,// CDB:,," %s \
-// RUN:    | %cdb -snul -lines %t.exe >%t.out
+// RUN:    | %cdb -snul -sins -y srv*http://127.0.0.1/noSymbols -lines %T\cvbasictypes.exe >%t.out
 // RUN: FileCheck %s -check-prefix=CHECK -check-prefix=%arch < %t.out

 void main()
@@ -37,13 +37,14 @@ int basic_types()
        creal cr = 19 + 20i;

     c = c;
-// CDB: ld cvbasictypes
-// CDB: bp `cvbasictypes.d:39`
+// disable SYMOPT_NO_IMAGE_SEARCH
+// CDB: .symopt-0x20000
+// enable case sensitive symbol lookup
+// CDB: .symopt-1
+// CDB: bp `cvbasictypes!cvbasictypes.d:39`
 // CDB: g
 // CHECK: !cvbasictypes.basic_types

-// enable case sensitive symbol lookup
-// CDB: .symopt-1
 // CDB: dv /t
 // CHECK: char c = 0n97 'a'
 // wc: UTF16 not supported by cvd, works in VS

@rainers
Copy link
Contributor Author

rainers commented Sep 4, 2016

I just spent quite a while trying to understand and fix this thing too. ;)

Sorry to be causing such disturbance. I think disabling all symbol servers by -y . is the easier approach (if it turns out to solve the issue).

@kinke
Copy link
Member

kinke commented Sep 4, 2016

No worries. -y . is working beautifully (I've only tried it in my patch). I previously tried with -y "", but that just fell back to the default too; where did you find out about the special .?

@rainers
Copy link
Contributor Author

rainers commented Sep 4, 2016

where did you find out about the special .?

That was my first and only guess ;) just let cdb look in the current directory. I don't think there is anything special about it.

@kinke
Copy link
Member

kinke commented Sep 4, 2016

Works on my system, total lit-tests time ~8 secs again.

@kinke kinke merged commit cc19950 into ldc-developers:master Sep 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants