We need the ability to produce consistent output for our own tests,
anyway, so make this a user-accessible feature. This was requested in
BR 3392635.
This obsoletes the NASM_TEST_RUN environment variable; simply use the
normal NASMENV environment variable instead.
The .obj tests in travis needed to be updated in order to remove the
rather pointless suffix " CONST" from the NASM signatures.
Reported-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
The "warnstack" test is supposed to test the warning stack, but the
[warning] directive is never seen in preprocess-only mode, so run it
in -f bin mode.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
%ifid $ and %ifid $$ has traditionally been false, revert to that
behavior.
Reported-by: Mike Hommey <mh+anfz@glandium.org>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
When we're running tests we must not fail due to
time stamp difference in a header. Lets zap it if
test run is detected.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
It is disabled by now -- we need to teach nasm-t to
skip some parts of output (due to format specifics).
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
The warning files are generated by a script, but the scripts is fast
enough run every time a C file is updated. To prevent having to
rebuild every file, however, make the generation script only actually
modify the file if it has changed.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
The warning output by obj symbol truncation has been changed, update
the travis reference accordingly.
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
I believe "truncating" is the more common terminology in this case, so
change to it for aestetic reasons only.
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
The case where we warn for excessive length should presumably have
been %.nnns which means limit length to nnn characters, rather than
%nnns which means left-pad with spaces to nnn bytes if possible. Also
change the limit from 128 to 64, to make it more likely to not line
break.
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
When we encode a name we put its length before it, the
storage is one byte width so the name can't be more
than UINT8_MAX (ie 255) bytes length.
Moreover if one provide a name more than RECORD_MAX then
we simply overwrite random memory.
Thus lets do as in other obj_check calls -- shrink the
size we gonna use. But unlike oter code lets yield a
warning as well.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
The mempcpy helper returns *last* byte pointer thus when
we call set_text_free we have to pass a pointer to the
start of the string.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>