xref: /aosp_15_r20/external/ltp/testcases/kernel/controllers/freezer/TODO (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1*49cdfc7eSAndroid Build Coastguard WorkerAdd Makefile rules to:
2*49cdfc7eSAndroid Build Coastguard Worker	install freeze_*.sh scripts someplace?
3*49cdfc7eSAndroid Build Coastguard Worker
4*49cdfc7eSAndroid Build Coastguard WorkerGenerate sample results
5*49cdfc7eSAndroid Build Coastguard Worker	Post these appropriately along with patch adding tests to LTP
6*49cdfc7eSAndroid Build Coastguard Worker
7*49cdfc7eSAndroid Build Coastguard WorkerGenerate patch adding these tests to the controllers (cgroup) suite
8*49cdfc7eSAndroid Build Coastguard Worker	NOTE: How to clearly represent dependency of containers test
9*49cdfc7eSAndroid Build Coastguard Worker		suite on the controllers suite once this is done?
10*49cdfc7eSAndroid Build Coastguard Worker		Do nothing?
11*49cdfc7eSAndroid Build Coastguard Worker
12*49cdfc7eSAndroid Build Coastguard WorkerWrite new test scripts using Cedric's fork_exec_loop.c test.
13*49cdfc7eSAndroid Build Coastguard Worker
14*49cdfc7eSAndroid Build Coastguard WorkerAdd assert_sample_proc_died to lib.sh and call it from freeze_{sleep|kill}_thaw.sh
15*49cdfc7eSAndroid Build Coastguard Worker
16*49cdfc7eSAndroid Build Coastguard WorkerChange all of the:
17*49cdfc7eSAndroid Build Coastguard Worker	echo "ERROR: ..."
18*49cdfc7eSAndroid Build Coastguard Worker	echo "INFO: ..."
19*49cdfc7eSAndroid Build Coastguard Worker	echo "WARNING: ..."
20*49cdfc7eSAndroid Build Coastguard Worker	(NOTE: some of these give options to the echo cmd)
21*49cdfc7eSAndroid Build Coastguard Workerlines to use appropriate LTP API commands. This also entails replacing these
22*49cdfc7eSAndroid Build Coastguard Workerwith appropriate LTP API usage:
23*49cdfc7eSAndroid Build Coastguard Worker
24*49cdfc7eSAndroid Build Coastguard Worker./libcgroup_subsys:828:	assert_cgroup_freezer_state "FROZEN" "ERROR: failed to freeze cgroup"
25*49cdfc7eSAndroid Build Coastguard Worker./libcgroup_subsys:846:	assert_cgroup_freezer_state "THAWED" "ERROR: Failed to thaw cgroup."
26*49cdfc7eSAndroid Build Coastguard Worker./freezer/freeze_move_thaw.sh:22:			"ERROR: cgroup freezer started in non-THAWED state"
27*49cdfc7eSAndroid Build Coastguard Worker./freezer/freeze_cancel.sh:18:			"ERROR: cgroup freezer started in non-THAWED state"
28*49cdfc7eSAndroid Build Coastguard Worker./freezer/prereq.sh:10:tst_resm TINFO " It's ok if there's an ERROR before the next INFO."
29*49cdfc7eSAndroid Build Coastguard Worker./freezer/prereq.sh:12:tst_resm TINFO " OK, resume worrying about ERRORS."
30*49cdfc7eSAndroid Build Coastguard Worker./freezer/freeze_self_thaw.sh:31:		"ERROR: cgroup freezer started in non-THAWED state" && {
31*49cdfc7eSAndroid Build Coastguard Worker./freezer/freeze_thaw.sh:17:			"ERROR: cgroup freezer started in non-THAWED state"
32*49cdfc7eSAndroid Build Coastguard Worker./freezer/stop_freeze_thaw_cont.sh:18:			"ERROR: cgroup freezer started in non-THAWED state"
33*49cdfc7eSAndroid Build Coastguard Worker./freezer/freeze_write_freezing.sh:16:			"ERROR: cgroup freezer started in non-THAWED state"
34*49cdfc7eSAndroid Build Coastguard Worker./freezer/freeze_write_freezing.sh:21:	assert_cgroup_freezer_state "FROZEN" "ERROR: writing FREEZING to freezer.state should not change freezer state from FROZEN (expected IO error)"
35*49cdfc7eSAndroid Build Coastguard Worker./freezer/stop_freeze_sleep_thaw_cont.sh:18:			"ERROR: cgroup freezer started in non-THAWED state"
36*49cdfc7eSAndroid Build Coastguard Worker./freezer/TODO:3:		echo "ERROR: ..."
37*49cdfc7eSAndroid Build Coastguard Worker./freezer/freeze_sleep_thaw.sh:21:			"ERROR: cgroup freezer started in non-THAWED state"
38*49cdfc7eSAndroid Build Coastguard Worker./freezer/vfork_freeze.sh:10:	echo "ERROR: Failed to build vfork test binary." 1>&2
39*49cdfc7eSAndroid Build Coastguard Worker./freezer/vfork_freeze.sh:36:		"ERROR: cgroup freezer started in non-THAWED state" && {
40*49cdfc7eSAndroid Build Coastguard Worker./freezer/freeze_kill_thaw.sh:19:			"ERROR: cgroup freezer started in non-THAWED state"
41*49cdfc7eSAndroid Build Coastguard Worker./freezer/vfork.c:37:perror("ERROR at " __FILE__ ":" str_expand(__LINE__) ": " s )
42*49cdfc7eSAndroid Build Coastguard Worker./freezer/write_freezing.sh:16:			"ERROR: cgroup freezer started in non-THAWED state"
43*49cdfc7eSAndroid Build Coastguard Worker./freezer/write_freezing.sh:19:	assert_cgroup_freezer_state "THAWED" "ERROR: writing FREEZING to freezer.state should not change freezer state (expected IO error)"
44*49cdfc7eSAndroid Build Coastguard WorkerBinary file ./freezer/vfork matches
45*49cdfc7eSAndroid Build Coastguard Worker./testskel.c:53:		exit(EXIT_FAILURE);
46*49cdfc7eSAndroid Build Coastguard Worker./testskel.c:61:			exit(EXIT_FAILURE);
47*49cdfc7eSAndroid Build Coastguard Worker./freezer/vfork.c:58:			exit(EXIT_FAILURE);
48*49cdfc7eSAndroid Build Coastguard Worker./freezer/vfork.c:180:				exit(EXIT_FAILURE);
49*49cdfc7eSAndroid Build Coastguard Worker./freezer/vfork.c:186:			exit(EXIT_FAILURE);
50*49cdfc7eSAndroid Build Coastguard Worker./freezer/vfork.c:268:			exit(EXIT_FAILURE);
51*49cdfc7eSAndroid Build Coastguard Worker./freezer/vfork.c:287:			exit(EXIT_FAILURE);
52*49cdfc7eSAndroid Build Coastguard Worker./freezer/vfork.c:300:		exit(EXIT_FAILURE);
53*49cdfc7eSAndroid Build Coastguard Worker./freezer/vfork.c:306:		exit(EXIT_FAILURE);
54*49cdfc7eSAndroid Build Coastguard Worker./freezer/vfork.c:323:			exit(EXIT_FAILURE);
55*49cdfc7eSAndroid Build Coastguard Worker./freezer/vfork.c:327:			exit(EXIT_FAILURE);
56*49cdfc7eSAndroid Build Coastguard Worker./signal/prereq.sh:9:tst_resm TINFO " It's ok if there's an ERROR before the next INFO."
57*49cdfc7eSAndroid Build Coastguard Worker./signal/stop_kill.sh:21:	echo -n "INFO: Killing $sample_proc ..."
58*49cdfc7eSAndroid Build Coastguard Worker./signal/TODO:4:		echo "INFO: ..."
59*49cdfc7eSAndroid Build Coastguard Worker./signal/kill.sh:20:	echo -n "INFO: Killing $sample_proc ..."
60*49cdfc7eSAndroid Build Coastguard Worker./signal/stop_sleep_cont.sh:26:	echo -n "INFO: Waiting until sleep command should have finished ($sample_proc) ... "
61*49cdfc7eSAndroid Build Coastguard Worker./libcgroup_subsys:57:		tst_resm INFO "Failed to mount cgroup filesystem with ${cgroup_subsys} subsystem."
62*49cdfc7eSAndroid Build Coastguard Worker./freezer/prereq.sh:10:tst_resm TINFO " It's ok if there's an ERROR before the next INFO."
63*49cdfc7eSAndroid Build Coastguard Worker./freezer/stop_freeze_sleep_thaw_cont.sh:30:	echo -n "INFO: Waiting until sleep command should have finished ($sample_proc) ... "
64*49cdfc7eSAndroid Build Coastguard Worker./freezer/TODO:4:		echo "INFO: ..."
65*49cdfc7eSAndroid Build Coastguard Worker./freezer/freeze_sleep_thaw.sh:26:	echo -n "INFO: Waiting until sleep command should have finished ($sample_proc) ... "
66*49cdfc7eSAndroid Build Coastguard Worker./freezer/freeze_kill_thaw.sh:29:	echo -n "INFO: Killing $sample_proc ..."
67*49cdfc7eSAndroid Build Coastguard Worker./freezer/vfork.c:95:	if (ptrace(PTRACE_GETSIGINFO, child, NULL, &info) == -1) {
68*49cdfc7eSAndroid Build Coastguard Worker./freezer/vfork.c:202:	if (ptrace(PTRACE_GETSIGINFO, gchild, NULL, &info) == -1) {
69*49cdfc7eSAndroid Build Coastguard Worker	Port vfork.c and fork_exec_loop.c to use LTP APIs where appropriate?
70*49cdfc7eSAndroid Build Coastguard Worker
71*49cdfc7eSAndroid Build Coastguard Worker	Write a test using two sample cgroups (A and B). Freeze A. Move tasks
72*49cdfc7eSAndroid Build Coastguard Worker		from A to B. Make sure the state of the moved task is concistent
73*49cdfc7eSAndroid Build Coastguard Worker		with the state of the B group. Make sure it's possible to unfreeze
74*49cdfc7eSAndroid Build Coastguard Worker		the moved tasks in a "user-friendly" way.
75*49cdfc7eSAndroid Build Coastguard Worker
76*49cdfc7eSAndroid Build Coastguard WorkerWrite new test scripts using Cedric's fork_exec_loop.c test.
77*49cdfc7eSAndroid Build Coastguard Worker
78*49cdfc7eSAndroid Build Coastguard Workerfreeze_cancel.sh isn't guaranteed to try to thaw the cgroup while the cgroup is
79*49cdfc7eSAndroid Build Coastguard Worker	in the freezing state. It might be nice to find a way to guarantee that
80*49cdfc7eSAndroid Build Coastguard Worker	otherwise we aren't guaranteed to test the ability to cancel freezing.
81*49cdfc7eSAndroid Build Coastguard Worker
82*49cdfc7eSAndroid Build Coastguard Workerfreeze_self_thaw.sh might have a race between starting 'exec sleep $sample_sleep' and killing the process. This would result in being unable to remove the "child" cgroup which in turn might cause subsequent tests to fail.
83*49cdfc7eSAndroid Build Coastguard Worker
84*49cdfc7eSAndroid Build Coastguard WorkerMake use of TMPDIR and mktemp for tmp.txt in vfork_freeze.sh
85