Remove invalid tests.
Remove invalid tests that were intended to be tests of (hugemax+1) OOM, for which tests already exist.
This commit is contained in:
parent
d412624b25
commit
a62e94cabb
@ -48,7 +48,7 @@ get_huge_size(size_t ind)
|
|||||||
|
|
||||||
TEST_BEGIN(test_overflow)
|
TEST_BEGIN(test_overflow)
|
||||||
{
|
{
|
||||||
size_t hugemax, size;
|
size_t hugemax;
|
||||||
|
|
||||||
hugemax = get_huge_size(get_nhuge()-1);
|
hugemax = get_huge_size(get_nhuge()-1);
|
||||||
|
|
||||||
@ -61,14 +61,6 @@ TEST_BEGIN(test_overflow)
|
|||||||
assert_ptr_null(mallocx(SIZE_T_MAX, 0),
|
assert_ptr_null(mallocx(SIZE_T_MAX, 0),
|
||||||
"Expected OOM for mallocx(size=%#zx, 0)", SIZE_T_MAX);
|
"Expected OOM for mallocx(size=%#zx, 0)", SIZE_T_MAX);
|
||||||
|
|
||||||
#if LG_SIZEOF_PTR == 3
|
|
||||||
size = ZU(0x600000000000000);
|
|
||||||
#else
|
|
||||||
size = ZU(0x6000000);
|
|
||||||
#endif
|
|
||||||
assert_ptr_null(mallocx(size, 0),
|
|
||||||
"Expected OOM for mallocx(size=%#zx, 0", size);
|
|
||||||
|
|
||||||
assert_ptr_null(mallocx(1, MALLOCX_ALIGN(ZU(PTRDIFF_MAX)+1)),
|
assert_ptr_null(mallocx(1, MALLOCX_ALIGN(ZU(PTRDIFF_MAX)+1)),
|
||||||
"Expected OOM for mallocx(size=1, MALLOCX_ALIGN(%#zx))",
|
"Expected OOM for mallocx(size=1, MALLOCX_ALIGN(%#zx))",
|
||||||
ZU(PTRDIFF_MAX)+1);
|
ZU(PTRDIFF_MAX)+1);
|
||||||
|
@ -221,7 +221,7 @@ TEST_END
|
|||||||
|
|
||||||
TEST_BEGIN(test_overflow)
|
TEST_BEGIN(test_overflow)
|
||||||
{
|
{
|
||||||
size_t hugemax, size;
|
size_t hugemax;
|
||||||
void *p;
|
void *p;
|
||||||
|
|
||||||
hugemax = get_huge_size(get_nhuge()-1);
|
hugemax = get_huge_size(get_nhuge()-1);
|
||||||
@ -238,14 +238,6 @@ TEST_BEGIN(test_overflow)
|
|||||||
assert_ptr_null(rallocx(p, SIZE_T_MAX, 0),
|
assert_ptr_null(rallocx(p, SIZE_T_MAX, 0),
|
||||||
"Expected OOM for rallocx(p, size=%#zx, 0)", SIZE_T_MAX);
|
"Expected OOM for rallocx(p, size=%#zx, 0)", SIZE_T_MAX);
|
||||||
|
|
||||||
#if LG_SIZEOF_PTR == 3
|
|
||||||
size = ZU(0x600000000000000);
|
|
||||||
#else
|
|
||||||
size = ZU(0x6000000);
|
|
||||||
#endif
|
|
||||||
assert_ptr_null(rallocx(p, size, 0),
|
|
||||||
"Expected OOM for rallocx(p, size=%#zx, 0", size);
|
|
||||||
|
|
||||||
assert_ptr_null(rallocx(p, 1, MALLOCX_ALIGN(ZU(PTRDIFF_MAX)+1)),
|
assert_ptr_null(rallocx(p, 1, MALLOCX_ALIGN(ZU(PTRDIFF_MAX)+1)),
|
||||||
"Expected OOM for rallocx(p, size=1, MALLOCX_ALIGN(%#zx))",
|
"Expected OOM for rallocx(p, size=1, MALLOCX_ALIGN(%#zx))",
|
||||||
ZU(PTRDIFF_MAX)+1);
|
ZU(PTRDIFF_MAX)+1);
|
||||||
|
Loading…
Reference in New Issue
Block a user