mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-04 02:51:31 -08:00
1. Document how to run it on Windows from a Cygwin shell. 2. Ignore trailing spaces when analyzing test output. 3. Use the directory separator "/" since we're running under Cygwin. 4. No need for cat.exe, strings.exe, or tee.exe (these are supplied by Cygwin). 5. Microsoft Visual C/C++ needs /D_CRT_SECURE_NO_WARNINGS to avoid a warning about scanf. 6. The Microsoft Visual C/C++ linker no longer takes the options /debugtype:both or /debug:full. Replace with /debug. 7. Remove /pdb:none option (we want the PDB so that we can debug the result). 8. windows.h defines an UNALIGNED macro, so need to #undef it. 9. The long int type is 32 bits on 64-bit Windows, so we need size_t instead. 10. The values in the LPEXCEPTION_RECORD structure have type ULONG_PTR. 11. Test cases are expecting access violations to report abort=true, but on Windows they are caught by the exception handler, so report abort=true in this case. 12. mpsw3.h has gone, but we do need mpswin.h. Fix some of the test cases: 1. Avoid compiler warning about overflowed multiplication in argerr/153.c. 2. In conerr/2.c, conerr/8.c and conerr/13.c, malloc enough space so that the signature check doesn't cause an access violation. 3. In conerr/25.c, allocate an object whose size is aligned to the platform alignment, which is 16 bytes on w3i6mv. 4. In connerr/18.c, conerr/53.c and conerr/54.c, update the location and text of the expected assertions. Copied from Perforce Change: 191564 ServerID: perforce.ravenbrook.com
52 lines
800 B
C
52 lines
800 B
C
/*
|
|
TEST_HEADER
|
|
id = $Id$
|
|
summary = is_stale without resetting
|
|
language = c
|
|
link = myfmt.o testlib.o
|
|
OUTPUT_SPEC
|
|
assert = true
|
|
assertfile P= ld.c
|
|
assertcond = ld->_epoch <= history->epoch
|
|
END_HEADER
|
|
*/
|
|
|
|
#include <string.h>
|
|
|
|
#include "testlib.h"
|
|
#include "mpscamc.h"
|
|
#include "myfmt.h"
|
|
|
|
static void test(void)
|
|
{
|
|
mps_arena_t arena;
|
|
mps_ld_s ld;
|
|
|
|
/* overwrite ld with junk */
|
|
memset(&ld, 0xff, sizeof ld);
|
|
|
|
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
|
|
|
|
/*
|
|
mps_ld_reset(&ld, arena);
|
|
comment("Reset ld.");
|
|
*/
|
|
|
|
/*
|
|
mps_ld_add(&ld, arena, &arena);
|
|
comment("Added to ld.");
|
|
*/
|
|
|
|
report("isstale", "%d", mps_ld_isstale(&ld, arena, &arena));
|
|
|
|
mps_arena_destroy(arena);
|
|
comment("Destroyed arena.");
|
|
|
|
}
|
|
|
|
int main(void)
|
|
{
|
|
easy_tramp(test);
|
|
return 0;
|
|
}
|
|
|