Commit Graph

108 Commits

Author SHA1 Message Date
mrg f2b04ca083 implement 32-bit compat support for raidframe.
convert several raidframe ioctls to be bitsize idempotent so that
they work the same in 32 and 64 bit worlds, allowing netbsd32 to
configure and query raid properly.  remove useless 'row' in a few
places.  add COMPAT_80 and put the old ioctls there.

raidframeio.h:
  RAIDFRAME_TEST_ACC
  - remove, unused
  RAIDFRAME_GET_COMPONENT_LABEL
  - convert to label not pointer to label
  RAIDFRAME_CHECK_RECON_STATUS_EXT
  RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT
  RAIDFRAME_CHECK_COPYBACK_STATUS_EXT
  - convert to progress info not pointer to info
  RAIDFRAME_GET_INFO
  - version entirely.
raidframevar.h:
  - rf_recon_req{} has row, flags and raidPtr removed (they're
    not a useful part of this interface.)
  - RF_Config_s{} and RF_DeviceConfig_s{} have numRow/rows removed.
  - RF_RaidDisk_s{} is re-ordered slightly to fix alignment
    padding - the actual data was already OK.
  - InstallSpareTable() loses row argument

rf_compat32.c has code for RF_Config_s{} in 32 bit mode, used
by RAIDFRAME_CONFIGURE and RAIDFRAME_GET_INFO32.

rf_compat80.c has code for rf_recon_req{}, RF_RaidDisk_s{} and
RF_DeviceConfig_s{} to handle RAIDFRAME_FAIL_DISK,
RAIDFRAME_GET_COMPONENT_LABEL, RAIDFRAME_CHECK_RECON_STATUS_EXT,
RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT,
RAIDFRAME_CHECK_COPYBACK_STATUS_EXT, RAIDFRAME_GET_INFO.

move several of the per-ioctl code blocks into separate functions.

add rf_recon_req_internal{} to replace old usage of global
rf_recon_req{} that had unused void * in the structure, ruining
it's 32/64 bit ABI.

add missing case for RAIDFRAME_GET_INFO50.

adjust raid tests to use the new .conf format, and add a case to
test the old method as well.

raidctl:
deal with lack of 'row' members in a couple of places.
fail request no longer takes row.
handle "START array" sections with just "numCol numSpare", ie
no "numRow" specified.  for now, generate old-style configuration
but update raidctl.8 to specify the new style (keeping reference
to the old style.)

note that: RF_ComponentLabel_s::{row,num_rows} and
RF_SingleComponent_s::row are obsolete but not removed yet.
2018-01-18 00:32:48 +00:00
bouyer 878cb1cfc5 Fix fallout from hid factorisation:
- need to install sys/dev/hid/hid.h for userland
- include it where needed - most of the time in place if usb/usbhid.h
2017-12-10 20:38:13 +00:00
riastradh ef315f7931 Remove MKCRYPTO option.
Originally, MKCRYPTO was introduced because the United States
classified cryptography as a munition and restricted its export.  The
export controls were substantially relaxed fifteen years ago, and are
essentially irrelevant for software with published source code.

In the intervening time, nobody bothered to remove the option after
its motivation -- the US export restriction -- was eliminated.  I'm
not aware of any other operating system that has a similar option; I
expect it is mainly out of apathy for churn that we still have it.
Today, cryptography is an essential part of modern computing -- you
can't use the internet responsibly without cryptography.

The position of the TNF board of directors is that TNF makes no
representation that MKCRYPTO=no satisfies any country's cryptography
regulations.

My personal position is that the availability of cryptography is a
basic human right; that any local laws restricting it to a privileged
few are fundamentally immoral; and that it is wrong for developers to
spend effort crippling cryptography to work around such laws.

As proposed on tech-crypto, tech-security, and tech-userlevel to no
objections:

https://mail-index.netbsd.org/tech-crypto/2017/05/06/msg000719.html
https://mail-index.netbsd.org/tech-security/2017/05/06/msg000928.html
https://mail-index.netbsd.org/tech-userlevel/2017/05/06/msg010547.html

