I wish to test code that may have trouble on file systems that do not support d_type. In order to do so I would like to create two small xfs file systems that respectively have ftype=0 which does not support d_type, and ftype=1 which does.
I'd like to run these tests in a Docker container as that is how our testing is set up. It looks like I might be able to take advantage of the Docker devicemapper https://docs.docker.com/storage/storagedriver/device-mapper-driver/ .
I do not necessarily control the Docker Engine, that is I don't want to rely on creating these filesystems on the underlying machine and then exposing them to my container - so I would want to be able to do this in my Dockerfile or one I am running in the container.
But maybe there are other or better ways to do this.