marcomaggi / vicare

A native compiler for Scheme compliant with R6RS
http://marcomaggi.github.com/vicare.html
Other
200 stars 34 forks source link

Test-vicare-posix-sockets.sps still fails(devel branch). #67

Closed hyln9 closed 10 years ago

hyln9 commented 10 years ago

Test-vicare-posix-sockets.sps still fails(devel branch).

My computer runs on "Linux localhost.localdomain 3.13.6-200.fc20.x86_64 #1 SMP Fri Mar 7 17:02:28 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux" (Fedora 20)

1

marcomaggi commented 10 years ago

This test works fine on my system. My guess is that the return value of functions like gethostbyname, gethostbyname2, gethostbyaddr and others depends on the networking configuration on the host; also, the test file assumes that the system environment variable TMPDIR is set to a usable directory pathname, like /tmp. So the problem is that the failing tests are poorly written, not that there is an error in the (vicare posix) library. For example, some tests in that test file are disabled because they require the local firewall rules to allow some kind of networking connections. Can you confirm (by commenting out the tests in the test file) that the failures are caused by gethostby* functions and access to the TMPDIR variable?

Remember that to run a specific test file only, from the build directory, you can run:

$ make test file=vicare-posix-sockets VFLAGS=-g

the -g flag is optional and will cause vicare to enter the debugger when an uncaught error occurs.

hyln9 commented 10 years ago

All the two problems solved according to your suggestions :-)

1) I found out that TMPDIR is empty on my computer, then I changed it to /tmp, the unhandled exception disappeared, and then vicare didn't enter the debugger like before. REALLY USEFUL SUGGESTION!

2)I commented out two tests ( gethostbyname and gethostbyname2 ), and all failures disappeared eventually, so everything goes well now!

Thank you again for your time!

Should I close this issue?

marcomaggi commented 10 years ago

I have pushed on the devel branch a change that should fix the problems with the gethostby* functions. If it works on your system, you can close this issue.

hyln9 commented 10 years ago

Thank you!

Although when I tried make check for the first time 1 test failed ( r6rs-io-simple ), I tried exactly the failed test individually and it passed. It seems like it is a random error or my computer's issue. Here is what the log file said:

vicare: ../src/ikarus-collect.c:1282: gather_live_object_proc: Assertion `((ikptr)-1) != X' failed.

marcomaggi commented 10 years ago

This is the garbage collection error of issue #64.

hyln9 commented 10 years ago

Ok, I'm closing this issue :-)