1f08c3bdfSopenharmony_ci============================================================== 2f08c3bdfSopenharmony_ciTest Suite for the Control Group Freezer and Signal Subsystems 3f08c3bdfSopenharmony_ci============================================================== 4f08c3bdfSopenharmony_ciAuthor: Matt Helsley 5f08c3bdfSopenharmony_ciDate: June, 2008 6f08c3bdfSopenharmony_ciLast update: January 19th, 2009 7f08c3bdfSopenharmony_ci 8f08c3bdfSopenharmony_ciAbout: 9f08c3bdfSopenharmony_ci------ 10f08c3bdfSopenharmony_ciThese tests exercise the freezer and signal subsystems (aka controllers) 11f08c3bdfSopenharmony_ciavailable since kernel 2.6.28 or later. 12f08c3bdfSopenharmony_ci 13f08c3bdfSopenharmony_ciThese tests exercise the freezer control group controller. This controller is 14f08c3bdfSopenharmony_cia useful for implementing container checkpointing or if you wish to gradually 15f08c3bdfSopenharmony_cifreeze tasks in cgroups before doing a suspend. 16f08c3bdfSopenharmony_ci 17f08c3bdfSopenharmony_ciThe common case is embodied in the freeze_thaw.sh test file. However, 18f08c3bdfSopenharmony_cithe scripts are also designed to test a few obscure cases such as: 19f08c3bdfSopenharmony_ci freeze self -- freeze the control group that the current process is 20f08c3bdfSopenharmony_ci in 21f08c3bdfSopenharmony_ci freeze cancellation -- freeze but then backout of the freeze processing 22f08c3bdfSopenharmony_ci and issue a "thaw" command before reaching the frozen state 23f08c3bdfSopenharmony_ci signalling freezing/frozen tasks -- this should delay delivery of the 24f08c3bdfSopenharmony_ci signal until the task is unfrozen 25f08c3bdfSopenharmony_ci vfork -- The vfork system call introduces an obscure special case for 26f08c3bdfSopenharmony_ci the freezer kernel code. This test case attempts to trigger any 27f08c3bdfSopenharmony_ci unanticipated corner cases involving vfork. 28f08c3bdfSopenharmony_ci 29f08c3bdfSopenharmony_ci 30f08c3bdfSopenharmony_ciNOTES: 31f08c3bdfSopenharmony_ci 32f08c3bdfSopenharmony_ci Using the cgroup freezer prevents the tasks from being automatically 33f08c3bdfSopenharmony_ci woken up upon a "Power Management Resume". You will need to 34f08c3bdfSopenharmony_ci manually unfreeze cgroups. 35f08c3bdfSopenharmony_ci 36f08c3bdfSopenharmony_ci These tests assume that most of the library functions in 37f08c3bdfSopenharmony_ci libcgroup_subsys take much less than $sample_sleep time to execute. If 38f08c3bdfSopenharmony_ci this assumption is incorrect then many of these tests may fail in 39f08c3bdfSopenharmony_ci unusual ways. So make sure $sample_sleep is a "reasonable" amount of 40f08c3bdfSopenharmony_ci time. 41f08c3bdfSopenharmony_ci 42f08c3bdfSopenharmony_ciBuilding: 43f08c3bdfSopenharmony_ci--------- 44f08c3bdfSopenharmony_ci 45f08c3bdfSopenharmony_ciRun the command line: 46f08c3bdfSopenharmony_ci make all 47f08c3bdfSopenharmony_ci 48f08c3bdfSopenharmony_ci 49f08c3bdfSopenharmony_ciInstalling: 50f08c3bdfSopenharmony_ci----------- 51f08c3bdfSopenharmony_ci 52f08c3bdfSopenharmony_ciRun the command line: 53f08c3bdfSopenharmony_ci 54f08c3bdfSopenharmony_ci 55f08c3bdfSopenharmony_ciCleaning: 56f08c3bdfSopenharmony_ci--------- 57f08c3bdfSopenharmony_ci 58f08c3bdfSopenharmony_ciRun the command line: 59f08c3bdfSopenharmony_ci 60f08c3bdfSopenharmony_ci make clean 61f08c3bdfSopenharmony_ci 62f08c3bdfSopenharmony_ci 63f08c3bdfSopenharmony_ciRunning: 64f08c3bdfSopenharmony_ci-------- 65f08c3bdfSopenharmony_ci 66f08c3bdfSopenharmony_ciRun the command line: 67f08c3bdfSopenharmony_ci 68f08c3bdfSopenharmony_ci ./run.sh 69f08c3bdfSopenharmony_ci 70f08c3bdfSopenharmony_ciResults: 71f08c3bdfSopenharmony_ci-------- 72f08c3bdfSopenharmony_ci 73f08c3bdfSopenharmony_ciThe results should show up as PASS/FAIL in the LTP logs for each script. The 74f08c3bdfSopenharmony_cioutput frequently will be more specific (beyond which test script failed) 75f08c3bdfSopenharmony_ciabout where and what failure occurred. 76f08c3bdfSopenharmony_ci 77