ldv_ changed the topic of #strace to: https://strace.io | https://strace.io/logs/ | strace 4.22 is out | strace-devel@lists.strace.io for dev discussions
<zhibli> hi everyone, I've noticed that test for quotactl mostly checks cases with return value -1, which means valid cases are not well tested.
<zhibli> I also found a comment "Trying our best to get successful result" in the test. Especially the Q_GETxxx(e.g. Q_GETNEXTQUOTA, Q_GETFMT).
<zhibli> I think it's because in most cases the OS or the target filesystem the tests are running on doesn't support quota related features (or just not enable them by default).
<zhibli> I wonder if it's possible to use shell script to create a loop device and configure it to be usable (i.e. mount it with quota options) so the we can test some valid cases.
<zhibli> This requires root privilege, though.
<eSyr-ng> 05:40:58 < eSyr-ng> zhibli: btw, https://github.com/esyr-rh/strace/commit/23450af02dbdb9477ffedf44ff026ed59d2d2c73 similar approach may be used for increasing quotactl/dm/evdev covverage.
<eSyr-ng> (it's now upstream as ee96027445e2fe951c7f1e0cb7e619bd0989ceb9)
<zhibli> eSyr-ng: Yes I saw your advice. It's about some pre-processing (like injection or configure something before running the tests) right?
<zhibli> Well, I haven't totally figured out the injection part and I think I still need some time.
<zhibli> Because it seems I'm misunderstanding something :(
<eSyr-ng> zhibli: yes, basically, strace injects successful syscall return value which, in turn forces syscall decoder to executre syscall exiting path. On the test side, the needed structures for decoder to parse are prepared beforehand and passed in…
<eSyr-ng> … syscall arguments.