mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
tests: regressions: Allow test-big-heap to work on machines with less memory.
This test would fail on machines with around 4 GB of free memory. Adjust the test so it would now work on such machines (it will however still fail on a machine with around 2 GB of free memory).
This commit is contained in:
@@ -55,11 +55,11 @@ main (int argc, char *argv[])
|
||||
* contiguous memory. Therefore skip the test if the calloc call
|
||||
* fails.
|
||||
*/
|
||||
/* XXX This test also fails for machines with ~ 4 GB of RAM,
|
||||
* because the 2 GB allocation succeeds here, but the fork
|
||||
* fails (since it will require around 2 * 2 GB).
|
||||
/* XXX This test also fails for machines with ~ 2 GB of RAM,
|
||||
* because the 1.1 GB allocation succeeds here, but the fork
|
||||
* fails (since it will require around 2 * 1.1 GB).
|
||||
*/
|
||||
mem = calloc (2 * 1024, 1024 * 1024);
|
||||
mem = calloc (1100, 1024 * 1024);
|
||||
if (mem == NULL) {
|
||||
fprintf (stderr,
|
||||
"%s: test skipped because cannot allocate enough "
|
||||
|
||||
Reference in New Issue
Block a user