llibtst.log with errors on A590 - DryOS Development - CHDK Forum supplierdeeply

llibtst.log with errors on A590

  • 3 Replies
  • 2852 Views
*

Offline toby

  • *
  • 46
llibtst.log with errors on A590
« on: 23 / November / 2008, 09:59:15 »
Advertisements
Hi, just made the lib-test and it says:

Code: [Select]
test log opened
platform: a590 100e
version: CHDK 0.8.1-586 built on Nov 20 2008 20:55:03
***test io***
file info for io.input: closed file!
file info for io.output: valid file
 ptr: 2100464 fd: 3 len: 190 pos: 190
 raw vals: 0:3 4:190 8:1 12:190 16:1 20:1 24:270606704 28:0 32:1819029313
io.open("A/iotest0.txt","w+b"): OK PASS
A/iotest0.txt:write(...): OK PASS
A/iotest0.txt:seek("set",4): OK 4 PASS
A/iotest0.txt:read(5): string [slick]
A/iotest0.txt:seek("nil",nil): OK 9 PASS
A/iotest0.txt:seek("cur",-5): OK 4 PASS
A/iotest0.txt:write(...): OK PASS
A/iotest0.txt:seek("end",nil): OK 44 PASS
A/iotest0.txt:write(...): OK PASS
A/iotest0.txt:flush(): OK PASS
A/iotest0.txt:seek("set",nil): OK 0 PASS
test file:lines()
0: [the quick brown fox jumps over the lazy dog]
1: [1]
2: [2a   3 1234567890       b]
A/iotest0.txt:seek("set",nil): OK 0 PASS
A/iotest0.txt:write(...): OK PASS
A/iotest0.txt:seek("set",nil): OK 0 PASS
test file:read("*a")
A/iotest0.txt:read(*a): string [                                           
1
2a   3 1234567890       b]
A/iotest0.txt:seek("set",nil): OK 0 PASS
testing file:read("*n")
A/iotest0.txt:read(*n): number [1]
A/iotest0.txt:seek("nil",nil): OK 45 NA
A/iotest0.txt:read(*n): number [2]
A/iotest0.txt:seek("nil",nil): OK 47 NA
A/iotest0.txt:read(*n): <no results>
A/iotest0.txt:seek("nil",nil): OK 47 NA
A/iotest0.txt:read(1): string [a]
A/iotest0.txt:seek("nil",nil): OK 48 NA
A/iotest0.txt:read(*n): number [3]
A/iotest0.txt:seek("nil",nil): OK 52 NA
A/iotest0.txt:read(*n): number [1234567890]
A/iotest0.txt:seek("nil",nil): OK 63 NA
A/iotest0.txt:read(*n): <no results>
A/iotest0.txt:seek("nil",nil): OK 70 NA
A/iotest0.txt:read(1): string [b]
A/iotest0.txt:seek("nil",nil): OK 71 NA
A/iotest0.txt:read(*n): <no results>
A/iotest0.txt:seek("nil",nil): OK 71 NA
A/iotest0.txt:read(1): <no results>
A/iotest0.txt:seek("nil",nil): OK 71 NA
A/iotest0.txt:close(): OK PASS
test open missing file
io.open("A/bogus","r"): ERR msg=A/bogus: error PASS
test open dir
io.open("A/CHDK","r"): ERR msg=A/CHDK: error PASS
io.open("A/iotest0.txt","r"): OK PASS
test invalid seeks
A/iotest0.txt:seek("set",-1): ERR nil PASS
A/iotest0.txt:seek("end",100): ERR nil PASS
A/iotest0.txt:close(): OK PASS
***end io OK***

