Skip to content
Merged
Show file tree
Hide file tree
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
11 changes: 5 additions & 6 deletions test/host/tstfabnd.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@
* allocated for the life of the job. The data set can then be
* scratched neither by the program that created it nor by its user.
*
* Measured on mvsdev 2026-09-09, mvslovers/ftpd#129:
* The failure was seen on a real system. A program wrote to a data set
* until it was full; the system reported IEC031I D37-04, the program's
* ESTAE recovered, and the program then closed the FILE. That close
* abended in turn and left the DD allocated.
*
* IEC031I D37-04,IFG0554T,FTPDT,FTPDT,SYS00006,251,WORK00,...
* FTPD070E ABEND SD37 RECOVERED CMD=STOR SOCKET=3 TOTAL=1
* FTPD076W CLOSE ABENDED AFTER STOR, DD=SYS00006 FREE RC=4
*
* ftpd opens with fopen(dsn,"wb") - the buffered __fputc path. The
* The program opens with fopen(dsn,"wb") - the buffered __fputc path. The
* D37 fires inside __awrite(); the caller's ESTAE unwinds THROUGH
* libc370, so @@fflush.c's reset: label never runs and fp->upto still
* points past the block that failed. That is the state this test
Expand Down
19 changes: 10 additions & 9 deletions test/mvs/tstnospc.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@
* line also goes to the console, because an abend discards whatever SYSOUT
* is still sitting in the QSAM buffer.
*
* SHAPE. mvslovers/ftpd's (ftpd#129), same as tstx37.c: __dsalcf() creates
* with SPACE=TRK(1,0) - no secondary, so the first overflow is a D37 and not
* an extend - __dsfree() catalogs, fopen(dsn,"wb") reopens by name.
* SHAPE. A file-transfer upload into a full data set, same as tstx37.c:
* __dsalcf() creates with SPACE=TRK(1,0) - no secondary, so the first
* overflow is a D37 and not an extend - __dsfree() catalogs, fopen(dsn,"wb")
* reopens by name.
*
* CHECKS - these are the ones a green run must satisfy whatever the numbers
* turn out to be; the numbers themselves are reported, not asserted.
Expand Down Expand Up @@ -74,12 +75,12 @@
* upload probe.xmit to IBMUSER.MBT.XMIT.IN, run jcl/recvnosp.jcl, then
* jcl/tstnospc.jcl.
*
* MEASURED TWICE on mvsdev 2026-09-13, before and after the #149 fix. The
* MEASURED TWICE on the reference system, before and after the #149 fix. The
* checks below are written so that BOTH runs are green - they pin the shape
* (no abend, no drift to EIO, clearerr() works), not the policy. What the
* fix changed is the map, and the map is the evidence.
*
* AFTER the fix, JOB00254: CC 0000, 9/9, no IEC031I.
* AFTER the fix: CC 0000, 9/9, no IEC031I.
*
* map XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
* 0 full, 50 short. Every write after the error is refused at
Expand All @@ -92,9 +93,9 @@
* the buffer refills, the eleventh flush fails, and the twelfth
* is refused.
*
* BEFORE the fix, JOB00252: CC 0000, 9/9 PASS, and no
* IEC031I line in the job log. TRK(1,0) on WORK00 took the same 200 records
* of 80 that tstx37 fills it with. The three answers:
* BEFORE the fix: CC 0000, 9/9 PASS, and no IEC031I line in the job log.
* TRK(1,0) took the same 200 records of 80 that tstx37 fills it with. The
* three answers:
*
* (a) THE MAP. ..........X..........X..........X..........X......
* 46 of 50 retries returned the full 80 bytes. Not one of those 46
Expand Down Expand Up @@ -204,7 +205,7 @@ int main(int argc, char **argv)
wtof("TSTNOSPC SETUP FAILED __dsalcf rc=%d", rc);
return 8;
}
__dsfree(dd); /* the free catalogs it - ftpd's step 1 */
__dsfree(dd); /* the free catalogs it */

sprintf(fname, "'%s'", dsn);
fp = fopen(fname, "wb");
Expand Down
23 changes: 12 additions & 11 deletions test/mvs/tstx37.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* with an ESTAE could recover, but the abend unwound THROUGH @@fflush.c
* before its reset: label, so fp->upto still pointed past the block that
* failed and the next flush re-drove the identical WRITE. Measured on
* mvsdev JOB00235/241/245: that second attempt does not fail cleanly, it
* a real system: that second attempt does not fail cleanly, it
* PROGRAM-CHECKS - 0x0C4 on one run and 0x0C6 on another for identical
* code. And one path reaches it with no API call at all: @@exit.c walks
* grt->grtfile at program termination and fclose()s every survivor with no
Expand All @@ -29,9 +29,10 @@
* it is CC 0000. Every check is also written to the console, because an
* abend discards whatever SYSOUT is still sitting in the QSAM buffer.
*
* SHAPE. mvslovers/ftpd's (ftpd#129): __dsalcf() creates the data set with
* SPACE=TRK(1,0) - no secondary, so the first overflow is a D37 and not an
* extend - __dsfree() catalogs it, and fopen(dsn,"wb") reopens it by name.
* SHAPE. A file-transfer upload into a full data set: __dsalcf() creates the
* data set with SPACE=TRK(1,0) - no secondary, so the first overflow is a
* D37 and not an extend - __dsfree() catalogs it, and fopen(dsn,"wb")
* reopens it by name.
*
* CHECKS
* (1) fwrite() stops short of the limit - the write did fail
Expand Down Expand Up @@ -68,14 +69,14 @@
* upload probe.xmit to IBMUSER.MBT.XMIT.IN, run jcl/recvx37.jcl, then
* jcl/tstx37.jcl.
*
* MEASURED 2026-09-13 on mvsdev, JOB00247: CC 0000, 5/5 PASS, and - the
* check no return code can make - NO IEC031I LINE IN THE JOB LOG AT ALL.
* TRK(1,0) on WORK00 took the same 200 records of 80 that produced the D37
* in JOB00245; this time fwrite() stopped at 200 with ferror() set and
* MEASURED on the reference system: CC 0000, 5/5 PASS, and - the check no
* return code can make - NO IEC031I LINE IN THE JOB LOG AT ALL. TRK(1,0)
* took the same 200 records of 80 that produced the D37 before the exit
* was planted; this time fwrite() stopped at 200 with ferror() set and
* errno 28 (ENOSPC), fclose() returned, and remove() answered 0.
*
* Cross-checked the same day by JOB00249: test/mvs/tstfabnd.c, whose three
* steps each produced a D37 in JOB00245, now report try()=0x00000000 and
* Cross-checked: test/mvs/tstfabnd.c, whose three steps each produced a
* D37 before the exit was planted, now reports try()=0x00000000 and
* "nothing to measure" in all three - the same shape, no abend.
*
* RC: 0 = every check passed, 8 = at least one did not (it is the COND CODE).
Expand Down Expand Up @@ -125,7 +126,7 @@ int main(int argc, char **argv)
wtof("TSTX37 SETUP FAILED __dsalcf rc=%d", rc);
return 8;
}
__dsfree(dd); /* the free catalogs it - ftpd's step 1 */
__dsfree(dd); /* the free catalogs it */

sprintf(fname, "'%s'", dsn);
fp = fopen(fname, "wb");
Expand Down
Loading