'make check' has unexpected failures
Closed this issue · 4 comments
set up environment, cd into m4-1.4.19 directory, run make check, and you currently get:
Failed checks were:
./005.command_li:out ./006.command_li:out ./006.command_li:err ./137.include:err ./180.format:status ./180.format:out ./180.format:err ./196.esyscmd:out ./197.sysval:out ./199.mkstemp:status ./199.mkstemp:out ./199.mkstemp:err
In particular, test 199 output might be interesting to start with:
Checking ./199.mkstemp
@ ../doc/m4.texi:6851: Origin of test
./199.mkstemp: status was 1, expected 0
@ ../doc/m4.texi:6851: Origin of test
./199.mkstemp: stdout mismatch
*** m4-tmp.16843603/m4-xout Fri Aug 13 19:57:57 2021
--- m4-tmp.16843603/m4-out Fri Aug 13 19:57:57 2021
*** 1,9 ****
0
- created
- same length
- different file
- different file
- different file
- 0
--- 1,2 ----
@ ../doc/m4.texi:6851: Origin of test
./199.mkstemp: stderr mismatch
*** m4-tmp.16843603/m4-xerr Fri Aug 13 19:57:57 2021
--- m4-tmp.16843603/m4-err Fri Aug 13 19:57:57 2021
*** 0 ****
--- 1 ----
- m4:stdin:4: ERROR: end of file in string
to run an individual test, cd into 'checks' directory and run:
./check-them
e.g.
./check-them 199.mkstemp
(possibly) a simpler m4 script that fails:
esyscmd(`ls')
This writes the output in EBCDIC instead of ASCII
Confirmed that tagging the pipe as 819 (ASCII) fixes the esyscmd('ls')
issue. Here's the diff for src/builtins.c
:
986,998d985
< #ifdef __MVS__
< int __chgfdccsid(int fd, unsigned short ccsid) {
< attrib_t attr;
< memset(&attr, 0, sizeof(attr));
< attr.att_filetagchg = 1;
< attr.att_filetag.ft_ccsid = ccsid;
< if (ccsid != FT_BINARY) {
< attr.att_filetag.ft_txtflag = 1;
< }
< return __fchattr(fd, &attr, sizeof(attr));
< }
< #endif
<
1049d1035
< __chgfdccsid(fileno(pin), 819);
Also, I added these extra options:
-D_AE_BIMODAL=1 -D_ALL_SOURCE -D_ENHANCED_ASCII_EXT=0xFFFFFFFF -D_OPEN_SYS_FILE_EXT=1 -D_OPEN_SYS_SOCK_IPV6 -D_UNIX03_THREADS -D_UNIX03_WITHDRAWN -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED
with Igor's patch, it fixes this problem and the number of failures drops for 'runchecks'
Skipped checks were:
./125.changeword ./126.changeword ./127.changeword ./128.changeword ./129.changeword ./130.changeword ./stackovf.test
Failed checks were:
./005.command_li:out ./006.command_li:out ./006.command_li:err ./137.include:err