[M3devel] the quake tests on NT386GNU

Jay jayk123 at hotmail.com
Sun Mar 30 18:56:13 CEST 2008


The quake tests on NT386GNU.
 
m3-sys\m3quake\test
 
There are the following failures. I can partly explain all of them, and I can get them all to pass, but some of my changes are dubious.
 
%
% Executables certainly can be and are writable -- how did they get created in the first place?
%
if not equal ($OS, "Windows_NT")
f = "res = fs_writable( more )"
check( "f013", f, "" )
end
 
so I added:
 
fs_rmfile("readonly")
> "readonly" in
end
exec("chmod -w readonly")
f = "res = fs_writable( \"readonly\" )"
check( "f013b", f, "" )
 
which works.
 
f = "res = fs_lsfiles( \"a\", \"T\" )"
check( "f036", f, "b apple" )
 
fails because it assumes the file system will return files in a certain order.
This kind of thing varies legimimately. I added a check2 function that expects
either of two outputs and it succeeds with:
 
% some file system sort, some hash, some retain creation order, etc
% allow either order
f = "res = fs_lsfiles( \"a\", \"T\" )"
check2( "f036", f, "b apple", "apple b" )
 
In this case I think the test is wrong. PPC_DARWIN fails the same here (and otherwise passes; so I can debug)
 
Tests 8, 9, 10, 11 that verify they can run some pipelines, including sed, do succeed, but they get the wrong output, as if sed didn't run.
If I wrap the whole thing in sh, it works.
But that shouldn't be necessary as I understand.
As I understand q_exec's job is to emulate a bunch of sh behavior, esp. around |, ||, &, &&, >, <, without running sh.
 
Tests 19 and 20 use q_exec and echo.
Again a sh wrapper helps, but shouldn't be necessary, as well
 
echo 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16>x
yields 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
instead of the expected 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
If you put a space between the 16 and x, and again the sh wrapper, it works.
I'd say the 16 is being interpreted as a file handle, but the output does go to the right place, so it's half and half.
In this case the test might be partly wrong.
 
Lastly, simply, when you pushd/pop around, you expect BUILD_DIR, not TARGET.
In this case the test is simply subtely wrong.
 
echo.exe does exist on Cygwin and it should be what gets run by these.
echo exists on Darwin (not a shell built in).
 
I think the ls fix, BUILD_DIR fix, readonly fix, should be taken as I have them, after I test them on PPC_DARWIN.
The others might be a failure of the Quake code to be consistent across platforms. Someone (maybe me) needs to debug them.
I also need to test native NT386, but with sed and guess chmod in the path.
 
- Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20080330/9d56f4dc/attachment-0002.html>


More information about the M3devel mailing list