CI - simulate hardware for testing

Using the online & CI, I would like to test some code that relies on the presence of hardware. Specifically, one or more S.M.A.R.T. capable harddrives that are interrogated via smartmontools.
In the CI, the runners (obviously) have no harddisks attached.

What would be a good way to simulate the presence of a harddisk so that I could then test the software?

Can you mock the code that test if a HDD is present? You could override it by make it always return true…

@f.montanana.mbio Yes, but then smartctl will still not return any data. :frowning_face:

I was kind of expecting a lot more replies. I thought many people would have a need to emulate a hardware interface to test their s/w. I expected their to be some package available to lets you set up a hardware environment.

Never thought I’d be the only one running into this.