Total jobs: 153
Total errors: 41 (26.80%)
LAVA errors: 0 (0.00%)
Test errors: 37 (24.18%)
Job errors: 2 (1.31%)
Infra errors: 2 (1.31%)
Canceled jobs: 0 (0.00%)
Device type: qrb5165-rb5
Total jobs: 52
Total errors: 14 (26.92%)
Error type: Test
Error count: 11 (21.15%)
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 293 seconds'
Count: 1 (1.92%)
IDs:
rb5-07:
8505444
Error: No match for error type 'Test', message 'tradefed - adb device lost[93dcfd96]'
Count: 4 (7.69%)
IDs:
rb5-01:
8501284 8501339 8503077 8504996
Error: No match for error type 'Test', message 'tradefed - adb device lost[4fc7b22]'
Count: 1 (1.92%)
IDs:
rb5-06:
8503371
Error: No match for error type 'Test', message 'Device NOT found after DUT booted up! adb wait-for-device timed out after 300s'
Count: 2 (3.85%)
IDs:
rb5-01:
8503061
rb5-07:
8503351
Error: Device NOT found!
Count: 1 (1.92%)
IDs:
rb5-01:
8501322
Error: No match for error type 'Test', message 'tradefed - adb device lost[74d67c95]'
Count: 1 (1.92%)
IDs:
rb5-03:
8501297
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 594 seconds'
Count: 1 (1.92%)
IDs:
rb5-07:
8501282
Error type: Infrastructure
Error count: 2 (3.85%)
Error: Connection closed
Count: 2 (3.85%)
IDs:
rb5-01:
8503065 8503366
Error type: Job
Error count: 1 (1.92%)
Error: No match for error type 'Job', message 'login-action timed out after 874 seconds'
Count: 1 (1.92%)
IDs:
rb5-03:
8501296
Device type: juno-r2
Total jobs: 3
Total errors: 0 (0.00%)
Device type: dragonboard-845c
Total jobs: 91
Total errors: 24 (26.37%)
Error type: Test
Error count: 23 (25.27%)
Error: No match for error type 'Test', message 'tradefed - adb device lost[a6622a22]'
Count: 7 (7.69%)
IDs:
db845c-09:
8501288 8501379 8503372 8503413 8504370
8504978 8505083
Error: Device NOT found!
Count: 2 (2.20%)
IDs:
db845c-04:
8501289
db845c-09:
8504984
Error: No match for error type 'Test', message 'lava-test-interactive timed out after 600 seconds'
Count: 1 (1.10%)
IDs:
db845c-09:
8504931
Error: No match for error type 'Test', message 'Device NOT found after DUT booted up! adb wait-for-device timed out after 300s'
Count: 3 (3.30%)
IDs:
db845c-06:
8501377
db845c-08:
8501331
db845c-09:
8504628
Error: No match for error type 'Test', message 'tradefed - adb device lost[f3a58ae3]'
Count: 3 (3.30%)
IDs:
db845c-04:
8501380 8502960 8503876
Error: No match for error type 'Test', message 'tradefed - adb device lost[d966d3f5]'
Count: 1 (1.10%)
IDs:
db845c-03:
8503412
Error: No match for error type 'Test', message 'tradefed - adb device lost[dd3b965f]'
Count: 2 (2.20%)
IDs:
db845c-02:
8501290 8503385
Error: No match for error type 'Test', message 'tradefed - adb device lost[476f370a]'
Count: 2 (2.20%)
IDs:
db845c-10:
8501370 8503368
Error: No match for error type 'Test', message 'tradefed - adb device lost[e875976d]'
Count: 1 (1.10%)
IDs:
db845c-06:
8501362
Error: No match for error type 'Test', message 'tradefed - adb device lost[30e1e2ee]'
Count: 1 (1.10%)
IDs:
db845c-08:
8501277
Error type: Job
Error count: 1 (1.10%)
Error: No match for error type 'Job', message 'login-action timed out after 834 seconds'
Count: 1 (1.10%)
IDs:
db845c-03:
8505073
Device type: hi6220-hikey-r2
Total jobs: 4
Total errors: 3 (75.00%)
Error type: Test
Error count: 3 (75.00%)
Error: No match for error type 'Test', message 'The network seems not available, as the ping command failed'
Count: 2 (50.00%)
IDs:
hikey-6220-r2-05:
8505076
hikey-6220-r2-06:
8505078
Error: No match for error type 'Test', message 'tradefed - adb device lost[2047EDF7003CEE68]'
Count: 1 (25.00%)
IDs:
hikey-6220-r2-01:
8505075
Device type: rk3399-rock-pi-4b
Total jobs: 2
Total errors: 0 (0.00%)
Device type: x86
Total jobs: 1
Total errors: 0 (0.00%)
Total jobs: 56
Total errors: 15 (26.79%)
LAVA errors: 1 (1.79%)
Test errors: 0 (0.00%)
Job errors: 5 (8.93%)
Infra errors: 9 (16.07%)
Canceled jobs: 0 (0.00%)
Device type: x15
Total jobs: 31
Total errors: 0 (0.00%)
Device type: beaglebone-black
Total jobs: 25
Total errors: 15 (60.00%)
Error type: Job
Error count: 5 (20.00%)
Error: Invalid job data
Count: 4 (16.00%)
IDs:
beaglebone-black03:
4234499 4234501 4234502 4234503
Error: auto-login action timed out
Count: 1 (4.00%)
IDs:
beaglebone-black03:
4234481
Error type: Infrastructure
Error count: 9 (36.00%)
Error: No match for error type 'Infrastructure', message 'bootloader-commands timed out after 41 seconds'
Count: 3 (12.00%)
IDs:
beaglebone-black03:
4234392 4234406 4234457
Error: No match for error type 'Infrastructure', message 'bootloader-commands timed out after 40 seconds'
Count: 1 (4.00%)
IDs:
beaglebone-black03:
4234434
Error: No match for error type 'Infrastructure', message 'bootloader-commands timed out after 39 seconds'
Count: 2 (8.00%)
IDs:
beaglebone-black03:
4234373 4234430
Error: No match for error type 'Infrastructure', message 'bootloader-commands timed out after 42 seconds'
Count: 2 (8.00%)
IDs:
beaglebone-black03:
4234394 4234407
Error: No match for error type 'Infrastructure', message 'bootloader-commands timed out after 38 seconds'
Count: 1 (4.00%)
IDs:
beaglebone-black03:
4234386
Error type: Bug
Error count: 1 (4.00%)
Error: No match for error type 'Bug', message 'Invalid max_end_time value passed to wait()'
Count: 1 (4.00%)
IDs:
beaglebone-black03:
4234388
Total jobs: 232
Total errors: 79 (34.05%)
LAVA errors: 0 (0.00%)
Test errors: 67 (28.88%)
Job errors: 1 (0.43%)
Infra errors: 11 (4.74%)
Canceled jobs: 0 (0.00%)
Device type: qrb5165-rb5
Total jobs: 99
Total errors: 41 (41.41%)
Error type: Test
Error count: 31 (31.31%)
Error: No match for error type 'Test', message 'tradefed - adb device lost[74d67c95]'
Count: 4 (4.04%)
IDs:
rb5-03:
8495314 8495438 8495468 8498586
Error: No match for error type 'Test', message 'Device NOT found after DUT booted up! adb wait-for-device timed out after 300s'
Count: 10 (10.10%)
IDs:
rb5-01:
8495231 8495392 8495400 8495458 8498583
rb5-07:
8495346 8495415 8495567 8495617 8498585
Error: Device NOT found!
Count: 8 (8.08%)
IDs:
rb5-01:
8495229 8495341 8495349 8495461 8495488
8498532
rb5-07:
8495276 8495566
Error: No match for error type 'Test', message 'tradefed - adb device lost[d8a1879f]'
Count: 1 (1.01%)
IDs:
rb5-07:
8498531
Error: No match for error type 'Test', message 'tradefed - adb device lost[93dcfd96]'
Count: 2 (2.02%)
IDs:
rb5-01:
8495721 8497465
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 283 seconds'
Count: 1 (1.01%)
IDs:
rb5-07:
8495454
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 598 seconds'
Count: 2 (2.02%)
IDs:
rb5-07:
8495332 8495397
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 296 seconds'
Count: 1 (1.01%)
IDs:
rb5-07:
8495393
Error: No match for error type 'Test', message 'tradefed - adb device lost[4fc7b22]'
Count: 1 (1.01%)
IDs:
rb5-06:
8495389
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 589 seconds'
Count: 1 (1.01%)
IDs:
rb5-07:
8495328
Error type: Infrastructure
Error count: 10 (10.10%)
Error: Connection closed
Count: 9 (9.09%)
IDs:
rb5-01:
8495345 8495390 8495395 8495398 8495439
8495542 8495678 8497108 8498483
Error: fastboot-flash-action timed out
Count: 1 (1.01%)
IDs:
rb5-07:
8495334
Device type: dragonboard-845c
Total jobs: 92
Total errors: 20 (21.74%)
Error type: Test
Error count: 18 (19.57%)
Error: No match for error type 'Test', message 'tradefed - adb device lost[a6622a22]'
Count: 3 (3.26%)
IDs:
db845c-09:
8495371 8495428 8498581
Error: No match for error type 'Test', message 'tradefed - adb device lost[d966d3f5]'
Count: 4 (4.35%)
IDs:
db845c-03:
8495373 8495469 8495496 8498526
Error: No match for error type 'Test', message 'Device NOT found after DUT booted up! adb wait-for-device timed out after 300s'
Count: 6 (6.52%)
IDs:
db845c-04:
8495376 8495453 8498474
db845c-06:
8495281
db845c-09:
8495339 8495481
Error: No match for error type 'Test', message 'tradefed - adb device lost[f3a58ae3]'
Count: 2 (2.17%)
IDs:
db845c-04:
8495421 8495430
Error: No match for error type 'Test', message 'tradefed - adb device lost[30e1e2ee]'
Count: 1 (1.09%)
IDs:
db845c-08:
8495353
Error: Device NOT found!
Count: 1 (1.09%)
IDs:
db845c-06:
8495257
Error: No match for error type 'Test', message 'tradefed - adb device lost[e875976d]'
Count: 1 (1.09%)
IDs:
db845c-06:
8495225
Error type: Job
Error count: 1 (1.09%)
Error: No match for error type 'Job', message 'login-action timed out after 687 seconds'
Count: 1 (1.09%)
IDs:
db845c-03:
8495372
Error type: Infrastructure
Error count: 1 (1.09%)
Error: Connection closed
Count: 1 (1.09%)
IDs:
db845c-04:
8495323
Device type: sm8550-hdk
Total jobs: 24
Total errors: 11 (45.83%)
Error type: Test
Error count: 11 (45.83%)
Error: No match for error type 'Test', message 'tradefed - adb device lost[124d1c34]'
Count: 4 (16.67%)
IDs:
sm8550-hdk-01:
8495361 8495472 8495711 8498060
Error: No match for error type 'Test', message 'Device NOT found after DUT booted up! adb wait-for-device timed out after 300s'
Count: 5 (20.83%)
IDs:
sm8550-hdk-01:
8495364 8495609 8495611 8495670 8495671
Error: Device NOT found!
Count: 2 (8.33%)
IDs:
sm8550-hdk-01:
8495413 8495667
Device type: rk3399-rock-pi-4b
Total jobs: 1
Total errors: 0 (0.00%)
Device type: juno-r2
Total jobs: 1
Total errors: 0 (0.00%)
Device type: x86
Total jobs: 3
Total errors: 0 (0.00%)
Device type: hi960-hikey
Total jobs: 12
Total errors: 7 (58.33%)
Error type: Test
Error count: 7 (58.33%)
Error: No match for error type 'Test', message 'Device NOT found after DUT booted up! adb wait-for-device timed out after 300s'
Count: 5 (41.67%)
IDs:
hi960-hikey-01:
8495500
hi960-hikey-02:
8495683 8495712
hi960-hikey-04:
8495529 8495532
Error: Device NOT found!
Count: 1 (8.33%)
IDs:
hi960-hikey-01:
8495498
Error: No match for error type 'Test', message 'tradefed - adb device lost[7A25756801BA7C0B]'
Count: 1 (8.33%)
IDs:
hi960-hikey-02:
8495493
The overcommit test uses sum_total, the sum (memory and swap) to test
the overcommit settings.
This fixes two problems on 32-bit systems. The first is seen with a
integer overflow can occur when calculating sum_total * 2, if the
sum_total is larger than 2GB. The second is limited virtual address
space (2-3GB) means the test can fail from address space exhaustion
before overcommit has been tested.
Now the test runs correctly on low-memory 32-bit systems while avoiding
both the overflow bug and virtual address space issues.
Acked-by: Arnd Bergmann <arnd(a)arndb.de>
Reviewed-by: Petr Vorel <pvorel(a)suse.cz>
Signed-off-by: Ben Copeland <ben.copeland(a)linaro.org>
---
.../kernel/mem/tunable/overcommit_memory.c | 31 ++++++++++++++-----
1 file changed, 24 insertions(+), 7 deletions(-)
diff --git a/testcases/kernel/mem/tunable/overcommit_memory.c b/testcases/kernel/mem/tunable/overcommit_memory.c
index 9b2cb479d..d4faaeee0 100644
--- a/testcases/kernel/mem/tunable/overcommit_memory.c
+++ b/testcases/kernel/mem/tunable/overcommit_memory.c
@@ -131,24 +131,41 @@ static void overcommit_memory_test(void)
TST_SYS_CONF_LONG_SET(OVERCOMMIT_MEMORY, 2, 1);
update_mem_commit();
- alloc_and_check(commit_left * 2, EXPECT_FAIL);
- alloc_and_check(commit_limit + total_batch_size, EXPECT_FAIL);
- update_mem_commit();
- alloc_and_check(commit_left / 2, EXPECT_PASS);
+ /* Skip tests that would overflow or exceed 32-bit address space */
+ if (tst_kernel_bits() == 64 || (unsigned long)commit_left <= TST_GB / TST_KB) {
+ alloc_and_check(commit_left * 2, EXPECT_FAIL);
+ alloc_and_check(commit_limit + total_batch_size, EXPECT_FAIL);
+ update_mem_commit();
+ alloc_and_check(commit_left / 2, EXPECT_PASS);
+ } else {
+ tst_res(TCONF, "Skipping large allocation tests due to address space limits");
+ }
/* start to test overcommit_memory=0 */
TST_SYS_CONF_LONG_SET(OVERCOMMIT_MEMORY, 0, 1);
update_mem();
alloc_and_check(free_total / 2, EXPECT_PASS);
- alloc_and_check(sum_total * 2, EXPECT_FAIL);
+ /* Skip if sum_total * 2 would exceed address space.
+ * On 32-bit, skip when sum_total > ULONG_MAX/4 (~1GB).
+ * Most 32-bit systems with <=1GB RAM can map 2x that in 3GB vaddr space.
+ * Systems with 2GB+ RAM likely cannot fit allocations in vaddr space. */
+ if (tst_kernel_bits() == 64 || (unsigned long)sum_total <= TST_GB / TST_KB) {
+ alloc_and_check(sum_total * 2, EXPECT_FAIL);
+ } else {
+ tst_res(TCONF, "Skipping large allocation test due to address space limits");
+ }
/* start to test overcommit_memory=1 */
TST_SYS_CONF_LONG_SET(OVERCOMMIT_MEMORY, 1, 1);
alloc_and_check(sum_total / 2, EXPECT_PASS);
- alloc_and_check(sum_total, EXPECT_PASS);
- alloc_and_check(sum_total * 2, EXPECT_PASS);
+ if (tst_kernel_bits() == 64 || (unsigned long)sum_total <= TST_GB / TST_KB) {
+ alloc_and_check(sum_total, EXPECT_PASS);
+ alloc_and_check(sum_total * 2, EXPECT_PASS);
+ } else {
+ tst_res(TCONF, "Skipping large allocation tests due to address space limits");
+ }
}
--
2.51.0
The alloc_mem() function is supposed to test out of memory conditions.
How it works is it calls mmap() on a giant chunk of memory.
It's either LENGTH (2GB) or "TESTMEM * 2 + TST_MB" (3GB) bytes.
This mmap() is generally supposed to succeed. Then at the bottom of
the alloc_mem() function when we actually try to use all the memory,
the thread is supposed to die with a SIGKILL.
The problem is that length is signed so on a 32-bit system it will be
negative. That means that at the bottom of the function when we loop
through the memory, the for loop is a no-op and there is no SIGKILL.
Fix this by changing the type to size_t which is unsigned.
Signed-off-by: Ben Copeland <ben.copeland(a)linaro.org>
---
testcases/kernel/mem/oom/oom.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/testcases/kernel/mem/oom/oom.h b/testcases/kernel/mem/oom/oom.h
index 41cc681f9..42ed181b0 100644
--- a/testcases/kernel/mem/oom/oom.h
+++ b/testcases/kernel/mem/oom/oom.h
@@ -62,13 +62,14 @@ static inline void set_global_mempolicy(int mempolicy)
static void set_global_mempolicy(int mempolicy LTP_ATTRIBUTE_UNUSED) { }
#endif
-static int alloc_mem(long int length, int testcase)
+static int alloc_mem(size_t length, int testcase)
{
char *s;
- long i, pagesz = getpagesize();
+ size_t i;
+ long pagesz = getpagesize();
int loop = 10;
- tst_res(TINFO, "thread (%lx), allocating %ld bytes.",
+ tst_res(TINFO, "thread (%lx), allocating %zu bytes.",
(unsigned long) pthread_self(), length);
s = mmap(NULL, length, PROT_READ | PROT_WRITE,
@@ -111,7 +112,7 @@ static void child_alloc(int testcase, int lite, int threads)
pthread_t *th;
if (lite) {
- int ret = alloc_mem(TESTMEM * 2 + TST_MB, testcase);
+ int ret = alloc_mem((size_t)TESTMEM * 2 + TST_MB, testcase);
exit(ret);
}
--
2.51.0
The overcommit test uses sum_total, the sum (memory and swap) to test
the overcommit settings.
This fixes two problems on 32-bit systems. The first is seen with a
integer overflow can occur when calculating sum_total * 2, if the
sum_total is larger than 2GB. The second is limited virtual address
space (2-3GB) means the test can fail from address space exhaustion
before overcommit has been tested.
Now the test runs correctly on low-memory 32-bit systems while avoiding
both the overflow bug and virtual address space issues.
Signed-off-by: Ben Copeland <ben.copeland(a)linaro.org>
Acked-by: Arnd Bergmann <arnd(a)arndb.de>
Reviewed-by: Petr Vorel <pvorel(a)suse.cz>
---
.../kernel/mem/tunable/overcommit_memory.c | 33 +++++++++++++++----
1 file changed, 27 insertions(+), 6 deletions(-)
diff --git a/testcases/kernel/mem/tunable/overcommit_memory.c b/testcases/kernel/mem/tunable/overcommit_memory.c
index 9b2cb479d..7ff5a98d0 100644
--- a/testcases/kernel/mem/tunable/overcommit_memory.c
+++ b/testcases/kernel/mem/tunable/overcommit_memory.c
@@ -131,24 +131,45 @@ static void overcommit_memory_test(void)
TST_SYS_CONF_LONG_SET(OVERCOMMIT_MEMORY, 2, 1);
update_mem_commit();
- alloc_and_check(commit_left * 2, EXPECT_FAIL);
- alloc_and_check(commit_limit + total_batch_size, EXPECT_FAIL);
+ /* Skip tests that would overflow or exceed 32-bit address space */
+ if (tst_kernel_bits() == 64 || (unsigned long)commit_left <= TST_GB / TST_KB) {
+ alloc_and_check(commit_left * 2, EXPECT_FAIL);
+ alloc_and_check(commit_limit + total_batch_size, EXPECT_FAIL);
+ } else {
+ tst_res(TCONF, "Skipping large allocation tests due to address space limits");
+ }
update_mem_commit();
- alloc_and_check(commit_left / 2, EXPECT_PASS);
+ if (tst_kernel_bits() == 64 || (unsigned long)commit_left <= TST_GB / TST_KB) {
+ alloc_and_check(commit_left / 2, EXPECT_PASS);
+ } else {
+ tst_res(TCONF, "Skipping commit_left/2 allocation test due to address space limits");
+ }
/* start to test overcommit_memory=0 */
TST_SYS_CONF_LONG_SET(OVERCOMMIT_MEMORY, 0, 1);
update_mem();
alloc_and_check(free_total / 2, EXPECT_PASS);
- alloc_and_check(sum_total * 2, EXPECT_FAIL);
+ /* Skip if sum_total * 2 would exceed address space.
+ * On 32-bit, skip when sum_total > ULONG_MAX/4 (~1GB).
+ * Most 32-bit systems with <=1GB RAM can map 2x that in 3GB vaddr space.
+ * Systems with 2GB+ RAM likely cannot fit allocations in vaddr space. */
+ if (tst_kernel_bits() == 64 || (unsigned long)sum_total <= TST_GB / TST_KB) {
+ alloc_and_check(sum_total * 2, EXPECT_FAIL);
+ } else {
+ tst_res(TCONF, "Skipping large allocation test due to address space limits");
+ }
/* start to test overcommit_memory=1 */
TST_SYS_CONF_LONG_SET(OVERCOMMIT_MEMORY, 1, 1);
alloc_and_check(sum_total / 2, EXPECT_PASS);
- alloc_and_check(sum_total, EXPECT_PASS);
- alloc_and_check(sum_total * 2, EXPECT_PASS);
+ if (tst_kernel_bits() == 64 || (unsigned long)sum_total <= TST_GB / TST_KB) {
+ alloc_and_check(sum_total, EXPECT_PASS);
+ alloc_and_check(sum_total * 2, EXPECT_PASS);
+ } else {
+ tst_res(TCONF, "Skipping large allocation tests due to address space limits");
+ }
}
--
2.51.0
Total jobs: 265
Total errors: 91 (34.34%)
LAVA errors: 0 (0.00%)
Test errors: 84 (31.70%)
Job errors: 1 (0.38%)
Infra errors: 6 (2.26%)
Canceled jobs: 0 (0.00%)
Device type: dragonboard-845c
Total jobs: 135
Total errors: 35 (25.93%)
Error type: Test
Error count: 35 (25.93%)
Error: Device NOT found!
Count: 3 (2.22%)
IDs:
db845c-04:
8491509 8492682
db845c-06:
8492659
Error: No match for error type 'Test', message 'tradefed - adb device lost[d966d3f5]'
Count: 3 (2.22%)
IDs:
db845c-03:
8491511 8491614 8492669
Error: No match for error type 'Test', message 'tradefed - adb device lost[a6622a22]'
Count: 8 (5.93%)
IDs:
db845c-09:
8491467 8491516 8491536 8491717 8491742
8491771 8491777 8492612
Error: No match for error type 'Test', message 'Device NOT found after DUT booted up! adb wait-for-device timed out after 300s'
Count: 12 (8.89%)
IDs:
db845c-04:
8491543 8491643 8491675 8491728
db845c-06:
8491440 8491593 8491665
db845c-09:
8491352 8491661 8491774 8492566
db845c-10:
8491609
Error: No match for error type 'Test', message 'tradefed - adb device lost[30e1e2ee]'
Count: 1 (0.74%)
IDs:
db845c-08:
8491781
Error: No match for error type 'Test', message 'tradefed - adb device lost[dd3b965f]'
Count: 2 (1.48%)
IDs:
db845c-02:
8491729 8491773
Error: No match for error type 'Test', message 'tradefed - adb device lost[476f370a]'
Count: 3 (2.22%)
IDs:
db845c-10:
8491454 8491469 8491730
Error: No match for error type 'Test', message 'tradefed - adb device lost[f3a58ae3]'
Count: 3 (2.22%)
IDs:
db845c-04:
8491357 8491453 8491510
Device type: qrb5165-rb5
Total jobs: 101
Total errors: 40 (39.60%)
Error type: Test
Error count: 33 (32.67%)
Error: No match for error type 'Test', message 'tradefed - adb device lost[74d67c95]'
Count: 7 (6.93%)
IDs:
rb5-03:
8491459 8491534 8491541 8491568 8491760
8492369 8492681
Error: Device NOT found!
Count: 3 (2.97%)
IDs:
rb5-01:
8491759 8492619 8492673
Error: No match for error type 'Test', message 'tradefed - adb device lost[d8a1879f]'
Count: 3 (2.97%)
IDs:
rb5-07:
8491589 8492387 8492618
Error: No match for error type 'Test', message 'tradefed - adb device lost[93dcfd96]'
Count: 1 (0.99%)
IDs:
rb5-01:
8492407
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 298 seconds'
Count: 1 (0.99%)
IDs:
rb5-07:
8491923
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 296 seconds'
Count: 1 (0.99%)
IDs:
rb5-03:
8491755
Error: No match for error type 'Test', message 'Device NOT found after DUT booted up! adb wait-for-device timed out after 300s'
Count: 13 (12.87%)
IDs:
rb5-01:
8491458 8491462 8491526 8491527 8491613
8491624 8491698
rb5-07:
8491476 8491525 8491538 8491580 8491725
8491737
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 898 seconds'
Count: 1 (0.99%)
IDs:
rb5-01:
8491724
Error: No match for error type 'Test', message 'tradefed - adb device lost[4fc7b22]'
Count: 3 (2.97%)
IDs:
rb5-06:
8491524 8491544 8491555
Error type: Infrastructure
Error count: 6 (5.94%)
Error: Connection closed
Count: 6 (5.94%)
IDs:
rb5-01:
8491461 8491475 8491523 8491573 8491697
8492570
Error type: Job
Error count: 1 (0.99%)
Error: No match for error type 'Job', message 'login-action timed out after 873 seconds'
Count: 1 (0.99%)
IDs:
rb5-01:
8491722
Device type: sm8550-hdk
Total jobs: 18
Total errors: 8 (44.44%)
Error type: Test
Error count: 8 (44.44%)
Error: No match for error type 'Test', message 'tradefed - adb device lost[124d1c34]'
Count: 2 (11.11%)
IDs:
sm8550-hdk-01:
8491748 8492379
Error: No match for error type 'Test', message 'Device NOT found after DUT booted up! adb wait-for-device timed out after 300s'
Count: 5 (27.78%)
IDs:
sm8550-hdk-01:
8491479 8491654 8491657 8491744 8491746
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 28798 seconds'
Count: 1 (5.56%)
IDs:
sm8550-hdk-01:
8491482
Device type: x86
Total jobs: 1
Total errors: 0 (0.00%)
Device type: hi6220-hikey-r2
Total jobs: 9
Total errors: 8 (88.89%)
Error type: Test
Error count: 8 (88.89%)
Error: No match for error type 'Test', message 'tradefed - adb device lost[8D6E5F00030E051]'
Count: 2 (22.22%)
IDs:
hikey-6220-r2-02:
8491548 8491797
Error: No match for error type 'Test', message 'tradefed - adb device lost[4595FE84003F72FC]'
Count: 2 (22.22%)
IDs:
hikey-6220-r2-04:
8491578 8491796
Error: No match for error type 'Test', message 'The network seems not available, as the ping command failed'
Count: 1 (11.11%)
IDs:
hikey-6220-r2-01:
8491711
Error: No match for error type 'Test', message 'Device NOT found after DUT booted up! adb wait-for-device timed out after 300s'
Count: 2 (22.22%)
IDs:
hikey-6220-r2-03:
8491710
hikey-6220-r2-05:
8491681
Error: No match for error type 'Test', message 'tradefed - adb device lost[235D989C003B0752]'
Count: 1 (11.11%)
IDs:
hikey-6220-r2-03:
8491503
Device type: dragonboard-410c
Total jobs: 1
Total errors: 0 (0.00%)
Total jobs: 116
Total errors: 44 (37.93%)
LAVA errors: 0 (0.00%)
Test errors: 40 (34.48%)
Job errors: 1 (0.86%)
Infra errors: 3 (2.59%)
Canceled jobs: 0 (0.00%)
Device type: dragonboard-845c
Total jobs: 52
Total errors: 20 (38.46%)
Error type: Test
Error count: 20 (38.46%)
Error: No match for error type 'Test', message 'tradefed - adb device lost[a6622a22]'
Count: 7 (13.46%)
IDs:
db845c-09:
8489738 8490446 8491204 8491283 8491336
8491377 8491502
Error: No match for error type 'Test', message 'Device NOT found after DUT booted up! adb wait-for-device timed out after 300s'
Count: 8 (15.38%)
IDs:
db845c-04:
8489308 8489698 8491346
db845c-06:
8489085 8489125
db845c-09:
8491486 8491489
db845c-10:
8489090
Error: No match for error type 'Test', message 'tradefed - adb device lost[f3a58ae3]'
Count: 3 (5.77%)
IDs:
db845c-04:
8489127 8490767 8491485
Error: No match for error type 'Test', message 'tradefed - adb device lost[30e1e2ee]'
Count: 1 (1.92%)
IDs:
db845c-08:
8489123
Error: No match for error type 'Test', message 'tradefed - adb device lost[d966d3f5]'
Count: 1 (1.92%)
IDs:
db845c-03:
8489073
Device type: qrb5165-rb5
Total jobs: 42
Total errors: 15 (35.71%)
Error type: Test
Error count: 13 (30.95%)
Error: No match for error type 'Test', message 'tradefed - adb device lost[74d67c95]'
Count: 1 (2.38%)
IDs:
rb5-03:
8491491
Error: No match for error type 'Test', message 'Device NOT found after DUT booted up! adb wait-for-device timed out after 300s'
Count: 7 (16.67%)
IDs:
rb5-01:
8491360 8491431
rb5-05:
8491356
rb5-07:
8489317 8489333 8491362 8491382
Error: Device NOT found!
Count: 5 (11.90%)
IDs:
rb5-01:
8489320 8491428
rb5-05:
8489722
rb5-07:
8491361 8491430
Error type: Infrastructure
Error count: 2 (4.76%)
Error: No match for error type 'Infrastructure', message 'wait-device-boardid timed out after 1173 seconds'
Count: 1 (2.38%)
IDs:
rb5-05:
8491390
Error: Connection closed
Count: 1 (2.38%)
IDs:
rb5-01:
8489318
Device type: hi6220-hikey-r2
Total jobs: 6
Total errors: 6 (100.00%)
Error type: Test
Error count: 5 (83.33%)
Error: No match for error type 'Test', message 'tradefed - adb device lost[191FC75C003312EE]'
Count: 1 (16.67%)
IDs:
hikey-6220-r2-06:
8491409
Error: No match for error type 'Test', message 'tradefed - adb device lost[235D989C003B0752]'
Count: 1 (16.67%)
IDs:
hikey-6220-r2-03:
8491294
Error: No match for error type 'Test', message 'tradefed - adb device lost[8D6E5F00030E051]'
Count: 1 (16.67%)
IDs:
hikey-6220-r2-02:
8489737
Error: No match for error type 'Test', message 'Device NOT found after DUT booted up! adb wait-for-device timed out after 300s'
Count: 1 (16.67%)
IDs:
hikey-6220-r2-06:
8489726
Error: No match for error type 'Test', message 'The network seems not available, as the ping command failed'
Count: 1 (16.67%)
IDs:
hikey-6220-r2-06:
8489699
Error type: Infrastructure
Error count: 1 (16.67%)
Error: No match for error type 'Infrastructure', message 'wait-device-boardid timed out after 888 seconds'
Count: 1 (16.67%)
IDs:
hikey-6220-r2-06:
8489119
Device type: hi960-hikey
Total jobs: 7
Total errors: 1 (14.29%)
Error type: Job
Error count: 1 (14.29%)
Error: No match for error type 'Job', message 'download-postprocess-docker timed out after 4187 seconds'
Count: 1 (14.29%)
IDs:
hi960-hikey-02:
8489719
Device type: sm8550-hdk
Total jobs: 6
Total errors: 2 (33.33%)
Error type: Test
Error count: 2 (33.33%)
Error: No match for error type 'Test', message 'Device NOT found after DUT booted up! adb wait-for-device timed out after 300s'
Count: 2 (33.33%)
IDs:
sm8550-hdk-01:
8491366 8491367
Device type: rk3399-rock-pi-4b
Total jobs: 1
Total errors: 0 (0.00%)
Device type: juno-r2
Total jobs: 2
Total errors: 0 (0.00%)
The overcommit test uses sum_total, the sum (memory and swap) to test
the overcommit settings.
This fixes two problems on 32-bit systems. The first is seen with a
integer overflow can occur when calculating sum_total * 2, if the
sum_total is larger than 2GB. The second is limited virtual address
space (2-3GB) means the test can fail from address space exhaustion
before overcommit has been tested.
Now the test runs correctly on low-memory 32-bit systems while avoiding
both the overflow bug and virtual address space issues.
Signed-off-by: Ben Copeland <ben.copeland(a)linaro.org>
---
.../kernel/mem/tunable/overcommit_memory.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/testcases/kernel/mem/tunable/overcommit_memory.c b/testcases/kernel/mem/tunable/overcommit_memory.c
index 9b2cb479d..f9f60ebc3 100644
--- a/testcases/kernel/mem/tunable/overcommit_memory.c
+++ b/testcases/kernel/mem/tunable/overcommit_memory.c
@@ -68,6 +68,7 @@
#define DEFAULT_OVER_RATIO 50L
#define EXPECT_PASS 0
#define EXPECT_FAIL 1
+#define ONE_GB (1024 * 1024 * TST_KB)
#define OVERCOMMIT_MEMORY "/proc/sys/vm/overcommit_memory"
#define OVERCOMMIT_RATIO "/proc/sys/vm/overcommit_ratio"
@@ -141,14 +142,26 @@ static void overcommit_memory_test(void)
update_mem();
alloc_and_check(free_total / 2, EXPECT_PASS);
- alloc_and_check(sum_total * 2, EXPECT_FAIL);
+ /* Skip if sum_total * 2 would exceed address space.
+ * On 32-bit, skip when sum_total > ULONG_MAX/4 (~1GB).
+ * Most 32-bit systems with <=1GB RAM can map 2x that in 3GB vaddr space.
+ * Systems with 2GB+ RAM likely cannot fit allocations in vaddr space. */
+ if (tst_kernel_bits() == 64 || (unsigned long)sum_total <= ONE_GB) {
+ alloc_and_check(sum_total * 2, EXPECT_FAIL);
+ } else {
+ tst_res(TCONF, "Skipping large allocation test due to address space limits");
+ }
/* start to test overcommit_memory=1 */
TST_SYS_CONF_LONG_SET(OVERCOMMIT_MEMORY, 1, 1);
alloc_and_check(sum_total / 2, EXPECT_PASS);
- alloc_and_check(sum_total, EXPECT_PASS);
- alloc_and_check(sum_total * 2, EXPECT_PASS);
+ if (tst_kernel_bits() == 64 || (unsigned long)sum_total <= ONE_GB) {
+ alloc_and_check(sum_total, EXPECT_PASS);
+ alloc_and_check(sum_total * 2, EXPECT_PASS);
+ } else {
+ tst_res(TCONF, "Skipping large allocation tests due to address space limits");
+ }
}
--
2.51.0
Total jobs: 75
Total errors: 36 (48.00%)
LAVA errors: 0 (0.00%)
Test errors: 36 (48.00%)
Job errors: 0 (0.00%)
Infra errors: 0 (0.00%)
Canceled jobs: 0 (0.00%)
Device type: hi6220-hikey-r2
Total jobs: 3
Total errors: 3 (100.00%)
Error type: Test
Error count: 3 (100.00%)
Error: No match for error type 'Test', message 'Device NOT found after DUT booted up! adb wait-for-device timed out after 300s'
Count: 1 (33.33%)
IDs:
hikey-6220-r2-02:
8489118
Error: No match for error type 'Test', message 'The network seems not available, as the ping command failed'
Count: 1 (33.33%)
IDs:
hikey-6220-r2-01:
8489114
Error: No match for error type 'Test', message 'tradefed - adb device lost[4595FE84003F72FC]'
Count: 1 (33.33%)
IDs:
hikey-6220-r2-04:
8489101
Device type: hi960-hikey
Total jobs: 6
Total errors: 4 (66.67%)
Error type: Test
Error count: 4 (66.67%)
Error: No match for error type 'Test', message 'lava-test-interactive timed out after 600 seconds'
Count: 3 (50.00%)
IDs:
hi960-hikey-01:
8489109
hi960-hikey-02:
8489106 8489111
Error: No match for error type 'Test', message 'tradefed - adb device lost[7A25756801BA7C0B]'
Count: 1 (16.67%)
IDs:
hi960-hikey-02:
8489065
Device type: dragonboard-845c
Total jobs: 50
Total errors: 26 (52.00%)
Error type: Test
Error count: 26 (52.00%)
Error: Device NOT found!
Count: 1 (2.00%)
IDs:
db845c-04:
8489110
Error: No match for error type 'Test', message 'Device NOT found after DUT booted up! adb wait-for-device timed out after 300s'
Count: 6 (12.00%)
IDs:
db845c-04:
8488134 8489104
db845c-06:
8481201
db845c-09:
8487858 8487860 8489061
Error: No match for error type 'Test', message 'tradefed - adb device lost[a6622a22]'
Count: 6 (12.00%)
IDs:
db845c-09:
8481199 8487861 8488126 8488173 8489069
8489076
Error: No match for error type 'Test', message 'tradefed - adb device lost[dd3b965f]'
Count: 3 (6.00%)
IDs:
db845c-02:
8481200 8482798 8489062
Error: No match for error type 'Test', message 'lava-test-interactive timed out after 600 seconds'
Count: 1 (2.00%)
IDs:
db845c-04:
8489060
Error: No match for error type 'Test', message 'tradefed - adb device lost[d966d3f5]'
Count: 2 (4.00%)
IDs:
db845c-03:
8487859 8488231
Error: No match for error type 'Test', message 'tradefed - adb device lost[f3a58ae3]'
Count: 3 (6.00%)
IDs:
db845c-04:
8483791 8487855 8488219
Error: No match for error type 'Test', message 'tradefed - adb device lost[30e1e2ee]'
Count: 2 (4.00%)
IDs:
db845c-08:
8487847 8488177
Error: No match for error type 'Test', message 'tradefed - adb device lost[476f370a]'
Count: 1 (2.00%)
IDs:
db845c-10:
8487849
Error: No match for error type 'Test', message 'tradefed - adb device lost[e875976d]'
Count: 1 (2.00%)
IDs:
db845c-06:
8482829
Device type: qrb5165-rb5
Total jobs: 16
Total errors: 3 (18.75%)
Error type: Test
Error count: 3 (18.75%)
Error: No match for error type 'Test', message 'tradefed - adb device lost[4fc7b22]'
Count: 1 (6.25%)
IDs:
rb5-06:
8488155
Error: No match for error type 'Test', message 'tradefed - adb device lost[f11b68eb]'
Count: 1 (6.25%)
IDs:
rb5-05:
8488151
Error: No match for error type 'Test', message 'Device NOT found after DUT booted up! adb wait-for-device timed out after 300s'
Count: 1 (6.25%)
IDs:
rb5-06:
8488149