[tor-dev] Failed test in UNICODE

Gisle Vanem gvanem at broadpark.no
Wed Nov 23 16:02:08 UTC 2011


I just built Tor and the test suite with UNICODE enabled (MS Visual-C v16
on Win-XP SP3). With some patching, the test-programs compiled and ran 
mostly fine. Except test_util_spawn_background_ok() failed for a reason I 
did't understand initially:

> test --warn

util/spawn_background_ok: Nov 23 14:35:55.531 [warn] Failed to create child process 
test-child.exe: Systemet finner ikke angitt fil.

  FAIL test_util.c:1405: assert(process_handle.status == expected_status): -1 vs 1
  [spawn_background_ok FAILED]

util/spawn_background_partial_read: Nov 23 14:35:55.546 [warn] Failed to create child process 
test-child.exe: Systemet finner ikke angitt fil.

  FAIL test_util.c:1521: assert(process_handle.status == expected_status): -1 vs 1
  [spawn_background_partial_read FAILED]


("Systemet finner ikke angitt fil" -> "System doesn't find specified file").

I think the reason is that CreateProcessW() is used in common/util.c.
The function is passed a 'const char *const filename'. Either we should 
always use CreateProcessA() or convert 'filename' using mbstowcs().
What do you think?

--gv


More information about the tor-dev mailing list