Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ZGMTIME test #173

Merged
merged 1 commit into from
Jun 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 0 additions & 78 deletions test/os.md
Original file line number Diff line number Diff line change
@@ -1,83 +1,5 @@
# OS specific function is host$os

## ZGTIME

ZGTIME returns a local clock time in seconds and the
used cpu time in milliseconds.

File: `timetest.x`
```
task timetest = t_timetest
procedure t_timetest ()
long clktime0, cputime0
long clktime1, cputime1
int errs
begin
call zgtime(clktime0, cputime0)
if (clktime0 < 1280000000) {
call printf("Unreasonable clktime %d (cputime is %d)\n")
call pargl(clktime0)
call pargl(cputime0)
return
}
clktime1 = clktime0
cputime1 = cputime0
errs = 0
# Busy loop until wall clock increases by one second
while (clktime1 == clktime0) {
call zgtime(clktime1, cputime1)
}
if (clktime1 < clktime0) {
call printf("ERROR: Backward clktime %d --> %d\n")
call pargl(clktime0)
call pargl(clktime1)
errs = errs + 1
}
if (clktime1 > clktime0 + 2) {
call printf("ERROR: Clktime is too fast %d --> %d\n")
call pargl(clktime0)
call pargl(clktime1)
errs = errs + 1
}
if (clktime1 > clktime0 + 2) {
call printf("ERROR: Clktime is too fast %d --> %d\n")
call pargl(clktime0)
call pargl(clktime1)
errs = errs + 1
}
if (cputime1 < cputime0) {
call printf("ERROR: Backward cputime %d --> %d\n")
call pargl(cputime0)
call pargl(cputime1)
errs = errs + 1
}
if (cputime1 == cputime0) {
call printf("ERROR: Constant cputime %d --> %d\n")
call pargl(cputime0)
call pargl(cputime1)
errs = errs + 1
}
if (cputime1 > cputime0 + 1000 * (clktime1 - clktime0)) {
call printf("ERROR: Cputime faster that clktime: %d --> %d\n")
call pargl(cputime0)
call pargl(cputime1)
errs = errs + 1
}
call printf("%d errors\n")
call pargi(errs)
end
```

The test program should just return zero errors:

```
cl> softools
cl> xc -w timetest.x
cl> task $timetest = timetest.e
cl> timetest
0 errors
```

## ZGMTCO

ZGMTCO returns the correction, in seconds, from local standard
Expand Down