***test os***
current date Sun Nov 23 15:13:24 2008
os.time(): OK 1227453204 PASS
os.time({day=1,year=1980,month=1,}): OK 315576000 PASS
os.time({day=1,year=1066,month=1,}): ERR PASS
%a [Sun]
%A [Sunday]
%b [Nov]
%B [November]
%c [Sun Nov 23 15:13:24 2008]
%d [23]
%H [15]
%I [03]
%j [328]
%m [11]
%M [13]
%p [PM]
%S [24]
%U [47]
%w [0]
%W [46]
%x [11/23/08]
%X [15:13:24]
%y [08]
%Y [2008]
%Z [%Z]
%% [%]
os.mkdir("A/MDTST0"): OK PASS
io.open("A/MDTST0/TEST0.DAT","wb"): OK PASS
A/MDTST0/TEST0.DAT:write(...): OK PASS
A/MDTST0/TEST0.DAT:close(): OK PASS
os.stat("A/MDTST0/TEST0.DAT"): OK PASS
{
 dev=2
 mode=33279
 size=4
 atime=1227398400
 mtime=1227453204
 ctime=1227453204
 blksize=512
 blocks=1
 attrib=32
 is_dir=false
 is_file=true
}
os.utime("A/MDTST0/TEST0.DAT",nil,nil): OK PASS
os.stat("A/MDTST0/TEST0.DAT"): OK PASS
{
 dev=2
 mode=33279
 size=4
 atime=1227398400
 mtime=1227453204
 ctime=1227453204
 blksize=512
 blocks=1
 attrib=32
 is_dir=false
 is_file=true
}
os.utime("A/MDTST0/TEST0.DAT",441806400,472824000): OK PASS
os.stat("A/MDTST0/TEST0.DAT"): OK PASS
{
 dev=2
 mode=33279
 size=4
 atime=441763200
 mtime=472824000
 ctime=1227453204
 blksize=512
 blocks=1
 attrib=32
 is_dir=false
 is_file=true
}
os.stat("A/MDTST0"): OK PASS
{
 dev=2
 mode=16895
 size=32768
 atime=1227398400
 mtime=1227453204
 ctime=1227453204
 blksize=512
 blocks=64
 attrib=16
 is_dir=true
 is_file=false
}
os.rename("A/MDTST0/TEST0.DAT","A/MDTST0/TEST1.DAT): OK PASS
os.listdir("A/MDTST0",nil): OK PASS
{
 1="TEST1.DAT"
}
os.listdir("A/MDTST0",true): OK PASS
{
 1="."
 2=".."
 3="TEST1.DAT"
}
os.remove("A/MDTST0): ERR A/MDTST0: error PASS
os.remove("A/bogus): ERR A/bogus: error PASS
os.listdir("A/bogus",nil): ERR A/bogus: error PASS
os.listdir("A/llibtst.log",nil): OK FAIL
{
}
os.stat("A/bogus"): ERR A/bogus: error PASS
os.utime("A/bogus",nil,nil): ERR A/bogus: error PASS
os.rename("A/bogus","A/blah): ERR A/bogus: error PASS
os.mkdir("A/CHDK"): ERR A/CHDK: error PASS
os.remove("A/MDTST0/TEST1.DAT): OK PASS
os.remove("A/MDTST0): OK PASS
os.remove("A/iotest0.txt): OK NA
***end os FAIL 1***

close test log
What are the problems??
Greetz Tobi

*

Offline reyalp

  • ******
  • 13439
Re: llibtst.log with errors on A590
« Reply #1 on: 23 / November / 2008, 16:43:40 »
This appears to be a known defect for dryos cams:
The one failure I see is
Quote
os.listdir("A/llibtst.log",nil): OK FAIL
This means that when the script treated a file (llibtest.log) as a directory, it got a success result when an error was expected. This isn't a big deal, you can still use listdir, it will just give you an empty list if you try to use it on something that isn't a directory.

I suppose I should fix this or remove it from the test.
Don't forget what the H stands for.

*

Offline toby

  • *
  • 46
Re: llibtst.log with errors on A590
« Reply #2 on: 23 / November / 2008, 16:58:14 »
If I not use any of these commands with errors, I would not get any problems, would I?

*

Offline reyalp

  • ******
  • 13439
Re: llibtst.log with errors on A590
« Reply #3 on: 23 / November / 2008, 17:17:14 »
If I not use any of these commands with errors, I would not get any problems, would I?
First of all, the part you should pay attention to is the final PASS or FAIL in each line. In your log, the only fail is listdir.

ERR/OK indicates the status returned by the function.  Many of the tests expect the function to return an error, so you will see ERR blah blah blah PASS. This means the expected result was seen, and everything is fine.

In the case of listdir, the failure is fairly minor. The listdir function doesn't correctly detect when you give it something that isn't a directory, but it just returns an empty listing instead of an error message.
Don't forget what the H stands for.


 

Related Topics