Patch "selftests/resctrl: Fix missing options "-n" and "-p"" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    selftests/resctrl: Fix missing options "-n" and "-p"

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     selftests-resctrl-fix-missing-options-n-and-p.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit d050e3a06be9ec455b55c442119892191e60f66b
Author: Fenghua Yu <fenghua.yu@xxxxxxxxx>
Date:   Wed Mar 17 02:22:40 2021 +0000

    selftests/resctrl: Fix missing options "-n" and "-p"
    
    [ Upstream commit d7af3d0d515cbdf63b6c3398a3c15ecb1bc2bd38 ]
    
    resctrl test suite accepts command line arguments (like -b, -t, -n and -p)
    as documented in the help. But passing -n and -p throws an invalid option
    error. This happens because -n and -p are missing in the list of
    characters that getopt() recognizes as valid arguments. Hence, they are
    treated as invalid options.
    
    Fix this by adding them to the list of characters that getopt() recognizes
    as valid arguments. Please note that the main() function already has the
    logic to deal with the values passed as part of these arguments and hence
    no changes are needed there.
    
    Tested-by: Babu Moger <babu.moger@xxxxxxx>
    Signed-off-by: Fenghua Yu <fenghua.yu@xxxxxxxxx>
    Signed-off-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/resctrl/resctrl_tests.c b/tools/testing/selftests/resctrl/resctrl_tests.c
index 4b109a59f72d..ac2269610aa9 100644
--- a/tools/testing/selftests/resctrl/resctrl_tests.c
+++ b/tools/testing/selftests/resctrl/resctrl_tests.c
@@ -73,7 +73,7 @@ int main(int argc, char **argv)
 		}
 	}
 
-	while ((c = getopt(argc_new, argv, "ht:b:")) != -1) {
+	while ((c = getopt(argc_new, argv, "ht:b:n:p:")) != -1) {
 		char *token;
 
 		switch (c) {



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux