Test suite results for test file webtbs/tw0754.pp

Test run data :

Run ID:
Operating system: linux
Processor: aarch64
Version: 3.2.3
Fails/OK/Total: 33/7942/7975
Version: 3.2.3
Full version: 3.2.3-1373-gae0fe8a6a0
Comment: -XR/home/pierre/sys-root/aarch64-linux -Xd -Xr/home/pierre/sys-root/aarch64-linux
Machine: gcclocal
Category: 1
SVN revisions: fdf93c5b29:c17a0e20f5:ae0fe8a6a0:d1c29e6cb9
Submitter: pierre
Date: 2024/04/19 10:20:00 <> 2024/04/09
Previous run: 934289
Next run: 935630

Hide skipped tests

Hide successful tests

Test file "webtbs/tw0754.pp" information:

t_id 685
t_adddate 2003/10/03
t_result 0
t_knownrunerror 0

Detailed test run results:

tr_idruntr_oktr_skiptr_result
443551309934948TrueFalseSuccessfully run

Record count: 1

No log of 934948.

Source:

program test_open_files;

const
   MaxOpenTest = 150;

var
   f : array [1..MaxOpenTest] of text;
   i,count : longint;
   error : word;
   s : string;
   storeexit : pointer;
   Max : longint;

procedure Errorexit;
begin
  exitproc:=storeexit;
  if errorcode=4 then
    begin
       if count<=15 then
         begin
           Writeln('The program could not open more than 15 files !');
           Writeln('Retry after addition of the following line to config.sys file');
           Writeln('FILES=60');
           Writeln('If it still does not work after this change');
           Writeln('you probably use a too old RTL version');
           Writeln('that does not support more than 15 files');
           Writeln('open at the same time');
         end
       else
         begin
           Writeln('The program was able to open ',count,' files simultaneously');
           Writeln('If you need to be able to have more opened files');
           Writeln('Try to increase the FILES=XX value in config.sys file');
           { This is not a RTL error anymore
             as we increased the size over the ordinary 15 limit }
           erroraddr:=nil;
           errorcode:=0;
           exitcode:=0;
         end;
       { close all left open files }
       for i:=count downto 1 do
         begin
           close(f[i]);
           erase(f[i]);
         end;
    end;
end;

begin
  StoreExit:=exitproc;
  ExitProc:=@ErrorExit;
  Max:=MaxOpenTest;
  if paramcount>0 then
    begin
      val(paramstr(1),count,error);
      if error = 0 then
        Max:=count;
      count:=0;
    end;

  for i:=1 to Max do
    begin
      str(i,s);
      s:='file'+s+'.tmp';
      assign(f[i],s);
      rewrite(f[i]);
      count:=i;
      Writeln(f[i],'This is file ',i);
      Writeln(i,' files open');
      { no closing so they are finally all open }
    end;

  for i:=Max downto 1 do
    begin
      close(f[i]);
      erase(f[i]);
    end;
end.

Link to SVN view of webtbs/tw0754.pp source.