RFR: 8313674: java/nio/channels/FileChannel/BlockDeviceSize.java should test for more block devices [v2]

Brian Burkhalter bpb at openjdk.org
Wed May 1 22:56:53 UTC 2024


On Wed, 1 May 2024 20:06:47 GMT, Inigo Mediavilla Saiz <duke at openjdk.org> wrote:

>> test/jdk/java/nio/channels/FileChannel/BlockDeviceSize.java line 43:
>> 
>>> 41: 
>>> 42: public class BlockDeviceSize {
>>> 43:     private static final List<String> BLK_FNAMES = List.of("/dev/sda1", "/dev/nvme0n1") ;
>> 
>> Is this list sufficient? Has any kind of survey been performed to determine whether anything else should be in the list?
>
> The devices included are only the two most popular block devices in Linux. I'd tend to say that having those two should provide enough coverage, but I'm open to including others. 
> 
> For reference, this [link](https://github.com/brianmcgillion/udev/blob/master/rules/rules.d/60-persistent-storage.rules) gives an idea of the rules that udev uses to name devices. An example that I didn't consider and that appears in the udev rules is `/dev/mmcblk0`, a device that must be very popular in the raspberry pi community.

I'm not familiar enough with which devices need to be covered. If there are more devices of non-negligible interest, however, and adding them would neither destabilize the test nor substantially increase the test's running time, then I would not hesitate to add a few. On the other if you think this is enough, I cannot disagree.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/19021#discussion_r1586901348


More information about the nio-dev mailing list