When testing the library, the libdrm dependency is swapped with a mock libdrm. The test sets up the mock libdrm's internal state and then runs the test.