>
> On 26.09.22 15:03, Zhao Gongyi wrote:
> > Add checking for online_memory_expect_success()/
> > offline_memory_expect_success()/offline_memory_expect_fail(), or
> the
> > test would exit 0 although the functions return 1.
> >
> > Signed-off-by: Zhao Gongyi <zhaogongyi(a)huawei.com>
> > ---
> > .../selftests/memory-hotplug/mem-on-off-test.sh | 15
> ++++++++++++---
> > 1 file changed, 12 insertions(+), 3 deletions(-)
> >
> > diff --git a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> > b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> > index 46a97f318f58..3edda1f13f7b 100755
> > --- a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> > +++ b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> > @@ -266,7 +266,10 @@ done
> > #
> > echo $error >
> $NOTIFIER_ERR_INJECT_DIR/actions/MEM_GOING_ONLINE/error
> > for memory in `hotpluggable_offline_memory`; do
> > - online_memory_expect_fail $memory
> > + online_memory_expect_fail $memory || {
> > + echo "online memory $memory: unexpected success"
>
> The functions themself already print an error, isn't it sufficient to set
> retval=1?
Indeed, this function is only called once. It is no need to add the log info.
>
> > + retval=1
> > + }
> > done
> >
> > #
> > @@ -274,7 +277,10 @@ done
> > #
> > echo 0 >
> $NOTIFIER_ERR_INJECT_DIR/actions/MEM_GOING_ONLINE/error
> > for memory in `hotpluggable_offline_memory`; do
> > - online_memory_expect_success $memory
> > + online_memory_expect_success $memory || {
> > + echo "online memory $memory: unexpected fail"
> > + retval=1
> > + }
> > done
> >
> > #
> > @@ -283,7 +289,10 @@ done
> > echo $error >
> $NOTIFIER_ERR_INJECT_DIR/actions/MEM_GOING_OFFLINE/error
> > for memory in `hotpluggable_online_memory`; do
> > if [ $((RANDOM % 100)) -lt $ratio ]; then
> > - offline_memory_expect_fail $memory
> > + offline_memory_expect_fail $memory || {
> > + echo "offline memory $memory: unexpected success"
> > + retval=1
> > + }
>
> These functions return 0 if the result is as expected and 1 if the result is
> unexpected.
>
> ... but wouldn't we evaluate the right hand side only if the result is "0" --
> expected? I might be wrong.
>
Yes, if offline_memory_expect_fail's return value is not zero, then it will set 'retval=1'
>
> Wouldn't it be simpler do it as in "Online all hot-pluggable memory again"
>
> if ! online_memory_expect_success $memory; then
> retval=1
> fi
>
> (similarly adjusting the function name)
I will send a new version of the patch to fix it.
Kind regards,
Gongyi
In test_sockmap.c, the testcase sets socket nonblock first, and then
calls select() and recvmsg() to receive data.
If some error occur, nonblock setting will make recvmsg() return
immediately, rather than blocking forever.
However, the way to call fcntl() to set nonblock is wrong.
To set socket noblock, we need to use
> fcntl(fd, F_SETFL, O_NONBLOCK);
rather than:
> fcntl(fd, O_NONBLOCK);
Signed-off-by: Qiao Ma <mqaio(a)linux.alibaba.com>
---
tools/testing/selftests/bpf/test_sockmap.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/test_sockmap.c b/tools/testing/selftests/bpf/test_sockmap.c
index 0fbaccdc8861..abb4102f33b0 100644
--- a/tools/testing/selftests/bpf/test_sockmap.c
+++ b/tools/testing/selftests/bpf/test_sockmap.c
@@ -598,7 +598,12 @@ static int msg_loop(int fd, int iov_count, int iov_length, int cnt,
struct timeval timeout;
fd_set w;
- fcntl(fd, fd_flags);
+ err = fcntl(fd, F_SETFL, fd_flags);
+ if (err < 0) {
+ perror("fcntl failed");
+ goto out_errno;
+ }
+
/* Account for pop bytes noting each iteration of apply will
* call msg_pop_data helper so we need to account for this
* by calculating the number of apply iterations. Note user
--
1.8.3.1
For this patchset, test cases of the qdisc modules are added to the
tc-testing test suite.
After a test case is added locally, the test result is as follows:
./tdc.py -c atm
ok 1 7628 - Create ATM with default setting
ok 2 390a - Delete ATM with valid handle
ok 3 32a0 - Show ATM class
ok 4 6310 - Dump ATM stats
./tdc.py -c choke
ok 1 8937 - Create CHOKE with default setting
ok 2 48c0 - Create CHOKE with min packet setting
ok 3 38c1 - Create CHOKE with max packet setting
ok 4 234a - Create CHOKE with ecn setting
ok 5 4380 - Create CHOKE with burst setting
ok 6 48c7 - Delete CHOKE with valid handle
ok 7 4398 - Replace CHOKE with min setting
ok 8 0301 - Change CHOKE with limit setting
./tdc.py -c codel
ok 1 983a - Create CODEL with default setting
ok 2 38aa - Create CODEL with limit packet setting
ok 3 9178 - Create CODEL with target setting
ok 4 78d1 - Create CODEL with interval setting
ok 5 238a - Create CODEL with ecn setting
ok 6 939c - Create CODEL with ce_threshold setting
ok 7 8380 - Delete CODEL with valid handle
ok 8 289c - Replace CODEL with limit setting
ok 9 0648 - Change CODEL with limit setting
./tdc.py -c etf
ok 1 34ba - Create ETF with default setting
ok 2 438f - Create ETF with delta nanos setting
ok 3 9041 - Create ETF with deadline_mode setting
ok 4 9a0c - Create ETF with skip_sock_check setting
ok 5 2093 - Delete ETF with valid handle
./tdc.py -c fq
ok 1 983b - Create FQ with default setting
ok 2 38a1 - Create FQ with limit packet setting
ok 3 0a18 - Create FQ with flow_limit setting
ok 4 2390 - Create FQ with quantum setting
ok 5 845b - Create FQ with initial_quantum setting
ok 6 9398 - Create FQ with maxrate setting
ok 7 342c - Create FQ with nopacing setting
ok 8 6391 - Create FQ with refill_delay setting
ok 9 238b - Create FQ with low_rate_threshold setting
ok 10 7582 - Create FQ with orphan_mask setting
ok 11 4894 - Create FQ with timer_slack setting
ok 12 324c - Create FQ with ce_threshold setting
ok 13 424a - Create FQ with horizon time setting
ok 14 89e1 - Create FQ with horizon_cap setting
ok 15 32e1 - Delete FQ with valid handle
ok 16 49b0 - Replace FQ with limit setting
ok 17 9478 - Change FQ with limit setting
./tdc.py -c gred
ok 1 8942 - Create GRED with default setting
ok 2 5783 - Create GRED with grio setting
ok 3 8a09 - Create GRED with limit setting
ok 4 48cb - Create GRED with ecn setting
ok 5 763a - Change GRED setting
ok 6 8309 - Show GRED class
./tdc.py -c hhf
ok 1 4812 - Create HHF with default setting
ok 2 8a92 - Create HHF with limit setting
ok 3 3491 - Create HHF with quantum setting
ok 4 ba04 - Create HHF with reset_timeout setting
ok 5 4238 - Create HHF with admit_bytes setting
ok 6 839f - Create HHF with evict_timeout setting
ok 7 a044 - Create HHF with non_hh_weight setting
ok 8 32f9 - Change HHF with limit setting
ok 9 385e - Show HHF class
./tdc.py -c pfifo_fast
ok 1 900c - Create pfifo_fast with default setting
ok 2 7470 - Dump pfifo_fast stats
ok 3 b974 - Replace pfifo_fast with different handle
ok 4 3240 - Delete pfifo_fast with valid handle
ok 5 4385 - Delete pfifo_fast with invalid handle
./tdc.py -c plug
ok 1 3289 - Create PLUG with default setting
ok 2 0917 - Create PLUG with block setting
ok 3 483b - Create PLUG with release setting
ok 4 4995 - Create PLUG with release_indefinite setting
ok 5 389c - Create PLUG with limit setting
ok 6 384a - Delete PLUG with valid handle
ok 7 439a - Replace PLUG with limit setting
ok 8 9831 - Change PLUG with limit setting
./tdc.py -c sfb
ok 1 3294 - Create SFB with default setting
ok 2 430a - Create SFB with rehash setting
ok 3 3410 - Create SFB with db setting
ok 4 49a0 - Create SFB with limit setting
ok 5 1241 - Create SFB with max setting
ok 6 3249 - Create SFB with target setting
ok 7 30a9 - Create SFB with increment setting
ok 8 239a - Create SFB with decrement setting
ok 9 9301 - Create SFB with penalty_rate setting
ok 10 2a01 - Create SFB with penalty_burst setting
ok 11 3209 - Change SFB with rehash setting
ok 12 5447 - Show SFB class
./tdc.py -c sfq
ok 1 7482 - Create SFQ with default setting
ok 2 c186 - Create SFQ with limit setting
ok 3 ae23 - Create SFQ with perturb setting
ok 4 a430 - Create SFQ with quantum setting
ok 5 4539 - Create SFQ with divisor setting
ok 6 b089 - Create SFQ with flows setting
ok 7 99a0 - Create SFQ with depth setting
ok 8 7389 - Create SFQ with headdrop setting
ok 9 6472 - Create SFQ with redflowlimit setting
ok 10 8929 - Show SFQ class
./tdc.py -c skbprio
ok 1 283e - Create skbprio with default setting
ok 2 c086 - Create skbprio with limit setting
ok 3 6733 - Change skbprio with limit setting
ok 4 2958 - Show skbprio class
./tdc.py -c taprio
ok 1 ba39 - Add taprio Qdisc to multi-queue device (8 queues)
ok 2 9462 - Add taprio Qdisc with multiple sched-entry
ok 3 8d92 - Add taprio Qdisc with txtime-delay
ok 4 d092 - Delete taprio Qdisc with valid handle
ok 5 8471 - Show taprio class
ok 6 0a85 - Add taprio Qdisc to single-queue device
./tdc.py -c tbf
ok 1 6430 - Create TBF with default setting
ok 2 0518 - Create TBF with mtu setting
ok 3 320a - Create TBF with peakrate setting
ok 4 239b - Create TBF with latency setting
ok 5 c975 - Create TBF with overhead setting
ok 6 948c - Create TBF with linklayer setting
ok 7 3549 - Replace TBF with mtu
ok 8 f948 - Change TBF with latency time
ok 9 2348 - Show TBF class
./tdc.py -c teql
ok 1 84a0 - Create TEQL with default setting
ok 2 7734 - Create TEQL with multiple device
ok 3 34a9 - Delete TEQL with valid handle
ok 4 6289 - Show TEQL stats
---
v2: modify subject prefix
---
Zhengchao Shao (15):
selftests/tc-testing: add selftests for atm qdisc
selftests/tc-testing: add selftests for choke qdisc
selftests/tc-testing: add selftests for codel qdisc
selftests/tc-testing: add selftests for etf qdisc
selftests/tc-testing: add selftests for fq qdisc
selftests/tc-testing: add selftests for gred qdisc
selftests/tc-testing: add selftests for hhf qdisc
selftests/tc-testing: add selftests for pfifo_fast qdisc
selftests/tc-testing: add selftests for plug qdisc
selftests/tc-testing: add selftests for sfb qdisc
selftests/tc-testing: add selftests for sfq qdisc
selftests/tc-testing: add selftests for skbprio qdisc
selftests/tc-testing: add selftests for taprio qdisc
selftests/tc-testing: add selftests for tbf qdisc
selftests/tc-testing: add selftests for teql qdisc
.../tc-testing/tc-tests/qdiscs/atm.json | 94 +++++
.../tc-testing/tc-tests/qdiscs/choke.json | 188 +++++++++
.../tc-testing/tc-tests/qdiscs/codel.json | 211 ++++++++++
.../tc-testing/tc-tests/qdiscs/etf.json | 117 ++++++
.../tc-testing/tc-tests/qdiscs/fq.json | 395 ++++++++++++++++++
.../tc-testing/tc-tests/qdiscs/gred.json | 164 ++++++++
.../tc-testing/tc-tests/qdiscs/hhf.json | 210 ++++++++++
.../tc-tests/qdiscs/pfifo_fast.json | 119 ++++++
.../tc-testing/tc-tests/qdiscs/plug.json | 188 +++++++++
.../tc-testing/tc-tests/qdiscs/sfb.json | 279 +++++++++++++
.../tc-testing/tc-tests/qdiscs/sfq.json | 232 ++++++++++
.../tc-testing/tc-tests/qdiscs/skbprio.json | 95 +++++
.../tc-testing/tc-tests/qdiscs/taprio.json | 135 ++++++
.../tc-testing/tc-tests/qdiscs/tbf.json | 211 ++++++++++
.../tc-testing/tc-tests/qdiscs/teql.json | 97 +++++
15 files changed, 2735 insertions(+)
create mode 100644 tools/testing/selftests/tc-testing/tc-tests/qdiscs/atm.json
create mode 100644 tools/testing/selftests/tc-testing/tc-tests/qdiscs/choke.json
create mode 100644 tools/testing/selftests/tc-testing/tc-tests/qdiscs/codel.json
create mode 100644 tools/testing/selftests/tc-testing/tc-tests/qdiscs/etf.json
create mode 100644 tools/testing/selftests/tc-testing/tc-tests/qdiscs/fq.json
create mode 100644 tools/testing/selftests/tc-testing/tc-tests/qdiscs/gred.json
create mode 100644 tools/testing/selftests/tc-testing/tc-tests/qdiscs/hhf.json
create mode 100644 tools/testing/selftests/tc-testing/tc-tests/qdiscs/pfifo_fast.json
create mode 100644 tools/testing/selftests/tc-testing/tc-tests/qdiscs/plug.json
create mode 100644 tools/testing/selftests/tc-testing/tc-tests/qdiscs/sfb.json
create mode 100644 tools/testing/selftests/tc-testing/tc-tests/qdiscs/sfq.json
create mode 100644 tools/testing/selftests/tc-testing/tc-tests/qdiscs/skbprio.json
create mode 100644 tools/testing/selftests/tc-testing/tc-tests/qdiscs/taprio.json
create mode 100644 tools/testing/selftests/tc-testing/tc-tests/qdiscs/tbf.json
create mode 100644 tools/testing/selftests/tc-testing/tc-tests/qdiscs/teql.json
--
2.17.1
Hi Linus,
This change fixes out-of-tree builds for Landlock tests, which was
initially identified here:
https://lore.kernel.org/r/CADYN=9JM1nnjC9LypHqrz7JJjbZLpm8rArDUy4zgYYrajErB…
Please pull this Landlock fix for v6.0-rc7 . This change merged
cleanly with your tree, and have been successfully tested in the latest
linux-next releases for a week.
Regards,
Mickaël
--
The following changes since commit 80e78fcce86de0288793a0ef0f6acf37656ee4cf:
Linux 6.0-rc5 (2022-09-11 16:22:01 -0400)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux.git tags/landlock-6.0-rc7
for you to fetch changes up to a52540522c9541bfa3e499d2edba7bc0ca73a4ca:
selftests/landlock: Fix out-of-tree builds (2022-09-14 16:37:38 +0200)
----------------------------------------------------------------
Landlock fix for v6.0-rc7
----------------------------------------------------------------
Mickaël Salaün (1):
selftests/landlock: Fix out-of-tree builds
tools/testing/selftests/landlock/Makefile | 19 ++++++++++---------
tools/testing/selftests/lib.mk | 4 ++++
2 files changed, 14 insertions(+), 9 deletions(-)
It looks like this test has been accidentally dropped when resolving
conflicts in this Makefile.
Most probably because there were 3 different patches modifying this file
in parallel:
commit 152e8ec77640 ("selftests/bonding: add a test for bonding lladdr target")
commit bbb774d921e2 ("net: Add tests for bonding and team address list management")
commit 2ffd57327ff1 ("selftests: bonding: cause oops in bond_rr_gen_slave_id")
The first one was applied in 'net-next' while the two other ones were
recently applied in the 'net' tree.
But that's alright, easy to fix by re-adding the missing one!
Fixes: 0140a7168f8b ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net")
Signed-off-by: Matthieu Baerts <matthieu.baerts(a)tessares.net>
---
tools/testing/selftests/drivers/net/bonding/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/drivers/net/bonding/Makefile b/tools/testing/selftests/drivers/net/bonding/Makefile
index d14846fcf3d1..e9dab5f9d773 100644
--- a/tools/testing/selftests/drivers/net/bonding/Makefile
+++ b/tools/testing/selftests/drivers/net/bonding/Makefile
@@ -4,6 +4,7 @@
TEST_PROGS := \
bond-arp-interval-causes-panic.sh \
bond-break-lacpdu-tx.sh \
+ bond-lladdr-target.sh \
dev_addr_lists.sh
TEST_FILES := lag_lib.sh
base-commit: d05d9eb79d0cd0f7a978621b4a56a1f2db444f86
--
2.37.2
The livepatch kselftests rely on comparing expected and actual output
from such commands as sysctl. A recent commit in procps-ng v4.0.0 [1]
changed sysctl's output to emit key pathnames like:
sysctl: setting key "/proc/sys/kernel/ftrace_enabled": Device or resource busy
versus previous dotted output:
sysctl: setting key "kernel.ftrace_enabled": Device or resource busy
The modification in output was later reverted [2], but since the change
has been tagged in procps-ng v4.0.0, update the livepatch kselftest to
handle either case.
[1] https://gitlab.com/procps-ng/procps/-/commit/6389deca5bf667f5fab5912acde78b…
[2] https://gitlab.com/procps-ng/procps/-/commit/b159c198c9160a8eb13254e2b631d0…
Reported-by: Dennis(Zhuoheng) Li <denli(a)redhat.com>
Signed-off-by: Joe Lawrence <joe.lawrence(a)redhat.com>
---
tools/testing/selftests/livepatch/functions.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/livepatch/functions.sh b/tools/testing/selftests/livepatch/functions.sh
index 9230b869371d..d5001c9eb72e 100644
--- a/tools/testing/selftests/livepatch/functions.sh
+++ b/tools/testing/selftests/livepatch/functions.sh
@@ -86,7 +86,7 @@ function set_ftrace_enabled() {
if [[ "$result" != "$1" ]] ; then
if [[ $can_fail -eq 1 ]] ; then
- echo "livepatch: $err" > /dev/kmsg
+ echo "livepatch: $err" | sed 's#/proc/sys/kernel/#kernel.#' > /dev/kmsg
return
fi
--
2.26.3
Dzień dobry,
kontaktuję się z Państwem, ponieważ chciałbym zaproponować wygodne rozwiązanie, które umożliwi Państwa firmie stabilny rozwój.
Konkurencyjne otoczenie wymaga ciągłego ulepszania i poszerzenia oferty, co z kolei wiąże się z koniecznością inwestowania. Brak odpowiedniego kapitału poważnie ogranicza tempo rozwoju firmy.
Od wielu lat z powodzeniem pomagam firmom w uzyskaniu najlepszej formy finansowania z banku oraz UE. Mam stałych Klientów, którzy nadal chętnie korzystają z moich usług, a także polecają je innym.
Czy chcieliby Państwo skorzystać z pomocy wykwalifikowanego i doświadczonego doradcy finansowego?
Pozdrawiam
Jakub Olejniczak