pv 955274 - Limit the offset passed to dm_write_invis() to the file size to avoid
[xfstests-dev.git] / dmapi / src / suite2 / README_for_check_dmapi
1 ###  README for check_dmapi  ###
2
3 check_dmapi tests the version of DMAPI library & kernel code.
4
5 command line:  check_dmapi [-v] 
6 (v is a verbose-output flag)
7
8 Functionality:
9
10 1) Ensures that the user is running as root, using getuid().  
11
12 2) Tries to stat() /usr/include/sys/dmi.h to verify its
13    presence and its size.
14
15 3) Verifies the presence of the DMAPI kernel, using a 
16    direct call to dmi().  The call is invalid, so it should
17    return EINVAL if the kernel code is in place, ENOPKG if not.
18
19 4) Determines the status of the kernel (if it is present) using
20    a direct call to dmi().  The call is invalid, and uses an opcode
21    not present in the old kernel.  So ENOSYS means old kernel;
22    EINVAL means new kernel.
23
24 5) Determines the status of the library by calling dm_init_service().
25    If this fails, libraries are missing.  In the old library, this call
26    did not change its "name" parameter, but in the new library it does.
27    Same name means old library; changed name means new library. 
28
29 6) Outputs its findings.