1. Multitasking unit test

One of the gaps in our unit testing for v4 is for multitasking. Does anyone have any ideas for writing one? Preferably that doesn't require network access.

Matt

new topic     » topic index » view message » categorize

2. Re: Multitasking unit test

mattlewis said...

One of the gaps in our unit testing for v4 is for multitasking. Does anyone have any ideas for writing one? Preferably that doesn't require network access.

What are some of the requirements of such a test? My initial thought was build a directory tree, starting with the root. For each directory encountered, start a new task to get its files. You should end up with a ton of tasks, and even though you wouldn't normally do it this way, I think it would test the task system.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Multitasking unit test

euphoric said...

What are some of the requirements of such a test? My initial thought was build a directory tree, starting with the root. For each directory encountered, start a new task to get its files. You should end up with a ton of tasks, and even though you wouldn't normally do it this way, I think it would test the task system.

It needs to have a concrete testable result.

Jeremy

new topic     » goto parent     » topic index » view message » categorize

4. Re: Multitasking unit test

euphoric said...

What are some of the requirements of such a test? My initial thought was build a directory tree, starting with the root. For each directory encountered, start a new task to get its files. You should end up with a ton of tasks, and even though you wouldn't normally do it this way, I think it would test the task system.

Ideally, something deterministic. Maybe build some data, sleep, etc. But I'm open to suggestions. If I knew, I'd write it myself. smile

I think I've got tasks working again for recent linux distros. It still needs testing on other unix-like platforms (I think there may be some linker issues). But I've only had demo/news.ex to test with. One thing it doesn't do is suspend or delete tasks, possibly reusing the same task slots, etc. The new task backend for translated tasks is very different, relying on Windows Fibers and POSIX threads (pthreads) for other platforms.

Basically, demo/news.ex is a decent test platform to show that we can create and switch between tasks, but it definitely doesn't cover all of the things that tasks can do.

Matt

new topic     » goto parent     » topic index » view message » categorize

5. Re: Multitasking unit test

mattlewis said...

Ideally, something deterministic.

Oh yeah. Duh.

Well, you could do a dir() list and a task-derived list and compare. smile Yay! Go me!

mattlewis said...

It still needs testing on other unix-like platforms...

Like FreeBSD? I'll get a repo set up on mine tonight and get Euphoria downloaded. I'll need help with what to type to test. Maybe you could throw together a simple batch/script for me. smile

new topic     » goto parent     » topic index » view message » categorize

6. Re: Multitasking unit test

euphoric said...
mattlewis said...

It still needs testing on other unix-like platforms...

Like FreeBSD? I'll get a repo set up on mine tonight and get Euphoria downloaded. I'll need help with what to type to test. Maybe you could throw together a simple batch/script for me. smile

Yes, exactly. I think the other platforms are OSX and OpenSolaris. I'm not sure which others have been ported (Jeremy's been doing a lot of that work). Basically, here's what you should do (assuming that you built the binaries in the default, build subdir off of the source dirstart from there):

$ mkdir news 
$ cd news 
$ ../euc -makefile-full -debug -lib ../eu.a ../../../demo/news 

This will also create news.mak, which you'll need to edit. The reason for this is that euphoria.h has changed, and you'll need to make sure that the local version is used. So change the -I flag in the compiler flags section of the makefile to point to the version from the repository. It should be something like: /home/euphoric/task_svn/ or wherever you've checked out the svn repository. Then:

$ make -f news.mak 
 
or possibly: 
 
$ gmake -f news.mak 
 
...because it's probably outputting a GNU makefile, not a BSD makefile 

...and you should be able to test it.

Matt

new topic     » goto parent     » topic index » view message » categorize

7. Re: Multitasking unit test

i'd like to test this version out
where can i get a download

new topic     » goto parent     » topic index » view message » categorize

8. Re: Multitasking unit test

raseu said...

i'd like to test this version out
where can i get a download

Right now it's only available via svn:
https://rapideuphoria.svn.sf.net/svnroot/rapideuphoria/branches/task_rewrite

You can get a gzipped tarball of the code here:
http://rapideuphoria.svn.sourceforge.net/viewvc/rapideuphoria/branches/task_rewrite.tar.gz?view=tar

Matt

new topic     » goto parent     » topic index » view message » categorize

9. Re: Multitasking unit test

thanks

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu