mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 20:10:23 +09:00
selftests/resctrl: Fix missing options "-n" and "-p"
[ Upstream commit d7af3d0d51 ]
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@amd.com>
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
cd29eef127
commit
0ccead50c3
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user