]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
ftests: cleanup return statements
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Mon, 10 Apr 2023 12:40:02 +0000 (18:10 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Tue, 11 Apr 2023 20:50:57 +0000 (14:50 -0600)
commit3f5df4247d9dfd7baebbfa8988bf8b6949736956
treeb0aa18b8b71725e46f3b2be53c04103dcf3f3b8c
parent8737edf88c98023af58f7013e53386f4c0b05c9b
ftests: cleanup return statements

This patch cleans up a few oddities around return statements:
1. Removes redundant return statements across the ftests/*, mostly in
   the function prereqs and a few other places too.
2. Follows the same function template for prereqs, across the ftests/*.,
   and removes the checks for success on return from prereqs function,
   those will be true always.
3. Also, replace consts.TEST_PASSED, None with pass for functions, that
   serves as stub and remove the return value checks for stubs.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
(cherry picked from commit 0c65a402990d8657637b10bb4ae02f99ae575082)
55 files changed:
tests/ftests/002-cgdelete-recursive_delete.py
tests/ftests/004-cgsnapshot-basic_snapshot_v1.py
tests/ftests/006-cgrules-basic_cgrules_v1.py
tests/ftests/007-cgrules-basic_cgrules_v2.py
tests/ftests/008-cgget-multiple_r_flags.py
tests/ftests/009-cgget-g_flag_controller_only.py
tests/ftests/010-cgget-g_flag_controller_and_cgroup.py
tests/ftests/011-cgget-r_flag_two_cgroups.py
tests/ftests/012-cgget-multiple_r_flags2.py
tests/ftests/013-cgget-multiple_g_flags.py
tests/ftests/014-cgget-a_flag.py
tests/ftests/015-cgget-multiline_r_flag.py
tests/ftests/016-cgget-invalid_options.py
tests/ftests/017-cgconfig-load_file.py
tests/ftests/018-cgconfig-load_dir.py
tests/ftests/019-cgconfig-uidgid_dperm_fperm.py
tests/ftests/020-cgconfig-tasks_perms_owner.py
tests/ftests/021-cgconfig-invalid_options.py
tests/ftests/022-cgset-multiple_r_flag.py
tests/ftests/023-cgset-copy_from.py
tests/ftests/025-cgset-multiple_cgroups.py
tests/ftests/026-cgset-multiple_r_multiple_cgroup.py
tests/ftests/027-cgset-invalid_options.py
tests/ftests/029-lssubsys-basic_lssubsys.py
tests/ftests/030-lssubsys-lssubsys_all.py
tests/ftests/031-lscgroup-g_flag.py
tests/ftests/032-lscgroup-multiple_g_flags.py
tests/ftests/033-cgget-no_flags.py
tests/ftests/034-cgexec-basic_cgexec.py
tests/ftests/035-cgset-set_cgroup_type.py
tests/ftests/036-cgset-multi_thread.py
tests/ftests/037-cgxget-cpu_settings.py
tests/ftests/038-cgxget-cpuset_settings.py
tests/ftests/039-pybindings-cgxget.py
tests/ftests/040-pybindings-cgxset.py
tests/ftests/041-pybindings-library_version.py
tests/ftests/042-cgxget-unmappable.py
tests/ftests/043-cgcreate-empty_controller.py
tests/ftests/045-pybindings-list_mount_points.py
tests/ftests/047-cgcreate-delete_cgrp_shared_mnt.py
tests/ftests/048-pybindings-get_cgroup_mode.py
tests/ftests/049-sudo-systemd_create_scope.py
tests/ftests/050-sudo-systemd_create_scope_w_pid.py
tests/ftests/051-sudo-cgroup_get_cgroup.py
tests/ftests/052-sudo-cgroup_attach_task.py
tests/ftests/053-sudo-cgroup_attach_task_pid.py
tests/ftests/054-sudo-set_uid_gid_v2.py
tests/ftests/055-sudo-set_uid_gid_v1.py
tests/ftests/056-sudo-set_permissions_v2.py
tests/ftests/057-sudo-set_permissions_v1.py
tests/ftests/058-sudo-systemd_create_scope2.py
tests/ftests/059-sudo-invalid_systemd_create_scope2.py
tests/ftests/060-sudo-cgconfigparser-systemd.py
tests/ftests/072-pybindings-cgroup_get_cgroup.py
tests/ftests/999-stress-cgroup_init.py