On Sat, Mar 08, 2014 at 04:34:37PM +0100, John Tytgat wrote: > Roughly a year ago I did several UnixLib fixes for returning more > accurate errno error values and made a small unittest framework > (recipe/files/gcc/libunixlib/unittest) for testing these changes. It > would be interesting to have those unittests run on HostFS instead of > a FileCore based FS what I used at that time. My guess is that HostFS > will fail more of those unittests...
Here you go. RPCEmu 0.8.9, RISC OS 5.20 (10 Jun 2013), Mac OS 10.9. It does fail a few... Theo *^.runme Test 'Test_001_BasicFileOpen'... ok Test 'Test_002_BasicDirOpen'... ok Test 'Test_003_FOpenAppend'... ok Test 'Test_004_SameFileOpenTwice'... ok Test 'Test_005_FileOpenViaSymLink'... ok Test 'Test_006_GenerationOfEINVAL'... ok Test 'Test_007_GenerationOfEFAULT'... ok Test 'Test_008_GenerationOfENOENT'... ok Test 'Test_009_GenerationELOOP'... ok Test 'Test_010_GenerationENAMETOOLONG'... ok All /HostFS:$/unittest/fopen tests were ok Test 'Test_001_BasicStat'... ok Test 'Test_003_GenerationOfEFAULT'... ok Test 'Test_004_GenerationOfELOOP'... ok Test 'Test_005_GenerationOfENOTDIR'... lstat(dir1/file2/object, ...) got error 2 (No such file or directory) while we would have expected error 20 (Not a directory) *** ExpectCall_LStat FAILED at line 203 ! *** Test 'Test_005_GenerationOfENOTDIR' FAILED ! Test 'Test_006_GenerationOfENOENT'... ok Test 'Test_007_GenerationOfENAMETOOLONG'... ok Test 'Test_001_BasicReadLink'... ok Test 'Test_002_BufSize'... ok Test 'Test_003_GenerationOfEINVAL'... ok Test 'Test_004_GenerationOfEFAULT'... ok Test 'Test_005_GenerationOfENOENT'... ok Test 'Test_006_GenerationOfENOTDIR'... readlink(dir1/file2/symlink, ..., 4) returned errno 2 (No such file or directory) but we expected errno 20 instead *** ExpectCall_ReadLink FAILED at line 159 ! *** Test 'Test_006_GenerationOfENOTDIR' FAILED ! Test 'Test_007_GenerationOfENAMETOOLONG'... ok Test 'Test_001_BasicRealPath'... ok Test 'Test_003_GenerationOfEINVAL'... ok Test 'Test_004_GenerationOfELOOP'... ok Test 'Test_005_GenerationOfENOENT'... ok Test 'Test_006_GenerationOfENOTDIR'... realpath(dir1/file2/object, NULL) returned a NULL value (errno 2 'No such file or directory') but we expected errno 20 'Not a directory' instead *** ExpectCall_RealPath FAILED at line 127 ! *** Test 'Test_006_GenerationOfENOTDIR' FAILED ! Test 'Test_001_BasicRenameFile'... ok Test 'Test_002_BasicRenameDir'... ok Test 'Test_003_BasicRenameSymLink'... ok Test 'Test_004_RenameFileAndDstExists'... ok Test 'Test_005_RenameDirAndDstExists'... ok Test 'Test_006_GenerationOfEISDIR'... ok Test 'Test_007_GenerationOfENOENT'... rename(file, dir/nodir/foo) got error 0 (Success) while we would have expected error 2 (No such file or directory) *** ExpectCall_Rename FAILED at line 243 ! *** Test 'Test_007_GenerationOfENOENT' FAILED ! Test 'Test_008_GenerationOfENOTDIR'... rename(file/nofile, other_file) got error 2 (No such file or directory) while we would have expected error 20 (Not a directory) *** ExpectCall_Rename FAILED at line 282 ! *** Test 'Test_008_GenerationOfENOTDIR' FAILED ! Test 'Test_009_GenerationOfEFAULT'... ok Test 'Test_010_GenerationOfEINVAL'... rename(dir, dir/subdir/foo) got error 88 (Bad rename) while we would have expected error 22 (Invalid argument) *** ExpectCall_Rename FAILED at line 340 ! *** Test 'Test_010_GenerationOfEINVAL' FAILED ! Test 'Test_011_GenerationOfENAMETOOLONG'... ok Test 'Test_012_RenameWithFiletypeSuffix'... ok Test 'Test_013_RenameWithExtension'... ok Test 'Test_001_BasicStat'... ok Test 'Test_003_GenerationOfEFAULT'... ok Test 'Test_004_GenerationOfELOOP'... ok Test 'Test_005_GenerationOfENOTDIR'... stat(dir1/file2/object, ...) got error 2 (No such file or directory) while we would have expected error 20 (Not a directory) *** ExpectCall_Stat FAILED at line 203 ! *** Test 'Test_005_GenerationOfENOTDIR' FAILED ! Test 'Test_006_GenerationOfENOENT'... ok Test 'Test_007_GenerationOfENAMETOOLONG'... ok Test 'Test_001_BasicSymLink'... ok Test 'Test_003_GenerationOfEEXIST'... ok Test 'Test_004_GenerationOfEFAULT'... ok Test 'Test_005_GenerationOfENOENT'... *** Check_DirEmpty FAILED at line 160 ! *** Test 'Test_005_GenerationOfENOENT' FAILED ! Test 'Test_006_GenerationOfENOTDIR'... symlink(non_existing_object, dir1/file2/symlink) got error 2 (No such file or directory) while we would have expected error 20 (Not a directory) *** ExpectCall_SymLink FAILED at line 182 ! *** Test 'Test_006_GenerationOfENOTDIR' FAILED ! Test 'Test_007_GenerationOfENAMETOOLONG'... ok Test 'Test_001_BasicUTime'... File file has modification date 2405181940.000000000 (0x8f5c29f4 0x00000000) 'Sat Feb 12 11:37:24 1910', but we expected 4294967295.000000000 (0xffffffff 0x00000000) 'Wed Dec 31 23:59:59 1969'. *** Check_FileModDate FAILED at line 55 ! *** Test 'Test_001_BasicUTime' FAILED ! Test 'Test_002_GenerationOfENOENT'... utime(file, 0xa6fac) got error 0 (Success) while we would have expected error 2 (No such file or directory) *** ExpectCall_UTime FAILED at line 106 ! *** Test 'Test_002_GenerationOfENOENT' FAILED ! Test 'Test_003_GenerationOfEFAULT'... ok Test 'Test_004_GenerationOfENAMETOOLONG'... ok Test 'Test_001_BasicUTimes'... File file has modification date 0.000000000 (0x00000000 0x00000000) 'Thu Jan 01 00:00:00 1970', but we expected 0.020000000 (0x00000000 0x01312d00) 'Thu Jan 01 00:00:00 1970'. *** Check_FileModDate FAILED at line 57 ! *** Test 'Test_001_BasicUTimes' FAILED ! Test 'Test_002_GenerationOfENOENT'... utimes(file, 0xa6fa4) got error 0 (Success) while we would have expected error 2 (No such file or directory) *** ExpectCall_UTimes FAILED at line 115 ! *** Test 'Test_002_GenerationOfENOENT' FAILED ! Test 'Test_003_GenerationOfEFAULT'... ok Test 'Test_004_GenerationOfENAMETOOLONG'... ok * _______________________________________________ GCCSDK mailing list gcc@gccsdk.riscos.info Bugzilla: http://www.riscos.info/bugzilla/index.cgi List Info: http://www.riscos.info/mailman/listinfo/gcc Main Page: http://www.riscos.info/index.php/GCCSDK