<p></p>
<p><b>@ldv-alt</b> requested changes on this pull request.</p>

<p dir="auto">Very impressive for a first time test.<br>
See my comments above.</p><hr>

<p>In <a href="https://github.com/strace/strace/pull/208#discussion_r798093949">tests/gen_tests.in</a>:</p>
<pre style='color:#555'>> @@ -339,6 +339,7 @@ ioctl_kd-success-s1024-Xverbose  +ioctl-success.sh -a20 -s1024 -Xverbose
 ioctl_kvm_run  +ioctl.test -a36 -y
 ioctl_kvm_run-v        +ioctl.test -v -a36 -y
 ioctl_kvm_run_auxstr_vcpu      +ioctl.test -a36 -y -e kvm=vcpu
+ioctl_lirc-success     +ioctl-success.sh -a30
</pre>
<p dir="auto">Please add</p>
<pre><code>ioctl_lirc       +ioctl-success.sh -a30
</code></pre>
<p dir="auto">as well, this would require small changes to the test.</p>

<hr>

<p>In <a href="https://github.com/strace/strace/pull/208#discussion_r798098462">tests/ioctl_lirc.c</a>:</p>
<pre style='color:#555'>> +    value = 8;
+       do_ioctl(LIRC_SET_SEND_MODE, &value);
+       printf("ioctl(-1, %s, [LIRC_MODE_SCANCODE]) = %s\n",
+              XLAT_STR(LIRC_SET_SEND_MODE), errstr);
+
+       value = 4;
+       do_ioctl(LIRC_SET_REC_MODE, &value);
+       printf("ioctl(-1, %s, [LIRC_MODE_MODE2]) = %s\n",
+              XLAT_STR(LIRC_SET_REC_MODE), errstr);
+
+       value = 16;
+       do_ioctl(LIRC_SET_REC_MODE, &value);
+       printf("ioctl(-1, %s, [LIRC_MODE_LIRCCODE]) = %s\n",
+              XLAT_STR(LIRC_SET_REC_MODE), errstr);
+
+       // read ioctl
</pre>
<p dir="auto">/* read ioctls */</p>
<p dir="auto">To make the test work in case of no syscall tampering,<br>
the return value of do_ioctl should be tested and acted appropriately,<br>
see, for eexample, tests/ioctl_gpio.c</p>
<p dir="auto">also, please add <code>do_ioctl(LIRC_GET_FEATURES, 0);</code> or something like this to cover the <code>true</code> branch of <code>if (umove_or_printaddr(tcp, arg, &value))</code>.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/strace/strace/pull/208#pullrequestreview-871216741">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AOVBTRYFFUE77HWJWIH5HO3UZG47RANCNFSM5M2WOHAQ">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AOVBTR7RR2JVWJMKD772OK3UZG47RA5CNFSM5M2WOHA2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOGPW3MZI.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><strace/strace/pull/208/review/871216741</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/strace/strace/pull/208#pullrequestreview-871216741",
"url": "https://github.com/strace/strace/pull/208#pullrequestreview-871216741",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>