Page MenuHomeFreeBSD

testsUmbrella
ActivePublic

Recent Activity

Nov 18 2021

pnagato_protonmail.com added a comment to D26220: Improve test coverage for sbuf.

@ngie @lwhsu Hello, I found this on https://wiki.freebsd.org/JuniorJobs, Please close this. This is more involved than what i could comprehend from that page.

Nov 18 2021, 8:13 AM · tests

Nov 11 2021

mckusick closed D32736: Fix geom tests after argument changes.
Nov 11 2021, 8:12 PM · tests
kp added a comment to D32736: Fix geom tests after argument changes.

Sorry for my long delay.

I concur that it is my change that should be fixed, not these tests.

I believe that the correct fix is this:

diff --git a/sbin/geom/core/geom.c b/sbin/geom/core/geom.c
index 2e0d8683df49..0202be9a063e 100644
--- a/sbin/geom/core/geom.c
+++ b/sbin/geom/core/geom.c
@@ -445,7 +445,7 @@ set_flags(struct g_command *cmd)
 {
        unsigned flags = 0;

-       if ((cmd->gc_flags & G_FLAG_VERBOSE) != 0)
+       if ((cmd->gc_flags & G_FLAG_VERBOSE) != 0 && verbose)
                flags |= G_FLAG_VERBOSE;

        return (flags);
Nov 11 2021, 12:56 PM · tests

Nov 10 2021

mckusick added a comment to D32736: Fix geom tests after argument changes.

Sorry for my long delay.

Nov 10 2021, 11:53 PM · tests

Nov 4 2021

kp added a comment to D32736: Fix geom tests after argument changes.

Shouldn't the root cause be fixed (geom be revert back to non-verbose mode by default) in place of fixing the regression test ?

Nov 4 2021, 8:52 PM · tests
olivier added a comment to D32736: Fix geom tests after argument changes.

Shouldn't the root cause be fixed (geom be revert back to non-verbose mode by default) in place of fixing the regression test ?

Nov 4 2021, 7:03 PM · tests

Oct 29 2021

lwhsu added a comment to D32736: Fix geom tests after argument changes.

I am also checking this, but what I haven't figured out is that it seems these test cases don't execute geom utility commands with -v so it should not expect the output from verbose mode. Is there anything I missed that those test cases do enable the verbose flag?

Oct 29 2021, 5:34 PM · tests
asomers added a comment to D32736: Fix geom tests after argument changes.

Do these utilities always run in verbose mode now?

Oct 29 2021, 5:27 PM · tests
brd requested review of D32736: Fix geom tests after argument changes.
Oct 29 2021, 5:18 PM · tests

Mar 12 2021

arichardson added a member for tests: arichardson.
Mar 12 2021, 5:17 PM

Jan 12 2021

asomers closed D23193: ICMP checksum test: Fix for big endian.
Jan 12 2021, 2:10 AM · tests

Jan 11 2021

asomers added a comment to D23193: ICMP checksum test: Fix for big endian.

This review was approved in March last year. It seems all issues have been solved. Could anyone commit this?

Jan 11 2021, 7:05 PM · tests
fernando.valle_eldorado.org.br added a comment to D23193: ICMP checksum test: Fix for big endian.

This review was approved in March last year. It seems all issues have been solved. Could anyone commit this?

Jan 11 2021, 6:33 PM · tests

Oct 30 2020

ngie requested changes to D26220: Improve test coverage for sbuf.

This change does more than advertised in the CR description (which doesn't describe as much as the commit message should).

Oct 30 2020, 7:49 PM · tests
ngie updated subscribers of D26220: Improve test coverage for sbuf.
Oct 30 2020, 7:23 PM · tests

Oct 29 2020

lwhsu added a reviewer for D26220: Improve test coverage for sbuf: ngie.
Oct 29 2020, 2:40 AM · tests

Oct 13 2020

pnagato_protonmail.com added a comment to D26220: Improve test coverage for sbuf.

@jmg ping, please review..

Oct 13 2020, 9:46 PM · tests

Sep 19 2020

pnagato_protonmail.com added a comment to D26220: Improve test coverage for sbuf.

@imp if the test binary is run directly like this. We can see the assertion output.

./sbuf_core_test sbuf_new_negative_test_non_user_flags

sbuf_core_test: WARNING: Running test cases outside of kyua(1) is unsupported
sbuf_core_test: WARNING: No isolation nor timeout control is being applied; you may get unexpected failures; see atf-test-case(4)
expected_death: Non user flags cannot be specified
Assertion failed: (((flags & ~0x0000ffff) == 0)), function sbuf_new, file /usr/src/sys/kern/subr_sbuf.c, line 233.
Abort (core dumped)

@imp tried the do while.. & assert. In both cases kyua does not print to log file. I see the msg only when the binary is run standalone or a single test case is run. For e.g.

kyua debug sbuf_core_test:sbuf_new_negative_test
Assertion failed: ((length >= 0)), function sbuf_new, file /usr/src/sys/kern/subr_sbuf.c, line 231.
Process with PID 29505 exited with signal 6 and dumped core; attempting to gather stack trace
Cannot find GDB binary; builtin was 'gdb'
sbuf_core_test:sbuf_new_negative_test  ->  expected_failure: Buffer length cannot be negative

@imp I removed the output from the kyua log from this comment.

Sep 19 2020, 2:46 PM · tests

Sep 16 2020

pnagato_protonmail.com added a comment to D26220: Improve test coverage for sbuf.

@imp if the test binary is run directly like this. We can see the assertion output.

./sbuf_core_test sbuf_new_negative_test_non_user_flags

sbuf_core_test: WARNING: Running test cases outside of kyua(1) is unsupported
sbuf_core_test: WARNING: No isolation nor timeout control is being applied; you may get unexpected failures; see atf-test-case(4)
expected_death: Non user flags cannot be specified
Assertion failed: (((flags & ~0x0000ffff) == 0)), function sbuf_new, file /usr/src/sys/kern/subr_sbuf.c, line 233.
Abort (core dumped)
Sep 16 2020, 8:41 PM · tests
pnagato_protonmail.com added a comment to D26220: Improve test coverage for sbuf.

@imp if the test binary is run directly like this. We can see the assertion output.

Sep 16 2020, 7:31 AM · tests
pnagato_protonmail.com added a comment to D26220: Improve test coverage for sbuf.

atf_tc_expect_death("....") will print the reason. For e.g.

Sep 16 2020, 7:19 AM · tests
imp added a comment to D26220: Improve test coverage for sbuf.
In D26220#588231, @jmg wrote:

@jmg @imp I have seen other places where KASSERT was re-defined as

#define	KASSERT(exp,msg) assert((exp))

I think using assert should be used. It doesn't pollute stdout, generates a core dump, and is more obvious that there was a failure.

Thanks.

Sep 16 2020, 7:15 AM · tests
pnagato_protonmail.com added a comment to D26220: Improve test coverage for sbuf.

@jmg Please review.

Sep 16 2020, 7:15 AM · tests
pnagato_protonmail.com updated the diff for D26220: Improve test coverage for sbuf.

Add negative tests for sbuf_new

Sep 16 2020, 7:13 AM · tests

Sep 15 2020

jmg added a comment to D26220: Improve test coverage for sbuf.

@jmg @imp I have seen other places where KASSERT was re-defined as

#define	KASSERT(exp,msg) assert((exp))
Sep 15 2020, 6:41 PM · tests

Sep 12 2020

pnagato_protonmail.com added a comment to D26220: Improve test coverage for sbuf.
In D26220#584584, @jmg wrote:
In D26220#584521, @imp wrote:

@jmg @imp Need your input how to proceed on the sbuf_negative test.

I'm having trouble understanding its purpose. Maybe you could give a one or two sentence summary of what it should test?

@imp I am assuming the sbuf_new_negative_test is supposed to test for cases for which sbuf_new fails to create a sbuf.

From sys/kern/subr_sbuf.c

	KASSERT(length >= 0,
	    ("attempt to create an sbuf of negative length (%d)", length));
	KASSERT((flags & ~SBUF_USRFLAGMSK) == 0,
	    ("%s called with invalid flags", __func__));

or when SBMALLOC fails..

So, looking at the KASSERT, we may want to change how KASSERTs are compiled for userland. Right now it gets compiled to nothing, which means that there is nothing preventing userland from passing negative lengths and the like. We may want to think about making KASSERT call abort, but then some KASSERTs (like those in sbuf_new quoted above) need to be changed because aborting when length, which might be a user defined parameter seems like a bad idea.

Also, it looks like sbuf.9 doesn't document the KASSERT restrictions in sbuf_new, so a userland caller may accidentally generate a corrupted sbuf.

As for how to make sbuf fail due to malloc, I don't know.

@jmg i will skip the sbuf_new_negative_test for now. Please review the other tests.

Sep 12 2020, 5:43 PM · tests

Sep 3 2020

pnagato_protonmail.com added a comment to D26220: Improve test coverage for sbuf.
In D26220#584584, @jmg wrote:
In D26220#584521, @imp wrote:

@jmg @imp Need your input how to proceed on the sbuf_negative test.

I'm having trouble understanding its purpose. Maybe you could give a one or two sentence summary of what it should test?

@imp I am assuming the sbuf_new_negative_test is supposed to test for cases for which sbuf_new fails to create a sbuf.

From sys/kern/subr_sbuf.c

	KASSERT(length >= 0,
	    ("attempt to create an sbuf of negative length (%d)", length));
	KASSERT((flags & ~SBUF_USRFLAGMSK) == 0,
	    ("%s called with invalid flags", __func__));

or when SBMALLOC fails..

So, looking at the KASSERT, we may want to change how KASSERTs are compiled for userland. Right now it gets compiled to nothing, which means that there is nothing preventing userland from passing negative lengths and the like. We may want to think about making KASSERT call abort, but then some KASSERTs (like those in sbuf_new quoted above) need to be changed because aborting when length, which might be a user defined parameter seems like a bad idea.

Also, it looks like sbuf.9 doesn't document the KASSERT restrictions in sbuf_new, so a userland caller may accidentally generate a corrupted sbuf.

As for how to make sbuf fail due to malloc, I don't know.

Sep 3 2020, 7:27 AM · tests
pnagato_protonmail.com updated the diff for D26220: Improve test coverage for sbuf.

Skip sbuf_new_negative_test,implement sbuf_new_positive_test

Sep 3 2020, 7:25 AM · tests

Sep 2 2020

jmg added a comment to D26220: Improve test coverage for sbuf.
In D26220#584521, @imp wrote:

@jmg @imp Need your input how to proceed on the sbuf_negative test.

I'm having trouble understanding its purpose. Maybe you could give a one or two sentence summary of what it should test?

@imp I am assuming the sbuf_new_negative_test is supposed to test for cases for which sbuf_new fails to create a sbuf.

From sys/kern/subr_sbuf.c

	KASSERT(length >= 0,
	    ("attempt to create an sbuf of negative length (%d)", length));
	KASSERT((flags & ~SBUF_USRFLAGMSK) == 0,
	    ("%s called with invalid flags", __func__));

or when SBMALLOC fails..

Sep 2 2020, 6:50 PM · tests
pnagato_protonmail.com added a comment to D26220: Improve test coverage for sbuf.
In D26220#584521, @imp wrote:

@jmg @imp Need your input how to proceed on the sbuf_negative test.

I'm having trouble understanding its purpose. Maybe you could give a one or two sentence summary of what it should test?

Sep 2 2020, 5:47 PM · tests
imp added a comment to D26220: Improve test coverage for sbuf.

@jmg @imp Need your input how to proceed on the sbuf_negative test.

Sep 2 2020, 5:31 PM · tests

Sep 1 2020

pnagato_protonmail.com added a comment to D26220: Improve test coverage for sbuf.

@jmg @imp Need your input how to proceed on the sbuf_negative test.

Sep 1 2020, 6:22 PM · tests

Aug 28 2020

pnagato_protonmail.com requested review of D26220: Improve test coverage for sbuf.
Aug 28 2020, 5:33 PM · tests

Jul 8 2020

alfredo closed D23783: lib/libkvm: add kvm_read test.
Jul 8 2020, 6:59 PM · tests, PowerPC

Jul 7 2020

jhb accepted D23783: lib/libkvm: add kvm_read test.
Jul 7 2020, 4:21 PM · tests, PowerPC

Jul 6 2020

alfredo added a comment to D23783: lib/libkvm: add kvm_read test.

@ngie, @jhb do you think it's ok to merge now? Thanks!

Jul 6 2020, 8:53 PM · tests, PowerPC
alfredo updated the diff for D23783: lib/libkvm: add kvm_read test.

Remove call to internal API _kvm_err after reviewer's comment

Jul 6 2020, 8:51 PM · tests, PowerPC
alfredo updated the diff for D23783: lib/libkvm: add kvm_read test.

use kvm_open instead of kvm_open2

Jul 6 2020, 8:40 PM · tests, PowerPC

Jun 12 2020

alfredo added a reviewer for D23783: lib/libkvm: add kvm_read test: tests.
Jun 12 2020, 10:19 AM · tests, PowerPC

May 27 2020

lwhsu added a member for tests: lwhsu.
May 27 2020, 12:54 PM

May 26 2020

syrinx added a watcher for tests: syrinx.
May 26 2020, 7:12 PM

Apr 29 2020

olivier added a member for tests: olivier.
Apr 29 2020, 5:04 AM

Mar 25 2020

alfredo closed D24164: so_reuseport_lb_test: Changing the variable type of the optval parameter of the setsockopt function.
Mar 25 2020, 8:20 PM · tests, PowerPC

Mar 24 2020

alfredo accepted D24164: so_reuseport_lb_test: Changing the variable type of the optval parameter of the setsockopt function.

Looks good to me

Mar 24 2020, 2:24 PM · tests, PowerPC
melifaro accepted D24164: so_reuseport_lb_test: Changing the variable type of the optval parameter of the setsockopt function.
Mar 24 2020, 12:51 PM · tests, PowerPC
fernando.valle_eldorado.org.br updated the diff for D24164: so_reuseport_lb_test: Changing the variable type of the optval parameter of the setsockopt function.

Following @melifaro `s recommendations, type of variable changed to int, instead of unsigned int.

Mar 24 2020, 12:47 PM · tests, PowerPC
renato.riolino_eldorado.org.br added a comment to D23193: ICMP checksum test: Fix for big endian.

I agree with Renato. There's no way to test in_cksum on both endiannesses without using something complicated like qemu. The right approach is to checksum the same input on different platforms, and assert that the result is identical on all. That's what Renato's change does. @renato.riolino_eldorado.org.br I don't think you have a commit bit, right? If not, I can commit the change for you. But I don't have any BE hardware. Can you first confirm that with your change the tests pass on BE hardware on a newish build?

Mar 24 2020, 11:10 AM · tests
asomers accepted D23193: ICMP checksum test: Fix for big endian.

I agree with Renato. There's no way to test in_cksum on both endiannesses without using something complicated like qemu. The right approach is to checksum the same input on different platforms, and assert that the result is identical on all. That's what Renato's change does. @renato.riolino_eldorado.org.br I don't think you have a commit bit, right? If not, I can commit the change for you. But I don't have any BE hardware. Can you first confirm that with your change the tests pass on BE hardware on a newish build?

Mar 24 2020, 3:31 AM · tests

Mar 23 2020

melifaro added inline comments to D24164: so_reuseport_lb_test: Changing the variable type of the optval parameter of the setsockopt function.
Mar 23 2020, 2:45 PM · tests, PowerPC
fernando.valle_eldorado.org.br added inline comments to D24164: so_reuseport_lb_test: Changing the variable type of the optval parameter of the setsockopt function.
Mar 23 2020, 2:30 PM · tests, PowerPC