<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 24, 2022, 12:03 PM Martin Doucha <<a href="mailto:mdoucha@suse.cz">mdoucha@suse.cz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 21. 10. 22 21:03, Amir Goldstein wrote:<br>
> I don't have a vision of what you are proposing.<br>
> Make a proposal and I will see if it is correct.<br>
> <br>
> I must say I don't understand what it is that you are trying to improve.<br>
> All the test needs to know is if the specific combinations of flags that<br>
> the test uses are supported by the kernel/fs.<br>
> <br>
> Trying to figure out which of the bits from a specific combination is<br>
> not supported? how does that help users?<br>
> Maybe in kernel 5.10 flag X is supported and in kernel 5.11 flag<br>
> Y is also supported, but only in kernel 5.12 the combination X | Y<br>
> is supported? Do you see why your generic function doesn't make<br>
> much sense? or is just too complex to be worth the trouble<br>
> for an informational print?<br>
<br>
The function I'm trying to write is supposed to check whether a <br>
particular flag is implemented by the kernel. Whether a particular <br>
combination of implemented flags is also *allowed* is out of scope.<br>
<br>
Note that the test I'm writing this for is fanotify14, which checks that <br>
various invalid combinations of flags will correctly return error. But <br>
since the error code for "this flag is not implemented" and "this flag <br>
was used incorrectly" is the same, I need to somehow get the fanotify <br>
feature set so that I can skip test cases which are not compatible with <br>
the running kernel. I don't really care about which specific flag is not <br>
implemented, comparing flags against a bitmask is just a quick and <br>
convenient way to check that running the test case makes sense.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">Why is skipping the test better than passing the test?</div><div dir="auto"><br></div><div dir="auto">The test wants to know that a specific flag combination is not allowed.</div><div dir="auto"><br></div><div dir="auto">It is particarly not allowed also on old kernels that do not support either individual flag.</div><div dir="auto"><br></div><div dir="auto">What's the difference?</div><div dir="auto"><br></div><div dir="auto">Who is going to gain anything from this change?</div><div dir="auto"><br></div><div dir="auto">Sorry for being strict on this point </div><div dir="auto">I may be missing something.</div><div dir="auto"><br></div><div dir="auto">Please clarify what it is the problem use case is and I will suggest a solution, because I disagree with this solution. </div><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto">Amir.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
-- <br>
Martin Doucha <a href="mailto:mdoucha@suse.cz" target="_blank" rel="noreferrer">mdoucha@suse.cz</a><br>
QA Engineer for Software Maintenance<br>
SUSE LINUX, s.r.o.<br>
CORSO IIa<br>
Krizikova 148/34<br>
186 00 Prague 8<br>
Czech Republic<br>
<br>
</blockquote></div></div></div>