A common test case is to check that a device restart really did happen. Supporting a new method like get_boot_id() (or something similar) would allow users to verify if a reboot occurred or not as the id would change for each boot.
Different adapters have different ways for detecting this:
- real devices can check the linux file:
/proc/sys/kernel/random/boot_id, or a file could be placed on a temp file system which should get cleared on a reboot (though this will be harder to detect if the partition is a tmpfs or not).
- containers can check the container runtime information (using the container start timestamp?). Using
/proc/sys/kernel/random/boot_id does not work, as the host machine's fine is mounted within the containers, so the boot id does not change if the container is restarted as the boot id is from the host (same with the uptime command, the output is from the host and not the container).
A common test case is to check that a device restart really did happen. Supporting a new method like
get_boot_id()(or something similar) would allow users to verify if a reboot occurred or not as the id would change for each boot.Different adapters have different ways for detecting this:
/proc/sys/kernel/random/boot_id, or a file could be placed on a temp file system which should get cleared on a reboot (though this will be harder to detect if the partition is a tmpfs or not)./proc/sys/kernel/random/boot_iddoes not work, as the host machine's fine is mounted within the containers, so the boot id does not change if the container is restarted as the boot id is from the host (same with theuptimecommand, the output is from the host and not the container).