Closed jstancek closed 5 years ago
Hmm...this should be enabled via the defconfig file included in the testsuite, whose use is specified by the README. If you are going to make this optional, then we ought to do the same for the others as well, e.g. we likewise have dependencies on SCTP and the crypto user API for the extended_socket tests, and similar dependencies for the netlink_socket tests.
Could we just modify sockcreate.c to handle EAFNOSUPPORT as a non-error?
defconfig - I see, I guess we were lucky so far with RHEL kernels. I'd leave defconfig as recommended and address issues like this as we find them. It doesn't seem to happen that often.
EAFNOSUPPORT - That works too, though it felt like "implementation dependent" to me, because test_no_bluetooth_socket_t test then relies on evaluating permissions before supported protocol family - it needs to fail with error to pass the check.
Hmm...this should be enabled via the defconfig file included in the testsuite, whose use is specified by the README. If you are going to make this optional, then we ought to do the same for the others as well ...
This was my original take as well, and the reason I marked this as an RFE and not a BUG. At this point in time I think I would prefer to just keep the test suite the way it is unless it proves to be a significant problem.
See my previous comment, let's keep the test suite the way it is for now.
If kernel doesn't have bluetooth support compiled-in, this test fails - socket() returns EAFNOSUPPORT: ./sockcreate: socket(bluetooth/31, stream/1, default/0): Address family not supported by protocol not ok 13
Test 13 got: "256" (./test at line 90)
Expected: "0"
./test line 90 is: ok( $result, 0 );
./sockcreate: socket(bluetooth/31, stream/1, default/0): Permission denied
Add a setup check which tries to create bluetooth socket with no security context set. If that fails, skip all bluetooth tests.
Signed-off-by: Jan Stancek jstancek@redhat.com