Test suite results for test file webtbs/tw3814.pp

Test run data :

Free Pascal Compiler Test Suite Results

View Test suite results

Please specify search criteria:
File:
Operating system:
Processor:
Version
Date
Submitter
Machine
Comment
Limit
Cond
Category
Only failed tests
Hide skipped tests
List all tests

Test file "webtbs/tw3814.pp" information:

t_id 1553
t_adddate 2005/04/13
t_result 0
t_knownrunerror 0

Detailed test run results:

Record count: 50

Total = 50

OK=50 Percentage= 100.00

Result type Cat. Count Percentage First date Last Date
Successfully run 50 100.0 2024/05/16 21:54:00 68 2024/05/17 00:25:00 0
i386 18 36.0 2024/05/16 22:08:00 35 2024/05/16 23:57:00 23
sparc 18 36.0 2024/05/16 23:24:00 38 2024/05/16 23:55:00 41
powerpc 2 4.0 2024/05/16 21:54:00 68 2024/05/16 22:06:00 76
x86_64 12 24.0 2024/05/16 22:26:00 31 2024/05/17 00:25:00 0
linux 4 8.0 2024/05/16 21:54:00 68 2024/05/16 23:46:00 27
win32 4 8.0 2024/05/16 22:08:00 35 2024/05/16 23:57:00 23
solaris 41 82.0 2024/05/16 22:26:00 31 2024/05/16 23:55:00 41
win64 1 2.0 2024/05/17 00:25:00 0 2024/05/17 00:25:00 0
3.3.1 26 52.0 2024/05/16 22:08:00 35 2024/05/16 23:57:00 23
3.2.3 24 48.0 2024/05/16 21:54:00 68 2024/05/17 00:25:00 0

Source:

{ Source provided for Free Pascal Bug Report 3695 }
{ Submitted by "Pedro Lopez-Cabanillas" on  2005-02-25 }
{ e-mail: plcl@telefonica.net }
program testsync;

{$ifdef FPC}
    {$mode delphi}
{$endif}

uses
{$ifdef unix}
cthreads,
{$endif unix}
Classes, SysUtils
;

type
    Tester = class
    private
	counter: Integer;
    public
	procedure count;
	procedure run;
    end;

    MyThread = class(TThread)
    private
        worker: Tester;
    public
	constructor Create(w: Tester);
	procedure Execute; override;
    end;

constructor MyThread.Create(w: Tester);
begin
  worker:= w;
  inherited Create(false);
end;

procedure MyThread.Execute;
begin
  WriteLn('Starting MyThread.Execute');
  repeat
    // sleep(500);
    Synchronize(worker.count);
  until Terminated;
  WriteLn('Ending MyThread.Execute');
end;

procedure Tester.count;
begin
  Inc(counter);
  WriteLn(counter);
end;

procedure Tester.run;
var
  thread: MyThread;
begin
  thread := MyThread.Create(Self);
  While counter<10 do
  begin
    CheckSynchronize(1000);
    //WriteLn('Loop forever inside Tester.run when compiled by FPC 1.9.8');
  end;
  thread.Terminate;
  thread.waitfor;
end;

var
  t: Tester;
begin
  t:=Tester.Create;
  t.run;
  t.free;
end.

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