On Thu, Mar 20, 2025 at 10:31:16PM +0800, Shung-Hsi Yu wrote: > Hi, > > Do we have any rule regarding whether a patch that adds a new test case > in tools/testing/selftests/ can be considered for backport? > > For example, consider commit 0a5d2efa3827 ("selftests/bpf: Add test case > for the freeing of bpf_timer"), it adds a test case for the issue > addressed in the same series -- commit 58f038e6d209 ("bpf: Cancel the > running bpf_timer through kworker for PREEMPT_RT"). The latter has been > backported to 6.12.y. > > Would commit 0a5d2efa3827 be a worthwhile add to 6.12.y as well? Sure! > IMO having such test case added would be helpful to check whether the > backported fix really works (assuming someone is willing to do the extra > work of finding, testing, and sending such tests); yet it does not seem > to fit into the current stable kernel rule set of: > - It or an equivalent fix must already exist in Linux mainline (upstream). > - It must be obviously correct and tested. > - It cannot be bigger than 100 lines, with context. > - It must follow the Documentation/process/submitting-patches.rst rules. > - It must either fix a real bug that bothers people or just add a device ID > > Appreciate any clarification and/or feedback on this matter. Adding more selftests for fixes is great, but as most people just run the latest version of the selftests on older kernel releases, it's not usually needed. If you note, we do backport a lot of selftest changes for this type of thing, so it's not exactly a new thing for us. So send the backport on and we will be glad to queue it up. thanks, greg k-h