P.S.  Reviewing all the uses of MKCRYPTO in src revealed a lot of
*bad* crypto that was conditional on it, e.g. DES in telnet...  That
should probably be removed too, but on the grounds that it is bad,
not on the grounds that it is (nominally) crypto.
2017-05-21 15:28:36 +00:00
martin 55e87a2ae4 Do not assume an all-zeroes disk label will read back as a disk with
an 'a'  partition covering the whole disk, instead use the raw partition.
Also skip this test if the fss device is not available.
With lots of help from pgoyette.
2017-03-15 10:53:15 +00:00
nat 712047004e Revert to previous. Audio passes the test properly again. 2017-01-27 05:14:54 +00:00
christos c54cb81102 Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.
2017-01-13 21:30:39 +00:00
nat baaaeb8681 Update test output to reflect audio changes. 2016-12-11 08:09:29 +00:00
alnsn 826f45ea87 AES XTS unit tests should now pass. 2016-12-11 00:23:44 +00:00
alnsn e771598c7d Switch to CHECK_LIBC for writing. 2016-11-24 22:42:16 +00:00
alnsn 0fb91146db Add 3des-cbc tests with 192 bits key. 2016-11-11 07:39:58 +00:00
alnsn b0f6fce42a Add blowfish-cbc tests for 128, 256 and 448 bits keys. 2016-11-10 23:44:36 +00:00
alnsn 911f4379f3 Add aes-cbc tests. 2016-11-09 22:01:15 +00:00
alnsn 54ef2b1942 Don't use mktemp. 2016-11-07 18:11:45 +00:00
scole 282adaf8f0 Only build t_cgd_aes if MKCRYPTO==yes and MKRUMP==yes. 2016-11-07 16:33:37 +00:00
alnsn acc218101f Don't build t_cgd_aes if ${MKCRYPTO} == "no". 2016-11-06 21:29:54 +00:00
alnsn 838eb24361 Add tests for not-yet-committed cgd algorithm AES-XTS.
The tests are marked as expected failures.
2016-11-06 10:54:42 +00:00
nat 333b297cf7 pad(4) must be open before corresponding audio device is opened.
OK christos@
2016-10-15 07:08:06 +00:00
jakllsch d0b2f20734 These clock_subr tests are no longer expected to fail. 2016-08-17 12:06:49 +00:00
jakllsch 64d64ddcb3 tests for sys/dev/clock_subr.c 2016-08-14 14:55:41 +00:00
pgoyette 8d18247504 We don't have any FILES, so no need for a FILESDIR 2016-08-03 23:53:50 +00:00
pgoyette 64222d3a12 Mount the snapshot read-only; otherwise we get a nasty panic.
Re-order the clean-up steps to properly undo what we did.
2016-07-29 20:27:37 +00:00
pgoyette 0c0a621f71 Add a basic test for fss(4)
XXX For now, we just create required files (including mount-points)
XXX in the test's working directory.  Eventually someone with more
XXX rump-foo than I should create a fss rump-component and then update
XXX the test to run under rump.
2016-07-29 06:13:39 +00:00
pgoyette 7dc153cb5a Remove. Nothing here (or below) seems to refer to it, and it won't
work anyway due to the case of the 'l' in CPPFlAGS
2016-07-29 06:11:12 +00:00
jakllsch 2d9fbba46c Use rump_schedule() before calling things in the rump context.
Hopefully fixes these tests on all ports.
2016-05-05 17:40:26 +00:00
jakllsch 5c7aaf765b t_hid doesn't use rump correctly, and thus consistently fails; mark as such 2016-05-05 16:55:56 +00:00
jakllsch ffe5c1f16e Call rump_init() before using rump functionality.
This change should make these test cases consistently fail on all ports.

