chapel-lang/chapel
在 GitHub 查看Test that all IO routines on readers/writers/files work from remote locales
Open
#24,426 建立於 2024年2月15日
area: Libraries / Moduleseasy / straightforwardgood first issue
倉庫指標
- Star
- (2,010 star)
- PR 合併指標
- (PR 指標待抓取)
描述
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);
}