- 06 10月, 2022 8 次提交
-
-
由 Meng Li 提交于
This kernel module is used for testing. It's safe to say M here. It can also be built-in without X86_AMD_PSTATE enabled. Currently, only tests for amd-pstate are supported. If X86_AMD_PSTATE is set disabled, it can tell the users test can only run on amd-pstate driver, please set X86_AMD_PSTATE enabled. In the future, comparison tests will be added. It can set amd-pstate disabled and set acpi-cpufreq enabled to run test cases, then compare the test results. Suggested-by: NShuah Khan <skhan@linuxfoundation.org> Signed-off-by: NMeng Li <li.meng@amd.com> Acked-by: NHuang Rui <ray.huang@amd.com> Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
-
由 Zhao Gongyi 提交于
Add log information when run full test successfully. Signed-off-by: NZhao Gongyi <zhaogongyi@huawei.com> Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
-
由 Zhao Gongyi 提交于
Considering that we can not offline all cpus in any cases, we need to reserve one cpu online when the test offline all hotpluggable online cpus, otherwise the test will fail forever. Fixes: d89dffa9 ("fault-injection: add selftests for cpu and memory hotplug") Signed-off-by: NZhao Gongyi <zhaogongyi@huawei.com> Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
-
由 Zhao Gongyi 提交于
Delete fault injection related code since the module has been deleted. Signed-off-by: NZhao Gongyi <zhaogongyi@huawei.com> Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
-
由 Zhao Gongyi 提交于
Some cpus will be left in offline state when online function exits in some error conditions. Use return instead of exit to fix it. Signed-off-by: NZhao Gongyi <zhaogongyi@huawei.com> Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
-
由 Zhao Gongyi 提交于
Correct the log info to match the test. Signed-off-by: NZhao Gongyi <zhaogongyi@huawei.com> Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
-
由 Meng Li 提交于
Add amd-pstate test trigger in kselftest, it will load/unload amd-pstate-ut module to test some cases etc. Signed-off-by: NMeng Li <li.meng@amd.com> Acked-by: NHuang Rui <ray.huang@amd.com> Reviewed-by: NShuah Khan <skhan@linuxfoundation.org> Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
-
由 Axel Rasmussen 提交于
In various places both in t/t/s/v/Makefile as well as some of the test sources, we were referring to headers or directories using some fairly long relative paths. Since we have a working top_srcdir variable though, which refers to the root of the kernel tree, we can clean up all of these "up and over" relative paths, just relying on the single variable instead. Signed-off-by: NAxel Rasmussen <axelrasmussen@google.com> Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
-
- 03 10月, 2022 1 次提交
-
-
由 Paolo Abeni 提交于
After the previous patches, the MPTCP protocol can generate fast-closes on both ends of the connection. Rework the relevant test-case to carefully trigger the fast-close code-path on a single end at the time, while ensuring than a predictable amount of data is spooled on both ends. Additionally add another test-cases for the passive socket fast-close. Reviewed-by: NMatthieu Baerts <matthieu.baerts@tessares.net> Reviewed-by: NMat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: NPaolo Abeni <pabeni@redhat.com> Signed-off-by: NMat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 01 10月, 2022 3 次提交
-
-
由 Zhengchao Shao 提交于
Since three patchsets "add tc-testing test cases", "refactor duplicate codes in the tc cls walk function", and "refactor duplicate codes in the qdisc class walk function" are merged to net-next tree, the list of supported features needs to be updated in config file. Signed-off-by: NZhengchao Shao <shaozhengchao@huawei.com> Reviewed-by: NVictor Nogueira <victor@mojatatu.com> Acked-by: NJamal Hadi Salim <jhs@mojatatu.com> Link: https://lore.kernel.org/r/20220929041909.83913-1-shaozhengchao@huawei.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Magnus Karlsson 提交于
Fix a double free at exit of the test suite. Fixes: a693ff3e ("selftests/xsk: Add support for executing tests on physical device") Signed-off-by: NMagnus Karlsson <magnus.karlsson@intel.com> Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Acked-by: NMaciej Fijalkowski <maciej.fijalkowski@intel.com> Link: https://lore.kernel.org/bpf/20220929090133.7869-1-magnus.karlsson@gmail.com
-
由 Colin Ian King 提交于
There are a couple of spelling mistakes, one in a literal string and one in a comment. Fix them. Signed-off-by: NColin Ian King <colin.i.king@gmail.com> Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Acked-by: NJohn Fastabend <john.fastabend@gmail.com> Link: https://lore.kernel.org/bpf/20220928221555.67873-1-colin.i.king@gmail.com
-
- 30 9月, 2022 9 次提交
-
-
由 Sean Christopherson 提交于
Directly compare the expected versus observed hypercall instructions when verifying that KVM patched in the native hypercall (FIX_HYPERCALL_INSN quirk enabled). gcc rightly complains that doing a 4-byte memcpy() with an "unsigned char" as the source generates an out-of-bounds accesses. Alternatively, "exp" and "obs" could be declared as 3-byte arrays, but there's no known reason to copy locally instead of comparing directly. In function ‘assert_hypercall_insn’, inlined from ‘guest_main’ at x86_64/fix_hypercall_test.c:91:2: x86_64/fix_hypercall_test.c:63:9: error: array subscript ‘unsigned int[0]’ is partly outside array bounds of ‘unsigned char[1]’ [-Werror=array-bounds] 63 | memcpy(&exp, exp_insn, sizeof(exp)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ x86_64/fix_hypercall_test.c: In function ‘guest_main’: x86_64/fix_hypercall_test.c:42:22: note: object ‘vmx_hypercall_insn’ of size 1 42 | extern unsigned char vmx_hypercall_insn; | ^~~~~~~~~~~~~~~~~~ x86_64/fix_hypercall_test.c:25:22: note: object ‘svm_hypercall_insn’ of size 1 25 | extern unsigned char svm_hypercall_insn; | ^~~~~~~~~~~~~~~~~~ In function ‘assert_hypercall_insn’, inlined from ‘guest_main’ at x86_64/fix_hypercall_test.c:91:2: x86_64/fix_hypercall_test.c:64:9: error: array subscript ‘unsigned int[0]’ is partly outside array bounds of ‘unsigned char[1]’ [-Werror=array-bounds] 64 | memcpy(&obs, obs_insn, sizeof(obs)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ x86_64/fix_hypercall_test.c: In function ‘guest_main’: x86_64/fix_hypercall_test.c:25:22: note: object ‘svm_hypercall_insn’ of size 1 25 | extern unsigned char svm_hypercall_insn; | ^~~~~~~~~~~~~~~~~~ x86_64/fix_hypercall_test.c:42:22: note: object ‘vmx_hypercall_insn’ of size 1 42 | extern unsigned char vmx_hypercall_insn; | ^~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make: *** [../lib.mk:135: tools/testing/selftests/kvm/x86_64/fix_hypercall_test] Error 1 Fixes: 6c2fa8b2 ("selftests: KVM: Test KVM_X86_QUIRK_FIX_HYPERCALL_INSN") Cc: Oliver Upton <oliver.upton@linux.dev> Signed-off-by: NSean Christopherson <seanjc@google.com> Reviewed-by: NOliver Upton <oliver.upton@linux.dev> Message-Id: <20220928233652.783504-3-seanjc@google.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Sean Christopherson 提交于
Implement memcmp(), memcpy(), and memset() to override the compiler's built-in versions in order to guarantee that the compiler won't generate out-of-line calls to external functions via the PLT. This allows the helpers to be safely used in guest code, as KVM selftests don't support dynamic loading of guest code. Steal the implementations from the kernel's generic versions, sans the optimizations in memcmp() for unaligned accesses. Put the utilities in a separate compilation unit and build with -ffreestanding to fudge around a gcc "feature" where it will optimize memset(), memcpy(), etc... by generating a recursive call. I.e. the compiler optimizes itself into infinite recursion. Alternatively, the individual functions could be tagged with optimize("no-tree-loop-distribute-patterns"), but using "optimize" for anything but debug is discouraged, and Linus NAK'd the use of the flag in the kernel proper[*]. https://lore.kernel.org/lkml/CAHk-=wik-oXnUpfZ6Hw37uLykc-_P0Apyn2XuX-odh-3Nzop8w@mail.gmail.com Cc: Andrew Jones <andrew.jones@linux.dev> Cc: Anup Patel <anup@brainfault.org> Cc: Atish Patra <atishp@atishpatra.org> Cc: Christian Borntraeger <borntraeger@linux.ibm.com> Cc: Janosch Frank <frankja@linux.ibm.com> Cc: Claudio Imbrenda <imbrenda@linux.ibm.com> Signed-off-by: NSean Christopherson <seanjc@google.com> Message-Id: <20220928233652.783504-2-seanjc@google.com> Reviewed-by: NAndrew Jones <andrew.jones@linux.dev> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 David Matlack 提交于
Bail out of test_dump_stack() if the stack trace is empty rather than invoking addr2line with zero addresses. The problem with the latter is that addr2line will block waiting for addresses to be passed in via stdin, e.g. if running a selftest from an interactive terminal. Opportunistically fix up the comment that mentions skipping 3 frames since only 2 are skipped in the code. Cc: Vipin Sharma <vipinsh@google.com> Cc: Sean Christopherson <seanjc@google.com> Signed-off-by: NDavid Matlack <dmatlack@google.com> Message-Id: <20220922231724.3560211-1-dmatlack@google.com> [Small tweak to keep backtrace() call close to if(). - Paolo] Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
Page_idle uses {ptep/pmdp}_clear_young_notify which in turn calls the mmu notifier callback ->clear_young(), which purposefully does not flush the TLB. When running the test in a nested guest, point 1. of the test doc header is violated, because KVM TLB is unbounded by size and since no flush is forced, KVM does not update the sptes accessed/idle bits resulting in guest assertion failure. More precisely, only the first ACCESS_WRITE in run_test() actually makes visible changes, because sptes are created and the accessed bit is set to 1 (or idle bit is 0). Then the first mark_memory_idle() passes since access bit is still one, and sets all pages as idle (or not accessed). When the next write is performed, the update is not flushed therefore idle is still 1 and next mark_memory_idle() fails. Signed-off-by: NEmanuele Giuseppe Esposito <eesposit@redhat.com> Message-Id: <20220926082923.299554-1-eesposit@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Mark Brown 提交于
Currently we treat any error when reading from the child as a failure and don't read any more output from that child as a result. This ignores the fact that it is valid for read() to return EINTR as the error code if there is a signal pending so we could stop handling the output of children, especially during exit when we will get some SIGCHLD signals delivered to us. Fix this by pulling the read handling out into a separate function which returns a flag if reads should be continued and wrapping it in a loop. Signed-off-by: NMark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20220921181345.618085-4-broonie@kernel.orgSigned-off-by: NCatalin Marinas <catalin.marinas@arm.com>
-
由 Mark Brown 提交于
Once we have started exiting the termination handler will have the same effect as what we're already running so set the termination flag at that point. Signed-off-by: NMark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20220921181345.618085-3-broonie@kernel.orgSigned-off-by: NCatalin Marinas <catalin.marinas@arm.com>
-
由 Mark Brown 提交于
When fp-stress gets a termination signal it sets a flag telling itself to exit and sends a termination signal to all the children. If the flag is set then don't bother repeating this process, it isn't going to accomplish anything other than consume CPU time which can be an issue when running in emulation. Signed-off-by: NMark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20220921181345.618085-2-broonie@kernel.orgSigned-off-by: NCatalin Marinas <catalin.marinas@arm.com>
-
由 Mark Brown 提交于
Currently we set -march=armv8.5+memtag when building the MTE selftests, allowing the compiler to emit v8.5 and MTE instructions for anything it generates. This means that we may get code that will generate SIGILLs when run on older systems rather than skipping on non-MTE systems as should be the case. Most toolchains don't select any incompatible instructions but I have seen some reports which suggest that some may be appearing which do so. This is also potentially problematic in that if the compiler chooses to emit any MTE instructions for the C code it may interfere with the MTE usage we are trying to test. Since the only reason we are specifying this option is to allow us to assemble MTE instructions in mte_helper.S we can avoid these issues by moving to using a .arch directive there and adding the -march explicitly to the toolchain support check instead of the generic CFLAGS. Signed-off-by: NMark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20220928154517.173108-1-broonie@kernel.orgSigned-off-by: NCatalin Marinas <catalin.marinas@arm.com>
-
由 Martin KaFai Lau 提交于
This patch changes the bpf_dctcp test to ensure the recurred bpf_setsockopt(TCP_CONGESTION) returns -EBUSY. Signed-off-by: NMartin KaFai Lau <martin.lau@kernel.org> Link: https://lore.kernel.org/r/20220929070407.965581-6-martin.lau@linux.devSigned-off-by: NAlexei Starovoitov <ast@kernel.org>
-
- 29 9月, 2022 12 次提交
-
-
由 Wang Yufen 提交于
Convert the selftest to use the preferred ASSERT_* macros instead of the deprecated CHECK(). Signed-off-by: NWang Yufen <wangyufen@huawei.com> Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/1664169131-32405-12-git-send-email-wangyufen@huawei.com
-
由 Wang Yufen 提交于
Convert the selftest to use the preferred ASSERT_* macros instead of the deprecated CHECK(). Signed-off-by: NWang Yufen <wangyufen@huawei.com> Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/1664169131-32405-11-git-send-email-wangyufen@huawei.com
-
由 Wang Yufen 提交于
Convert the selftest to use the preferred ASSERT_* macros instead of the deprecated CHECK(). Signed-off-by: NWang Yufen <wangyufen@huawei.com> Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/1664169131-32405-10-git-send-email-wangyufen@huawei.com
-
由 Wang Yufen 提交于
Convert the selftest to use the preferred ASSERT_* macros instead of the deprecated CHECK(). Signed-off-by: NWang Yufen <wangyufen@huawei.com> Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/1664169131-32405-9-git-send-email-wangyufen@huawei.com
-
由 Wang Yufen 提交于
Convert the selftest to use the preferred ASSERT_* macros instead of the deprecated CHECK(). Signed-off-by: NWang Yufen <wangyufen@huawei.com> Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/1664169131-32405-8-git-send-email-wangyufen@huawei.com
-
由 Wang Yufen 提交于
Convert the selftest to use the preferred ASSERT_* macros instead of the deprecated CHECK(). Signed-off-by: NWang Yufen <wangyufen@huawei.com> Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/1664169131-32405-7-git-send-email-wangyufen@huawei.com
-
由 Wang Yufen 提交于
Convert the selftest to use the preferred ASSERT_* macros instead of the deprecated CHECK(). Signed-off-by: NWang Yufen <wangyufen@huawei.com> Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/1664169131-32405-6-git-send-email-wangyufen@huawei.com
-
由 Wang Yufen 提交于
Convert the selftest to use the preferred ASSERT_* macros instead of the deprecated CHECK(). Signed-off-by: NWang Yufen <wangyufen@huawei.com> Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/1664169131-32405-5-git-send-email-wangyufen@huawei.com
-
由 Wang Yufen 提交于
Convert the selftest to use the preferred ASSERT_* macros instead of the deprecated CHECK(). Signed-off-by: NWang Yufen <wangyufen@huawei.com> Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/1664169131-32405-4-git-send-email-wangyufen@huawei.com
-
由 Wang Yufen 提交于
Convert the selftest to use the preferred ASSERT_* macros instead of the deprecated CHECK(). Signed-off-by: NWang Yufen <wangyufen@huawei.com> Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/1664169131-32405-3-git-send-email-wangyufen@huawei.com
-
由 Wang Yufen 提交于
Convert the selftest to use the preferred ASSERT_* macros instead of the deprecated CHECK(). Signed-off-by: NWang Yufen <wangyufen@huawei.com> Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/1664169131-32405-2-git-send-email-wangyufen@huawei.com
-
由 Kui-Feng Lee 提交于
Test iterators of vma, files and tasks. Ensure the API works appropriately to visit all tasks, tasks in a process, or a particular task. Signed-off-by: NKui-Feng Lee <kuifeng@fb.com> Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Acked-by: NYonghong Song <yhs@fb.com> Acked-by: NMartin KaFai Lau <martin.lau@kernel.org> Link: https://lore.kernel.org/bpf/20220926184957.208194-5-kuifeng@fb.com
-
- 28 9月, 2022 7 次提交
-
-
由 Zhengchao Shao 提交于
Test 84a0: Create TEQL with default setting Test 7734: Create TEQL with multiple device Test 34a9: Delete TEQL with valid handle Test 6289: Show TEQL stats Signed-off-by: NZhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Zhengchao Shao 提交于
Test 6430: Create TBF with default setting Test 0518: Create TBF with mtu setting Test 320a: Create TBF with peakrate setting Test 239b: Create TBF with latency setting Test c975: Create TBF with overhead setting Test 948c: Create TBF with linklayer setting Test 3549: Replace TBF with mtu Test f948: Change TBF with latency time Test 2348: Show TBF class Signed-off-by: NZhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Zhengchao Shao 提交于
Test ba39: Add taprio Qdisc to multi-queue device (8 queues) Test 9462: Add taprio Qdisc with multiple sched-entry Test 8d92: Add taprio Qdisc with txtime-delay Test d092: Delete taprio Qdisc with valid handle Test 8471: Show taprio class Test 0a85: Add taprio Qdisc to single-queue device Signed-off-by: NZhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Zhengchao Shao 提交于
Test 283e: Create skbprio with default setting Test c086: Create skbprio with limit setting Test 6733: Change skbprio with limit setting Test 2958: Show skbprio class Signed-off-by: NZhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Zhengchao Shao 提交于
Test 7482: Create SFQ with default setting Test c186: Create SFQ with limit setting Test ae23: Create SFQ with perturb setting Test a430: Create SFQ with quantum setting Test 4539: Create SFQ with divisor setting Test b089: Create SFQ with flows setting Test 99a0: Create SFQ with depth setting Test 7389: Create SFQ with headdrop setting Test 6472: Create SFQ with redflowlimit setting Test 8929: Show SFQ class Signed-off-by: NZhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Zhengchao Shao 提交于
Test 3294: Create SFB with default setting Test 430a: Create SFB with rehash setting Test 3410: Create SFB with db setting Test 49a0: Create SFB with limit setting Test 1241: Create SFB with max setting Test 3249: Create SFB with target setting Test 30a9: Create SFB with increment setting Test 239a: Create SFB with decrement setting Test 9301: Create SFB with penalty_rate setting Test 2a01: Create SFB with penalty_burst setting Test 3209: Change SFB with rehash setting Test 5447: Show SFB class Signed-off-by: NZhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Zhengchao Shao 提交于
Test 3289: Create PLUG with default setting Test 0917: Create PLUG with block setting Test 483b: Create PLUG with release setting Test 4995: Create PLUG with release_indefinite setting Test 389c: Create PLUG with limit setting Test 384a: Delete PLUG with valid handle Test 439a: Replace PLUG with limit setting Test 9831: Change PLUG with limit setting Signed-off-by: NZhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-