<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 7, 2022 at 2:51 AM Jan Stancek <<a href="mailto:jstancek@redhat.com">jstancek@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> + "?NUMA_BALANCING",<br>
You probably meant "?"NUMA_BALANCING<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">I guess both should be fine.</div></div><div class="gmail_default" style="font-size:small">(tried locally with original patch and works well)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
><br>
> Maybe we just need to enhance the .save_restore with another parameter;<br>
> a value to set the knob to if it does exists, so in add_key05.c it would<br>
> look like:<br>
><br>
> struct tst_path_val {<br>
> const char *path;<br>
> const char *val;<br>
> };<br>
><br>
> .save_restore = (const struct tst_path_val const[]) {<br>
> {"?/proc/sys/kernel/keys/gc_delay", "1"},<br>
> {"?/proc/sys/kernel/keys/maxkeys", "200"},<br>
> {"?/proc/sys/kernel/keys/maxbytes", "20000"}<br>
> NULL,<br>
> },<br>
><br>
> And in cases we do not need to set value we would just pass NULL as val...<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">+1</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
That should work for most testcases, I don't recall one where we need<br>
to cycle through more values.<br></blockquote><div><br></div><div class="gmail_default" style="font-size:small">Agree, even we have that requirement in the future, pass NULL at the beginning</div><div class="gmail_default" style="font-size:small">and reset it via FILE_PRINTF for more cycle values that should be working.</div></div><div class="gmail_default" style="font-size:small"></div><div><div class="gmail_default" style="font-size:small">Thanks for the suggestions, I will get start work on V2.</div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>