Test suite results for test file webtbs/tw3695.pp

Test run data :

Run ID:
Operating system: linux
Processor: mipsel
Version: 3.3.1
Fails/OK/Total: 49/9165/9214
Version: 3.3.1
Full version: 3.3.1-15593-gc3a3cfe80f
Comment: -ao-xgot -fPIC -XR/home/muller/sys-root/mipsel-linux -Xd -Xr/home/muller/sys-root/mipsel-linux
Machine: cfarm14
Category: 1
SVN revisions: c3a3cfe80f:484dab553b:3f8bbd3b00:902c93f3c3
Submitter: muller
Date: 2024/04/22 11:53:00 <> 2024/04/21
Previous run: 936295
Next run: 937674

Hide skipped tests

Hide successful tests

Test file "webtbs/tw3695.pp" information:

t_id 1504
t_adddate 2005/03/05
t_result 0
t_knownrunerror 0

Detailed test run results:

tr_idruntr_oktr_skiptr_result
456448557937022TrueFalseSuccessfully run

Record count: 1

No log of 937022.

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 Classes, SysUtils
{$ifdef unix}
,cthreads
{$endif unix}
;

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
    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
    Sleep(100);
    CheckSynchronize;
    //WriteLn('Loop forever inside Tester.run when compiled by FPC 1.9.8');
  end;
  thread.Terminate;
end;

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

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