For socketpair, only SOCK_DGRAM is not supported. But for other larger functions that involve a lot of flags, it will be useful if there is a helper function that keeps track of unsupported flags that we know and helps to throw error with exact name of the flag.
Probably what we'd want is to be able to "decode" a flag value into NAME1 | NAME2 | NAME3, and then print that. Of course if a flag is truly unknown we can't do that and have to still show the hex value.
The error message will be clearer if we can print the exact unsupported flag name in
throw_unsup_format!
message. This is mentioned in https://github.com/rust-lang/miri/pull/3609#discussion_r1612845613_.For
socketpair
, onlySOCK_DGRAM
is not supported. But for other larger functions that involve a lot of flags, it will be useful if there is a helper function that keeps track of unsupported flags that we know and helps to throw error with exact name of the flag.