android13/external/ltp/testcases/kernel/syscalls/inotify
liiir1985 7f62dcda9f initial 2024-06-22 20:45:49 +08:00
..
Makefile initial 2024-06-22 20:45:49 +08:00
README initial 2024-06-22 20:45:49 +08:00
inotify.h initial 2024-06-22 20:45:49 +08:00
inotify01.c initial 2024-06-22 20:45:49 +08:00
inotify02.c initial 2024-06-22 20:45:49 +08:00
inotify03.c initial 2024-06-22 20:45:49 +08:00
inotify04.c initial 2024-06-22 20:45:49 +08:00
inotify05.c initial 2024-06-22 20:45:49 +08:00
inotify06.c initial 2024-06-22 20:45:49 +08:00
inotify07.c initial 2024-06-22 20:45:49 +08:00
inotify08.c initial 2024-06-22 20:45:49 +08:00
inotify09.c initial 2024-06-22 20:45:49 +08:00
inotify10.c initial 2024-06-22 20:45:49 +08:00

README

This contains two tests for the inotify subsystem.

The  inotify  API  provides  a mechanism for monitoring file system events. $
Inotify can be used to monitor individual files, or to monitor directories. $
When a directory is monitored, inotify will return events for the directory$
itself, and for files inside  the directory.

The tests are intended to do the following:
test 1:
	initialize inotify for the test file
	generate sequence events:
		operation			expected event
		-----------------------------------------
		chmod file			IN_ATTRIB
		open read-only			IN_OPEN
		read				IN_ACCESS
		close				IN_CLOSE_NOWRITE
		open read-write			IN_OPEN
		write				IN_MODIFY
		close				IN_CLOSE_WRITE
	check that all events have been received
test 2:
	initialize inotify for the test directory
	generate sequence events:
		operate				expected event
		-----------------------------------------
		chmod				IN_ISDIR | IN_ATTRIB
		creat file			IN_CREATE
						IN_OPEN
		close				IN_CLOSE_WRITE
		rename file			IN_MOVED_FROM
						IN_MOVED_TO
		rename yourself			IN_MOVE_SELF
		unlink file			IN_DELETE
		rename yourself again
		rename back			IN_MOVE_SELF
	check that all events have been received and the last two successive
	IN_MOVE_SELF events will be coalesced into a single one.