Opened 13 months ago

Closed 8 months ago

#15754 closed defect (fixed)

TESTBED: Test for file with trailing dot fails

Reported by: chkuendig Owned by: chkuendig
Priority: normal Component: Common
Version: Keywords:
Cc: Game: Simon the Sorcerer 1

Description

In testbed there's a test which seems to be failing:

There's a test to read a file called "file." without passing the extra trailing dot:

test file reading - fs.cpp#L73
file creation - create-testbed-data.sh#L43

I think there was a workaround for this for some circumstances (dd505ff6aebbe3f321d8bbebabc32a471c2ac0c8) but I don't think this works generally when accessing files this way.


Looking at the current code, this check is done in two places in file.cpp, presumably File::open is the one that should handle this. When running testbed with debuglevel 8, I don't get the "Opening hashed:" output, so presumably this isn't running through that path at all: (I tested it on macos nightly master)

Info! Executing Test: ReadingFile
FSDirectory::createReadStreamForMember('file.txt') -> '<redacted>/testbed/test1/file.txt'
Message Extracted from test1/file.txt : It works!
FSDirectory::createReadStreamForMember('file.txt') -> '<redacted>/testbed/test1/file.txt'
Message Extracted from test1/file.txt : It works!
FSDirectory::createReadStreamForMember('FILE.TXT') -> '<redacted>/testbed/test1/file.txt'
Message Extracted from test1/FILE.TXT : It works!
FSDirectory::createReadStreamForMember('File.txt') -> '<redacted>/testbed/Test2/File.txt'
Message Extracted from Test2/File.txt : It works!
FSDirectory::createReadStreamForMember('file.txt') -> '<redacted>/testbed/Test2/File.txt'
Message Extracted from Test2/file.txt : It works!
FSDirectory::createReadStreamForMember('FILE.TXT') -> '<redacted>/testbed/Test2/File.txt'
Message Extracted from Test2/FILE.TXT : It works!
FSDirectory::createReadStreamForMember('FILE.txt') -> '<redacted>/testbed/TEST3/FILE.txt'
Message Extracted from TEST3/FILE.txt : It works!
FSDirectory::createReadStreamForMember('file.txt') -> '<redacted>/testbed/TEST3/FILE.txt'
Message Extracted from TEST3/file.txt : It works!
FSDirectory::createReadStreamForMember('FILE.TXT') -> '<redacted>/testbed/TEST3/FILE.txt'
Message Extracted from TEST3/FILE.TXT : It works!
FSDirectory::createReadStreamForMember('fILe.txt') -> '<redacted>/testbed/tEST4/fILe.txt'
Message Extracted from tEST4/fILe.txt : It works!
FSDirectory::createReadStreamForMember('file.txt') -> '<redacted>/testbed/tEST4/fILe.txt'
Message Extracted from tEST4/file.txt : It works!
FSDirectory::createReadStreamForMember('FILE.TXT') -> '<redacted>/testbed/tEST4/fILe.txt'
Message Extracted from tEST4/FILE.TXT : It works!
Can't open game file for reading
Reading from test5/file failed
Can't open game file for reading
Reading from test5/file failed
Can't open game file for reading
Reading from TEST5/FILE failed
Failed 3 out of 15
Result: Failed
Info! Executing Test: WritingFile
Data written and read correctly


Change History (4)

comment:1 by digitall, 10 months ago

Game: Simon the Sorcerer 1
Summary: Testbed: Test for file with trailing dot failsTESTBED: Test for file with trailing dot fails

This test should be fixed if still failing since this is required for support for Simon the Sorcerer (AGOS engine) since the game datafiles have several with trailing dots on the original CD which caused problems previously when running directly:
https://wiki.scummvm.org/index.php?title=Simon_the_Sorcerer#Required_data_files

comment:2 by digitall, 10 months ago

Ah... It is Simon The Sorcerer II I think. gsptr30. and tbllist. both have trailing dots. This information seems to have been lost from the wiki pages:
https://wiki.scummvm.org/index.php?title=Simon_the_Sorcerer_II:_The_Lion,_the_Wizard_and_the_Wardrobe

comment:3 by chkuendig, 10 months ago

Yes, this still fails. I just tested in on daily macosx-arm64-master-480f3405 and it still occurs.

comment:4 by chkuendig, 8 months ago

Owner: set to chkuendig
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.