| 81 | }; |
| 82 | |
| 83 | TEST_F(DiskInfoTest, Basic) { |
| 84 | cout << DiskInfo::DebugString(); |
| 85 | cout << "Device name for disk 0: " << DiskInfo::device_name(0) << endl; |
| 86 | |
| 87 | int disk_id_home_dir = DiskInfo::disk_id("/home"); |
| 88 | if (disk_id_home_dir != -1) { |
| 89 | cout << "Device name for '/home': " |
| 90 | << DiskInfo::device_name(disk_id_home_dir) << endl; |
| 91 | } else { |
| 92 | // Often happens in Docker containers. |
| 93 | cout << "No device name for /home"; |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | TEST_F(DiskInfoTest, NVMEDetection) { |
| 98 | // Positive case 1: NVME device with a partition specified |
nothing calls this directly
no test coverage detected