chapel-lang/chapel
View on GitHubTest that all IO routines on readers/writers/files work from remote locales
Open
#24,426 opened on Feb 15, 2024
area: Libraries / Moduleseasy / straightforwardgood first issue
Repository metrics
- Stars
- (2,010 stars)
- PR merge metrics
- (PR metrics pending)
Description
PR #24422 fixed a bug in which our seek() routines did not contain an on-clause before calling into the C IO routines, resulting in a segfault. This issue captures a desire to test all methods on fileReaders/fileWriters/files from a remote locale to ensure that other such bugs aren't lurking.
As an example of how such tests might look, here's a pattern that tests .seek() on a fileReader:
var infile = open("out.txt", ioMode.r);
on Locales[numLocales-1] {
var myReader = infile.reader(locking=false);
myReader.seek(2..#2);
var i = myReader.read(int);
writeln(i);
}