chapel-lang/chapel

Test that all IO routines on readers/writers/files work from remote locales

Open

#24.426 geöffnet am 15. Feb. 2024

Auf GitHub ansehen
 (2 Kommentare) (2 Reaktionen) (0 zugewiesene Personen)Chapel (446 Forks)auto 404
area: Libraries / Moduleseasy / straightforwardgood first issue

Repository-Metriken

Stars
 (2.010 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

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);
}

Contributor Guide