1f08c3bdfSopenharmony_ciThis contains two tests for the inotify subsystem. 2f08c3bdfSopenharmony_ci 3f08c3bdfSopenharmony_ciThe inotify API provides a mechanism for monitoring file system events. $ 4f08c3bdfSopenharmony_ciInotify can be used to monitor individual files, or to monitor directories. $ 5f08c3bdfSopenharmony_ciWhen a directory is monitored, inotify will return events for the directory$ 6f08c3bdfSopenharmony_ciitself, and for files inside the directory. 7f08c3bdfSopenharmony_ci 8f08c3bdfSopenharmony_ciThe tests are intended to do the following: 9f08c3bdfSopenharmony_citest 1: 10f08c3bdfSopenharmony_ci initialize inotify for the test file 11f08c3bdfSopenharmony_ci generate sequence events: 12f08c3bdfSopenharmony_ci operation expected event 13f08c3bdfSopenharmony_ci ----------------------------------------- 14f08c3bdfSopenharmony_ci chmod file IN_ATTRIB 15f08c3bdfSopenharmony_ci open read-only IN_OPEN 16f08c3bdfSopenharmony_ci read IN_ACCESS 17f08c3bdfSopenharmony_ci close IN_CLOSE_NOWRITE 18f08c3bdfSopenharmony_ci open read-write IN_OPEN 19f08c3bdfSopenharmony_ci write IN_MODIFY 20f08c3bdfSopenharmony_ci close IN_CLOSE_WRITE 21f08c3bdfSopenharmony_ci check that all events have been received 22f08c3bdfSopenharmony_citest 2: 23f08c3bdfSopenharmony_ci initialize inotify for the test directory 24f08c3bdfSopenharmony_ci generate sequence events: 25f08c3bdfSopenharmony_ci operate expected event 26f08c3bdfSopenharmony_ci ----------------------------------------- 27f08c3bdfSopenharmony_ci chmod IN_ISDIR | IN_ATTRIB 28f08c3bdfSopenharmony_ci creat file IN_CREATE 29f08c3bdfSopenharmony_ci IN_OPEN 30f08c3bdfSopenharmony_ci close IN_CLOSE_WRITE 31f08c3bdfSopenharmony_ci rename file IN_MOVED_FROM 32f08c3bdfSopenharmony_ci IN_MOVED_TO 33f08c3bdfSopenharmony_ci rename yourself IN_MOVE_SELF 34f08c3bdfSopenharmony_ci unlink file IN_DELETE 35f08c3bdfSopenharmony_ci rename yourself again 36f08c3bdfSopenharmony_ci rename back IN_MOVE_SELF 37f08c3bdfSopenharmony_ci check that all events have been received and the last two successive 38f08c3bdfSopenharmony_ci IN_MOVE_SELF events will be coalesced into a single one. 39