Open sbertramrh opened 1 year ago
Have you tried to to let tmt to run the test through choom
? I mean to use test: choom -n -1000 runtest.sh
in the main.fmf?
I'm not sure wether tmt uses some other intermediate script so that might be needed to be set for that as well or by the tmt itself.
Have you tried to to let tmt to run the test through
choom
? I mean to usetest: choom -n -1000 runtest.sh
in the main.fmf? I'm not sure wether tmt uses some other intermediate script so that might be needed to be set for that as well or by the tmt itself.
Tried it and same result.
I wonder what magic Restraint does to prevent this. It should be possible to include it in tmt, sure.
this [1] is probably more important but I'm not sure how to achieve that with simple ssh command execution
@sbertramrh Is that oomtest.c something which can be shared (to play with...)?
Let's try to add this to our guest setup playbooks, i.e. adjust OOM score for sshd running on the test machine.\
Seems to me like a reasonable request.
@sbertramrh Is that oomtest.c something which can be shared (to play with...)?
Shared privately via email.
@lukaszachy during recent CTC for automotive this runs as expected on the device under test and does not suddenly end the test as shown above. Will try and narrow done circumstances when this happens and add more info. Still using the same version of tmt when i found this issue, tmt version: 1.20.0 (fb222fc).
14:32:41 out: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::^M
14:32:41 out: :: Setup^M
14:32:41 out: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::^M
14:32:41 out: ^M
14:32:41 out: :: [ 10:32:41 ] :: [ BEGIN ] :: Running 'dmesg -c > /dev/null'^M
14:32:41 out: :: [ 10:32:41 ] :: [ PASS ] :: Command 'dmesg -c > /dev/null' (Expected 0, got 0)^M
14:32:41 out: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::^M
14:32:41 out: :: Duration: 0s^M
14:32:41 out: :: Assertions: 1 good, 0 bad^M
14:32:41 out: :: RESULT: PASS (Setup)^M
14:32:41 out: ^M
14:32:41 out: ^M
14:32:41 out: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::^M
14:32:41 out: :: Test^M
14:32:41 out: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::^M
14:32:41 out: ^M
14:32:41 out: :: [ 10:32:41 ] :: [ BEGIN ] :: Running 'gcc -o oomtest oomtest.c'^M
14:32:41 out: oomtest.c:59:1: warning: return type defaults to ‘int’ [-Wimplicit-int]^M
14:32:41 out: 59 | oom_adj(int adj){^M
14:32:41 out: | ^~~~~~~^M
14:32:41 out: :: [ 10:32:41 ] :: [ PASS ] :: Command 'gcc -o oomtest oomtest.c' (Expected 0, got 0)^M
14:32:41 out: :: [ 10:32:41 ] :: [ BEGIN ] :: Running oom triggerring program :: actually running './oomtest'^M
14:32:41 out: oomtest[11198]: 0 oomtest lead started, requesting 0, total 0^M
14:32:41 out: oomtest[11199]: 1 fork_child started, requesting 1314324480, total 1314324480^M
14:32:42 out: oomtest[11200]: 2 mempress started, requesting 657162240, total 1971486720^M
14:32:42 out: oomtest[11201]: 3 mempress started, requesting 657162240, total 2628648960^M
...
14:32:50 out: oomtest[11218]: 20 mempress started, requesting 657162240, total 13800407040^M
14:32:51 out: oomtest[11219]: 21 mempress started, requesting 657162240, total 14457569280^M
14:32:51 out: oomtest[11198]: 11219 ended with sig 9^M
14:32:51 out: oomtest[11198]: killpg 11199^M
14:32:51 out: oomtest[11198]: oomtest PASSED^M
14:32:52 out: :: [ 10:32:51 ] :: [ PASS ] :: Running oom triggerring program (Expected 0, got 0)^M
14:32:52 out: :: [ 10:32:52 ] :: [ BEGIN ] :: we shold see UID in dmesg :: actually running 'dmesg | grep 'Killed process' | grep UID'^M
14:32:52 out: [ 250.323878] Out of memory (oom_kill_allocating_task): Killed process 11219 (oomtest) total-vm:643968kB, anon-rss:614812kB, file-rss:1112kB, shmem-rss:0kB, UID:0 pgtables:1232kB oom_score_adj:588^M
14:32:52 out: :: [ 10:32:52 ] :: [ PASS ] :: we shold see UID in dmesg (Expected 0, got 0)^M
Current logged results when run through tmt:
When executed through beaker, same box as above:
Is it possible to wrap, trap, or protect the shell as beaker does to allow the test to run to the end?