Related to PR kern/51096.
2016-05-02 17:24:06 +00:00
nat 449e51467a Fix soft volume audio distortion. OK jmcneil@.
Update atf pad expected output.
2016-02-26 13:08:28 +00:00
christos ffeb8dbf4e Define _KERNTYPES for things that need it. 2016-01-23 21:22:45 +00:00
christos 55808dd15a XXX: use unused variables. 2016-01-23 21:18:27 +00:00
jakllsch c38078a218 locate_item() doesn't need to have a flags argument, as the flags
are also in the hid item data structure.
2016-01-09 14:31:19 +00:00
jakllsch 03e19f6583 fix test program for hid item checks 2016-01-08 17:34:57 +00:00
jakllsch ecbab7a38a rework build of t_hid to be more reliable, while working around ATF cruddyness 2016-01-08 17:27:48 +00:00
jakllsch f9e98a931a Don't crash when the device's HID Report Descriptor Pops from an empty stack. 2016-01-07 16:10:49 +00:00
jakllsch 4887406fba Add tests for HID Parser Pop-on-empty-stack bug. 2016-01-07 15:58:23 +00:00
christos 2acf28e2e5 Unbreak the sun2 build: Don't use program-specific LDADD options because
those come after the general LDADD options and break static linking.
2016-01-06 15:34:54 +00:00
jakllsch 2ba22c9356 Add some tests for the kernel HID parser. 2016-01-05 17:22:38 +00:00
matt b9e582e94c Don't build tests that depend on RUMP if BSD_MK_COMPAT_FILE is defined. 2015-06-22 00:05:23 +00:00
pgoyette 7f8653d8a0 Include better diagnostic info when a required key value cannot be retrieved from envstat -x 2015-04-23 23:23:28 +00:00
pgoyette 8f2064710d When exiting, provide a reason. 2015-04-23 04:49:37 +00:00
martin 610137e5d4 Double the timeout (to 120s) for slower machines 2015-02-27 09:16:07 +00:00
pooka 0397f3a735 Move sysproxy support into a separate component, rumpkern_sysproxy,
instead of it being always provided by the rump kernel base.  This
move accomplishes two things:

1) it is no longer necessary to provide sysproxy hypercall stubs for
   platforms which do not want to use sysproxy
2) it is easier to reason about the security aspects, since configurations
   not linking the sysproxy component simply do not support remote
   system calls

discussed on rumpkernel-users
2015-01-07 22:24:03 +00:00
he f693807fd8 Fix static linking for the tests: -lrump is also used by -lrumpuser,
so we also need -lrump after -lrumpuser.  Fixes build for sun2.
2014-06-10 04:28:39 +00:00
he 68eb80a8fe When linking statically (as for sun2), need to list -lrump also
after -lrumpuser, because rump_pub_lwproc_switch is used in the
latter and defined in the former.
2014-06-09 18:22:05 +00:00
christos 7801950caf Include bsd.own.mk (hi pooka) 2014-04-26 18:53:21 +00:00
pooka 0159a35e80 obsolete the installed <rump/scsitest.h> header and make it private
to tests/dev/scsipi
2014-04-25 00:24:39 +00:00
pooka 37510bf29a CPPFLAGS for rump_private.h 2014-04-25 00:17:48 +00:00
pooka 8fa17e4756 scsitest is a SCSI target emulator used by one test, and has little
reason to get installed.  Make the component private to the test using
it and obsolete the installed one.

IOW, rename sys/rump/dev/lib/libscsitest -> tests/dev/scsipi/libscsitest
2014-04-24 21:46:44 +00:00
martin 1f299de05d The sh api calls it atf_expect_fail, while the c api calls it
atf_tc_expect_fail - this is shell, so fix the names accordingly.
XXX Why do they differ?
2013-04-14 16:07:46 +00:00
jmmv 371c38e8cf These tests are flaky so mark them as expected failures... when they fail.
See PR kern/47661.
2013-03-17 06:29:55 +00:00
martin 11175263ad The CD emulator has been fixed, no longer expect the test to die. 2013-03-15 16:18:49 +00:00