Source
x
*
* This tests that we can get the actual version out, and that setting invalid
* major/minor numbers fails appropriately. It does not check the actual
* behavior differenses resulting from an increased DI version.
*/
int main(int argc, char **argv)
{
int fd, ret;
drm_set_version_t sv, version;
if (getuid() != 0) {
fprintf(stderr, "setversion test requires root, skipping\n");
return 0;
}
fd = drm_open_any_master();
/* First, check that we can get the DD/DI versions. */
memset(&version, 0, sizeof(version));
version.drm_di_major = -1;
version.drm_di_minor = -1;
version.drm_dd_major = -1;
version.drm_dd_minor = -1;
ret = ioctl(fd, DRM_IOCTL_SET_VERSION, &version);
assert(ret == 0);