Commit Graph

148 Commits

Author SHA1 Message Date
kre
79eedfcd84 Do the previous test a better way - for a file, test is generally
adequate, but for a device, we really need to actually try opening
it to determine that it is possible - so do the test that way, then
if the open succeeds once, assume it will the second time (which then
holds it open.)
2017-07-25 22:28:22 +00:00
kre
ddab1f6e3b Correct oversight in previous ... redirecting into a compound statement
causes the shell to exit if the redirect fails (posix says "may exit"
and /bin/sh does - maybe should give that more thought) - which will
happen if /dev/pad0 does not exist, causing a very messy test abort
(the shell running the test is not supposed to just go away).  So
check tha the device exista and is readable before attempting to open it.

Problem brought to my attention by nat@ - thanks...
2017-07-25 21:25:03 +00:00
kre
ae98bc7d08 NFC: Typo in a comment corrected. 2017-07-18 13:17:37 +00:00
kre
a94bbc243b Make sure that the open of /dev/pad0 has succeeded (or at the very
least been attempted) before attempting to open /dev/mixer to determine
if the system being tested has audio or not.  Leaving this for the background
cat command to do causes a race between that command and the parent sh.
Move this code to a helper function to avoid duplicating it.

Also avoid attempting to kill the background cat if it was never created.
The kill is likely unnecessary anyway, ATF seems to clean up processes
like that one without assistance.   Which is a good thing, as the kill
does not happen if the test is skipped, or fails.
2017-07-18 12:40:57 +00:00
nat
27ecfe9c27 As pad devices are now created on demand - pad has to be open for a
corresponding mixer to be available.
2017-07-03 09:08:35 +00:00
martin
b40441be27 In the -m32 test, additionally test profiled binaries. 2017-05-31 11:08:35 +00:00
martin
4fcb013cbf Add (currently failing) test cases for profiled programs. 2017-05-18 10:29:47 +00:00
kamil
d1be05c0a9 Add new ATF C++ tests in usr.bin/c++: t_static_destructor
These tests are cloned from t_cxxruntime and check proper order of destructor
calls. They must be reported in reverse order of constructor completion.

Added tests:
 - static_destructor
 - static_destructor_pic
 - static_destructor_pie
 - static_destructor32

This test file replaces src/regress/usr.bin/c++/static_destructor.
2017-05-14 02:02:25 +00:00
kamil
179f19cf82 Use more C++ sugar in t_cxxruntime (ATF test) 2017-05-14 01:13:44 +00:00
kamil
9fab767d88 Add new ATF C++ tests in usr.bin/c++
These tests are cloned from t_hello and use c++ runtime basic functions.

Added tests:
 - hello
 - hello_pic
 - hello_pie
 - hello32
2017-05-14 01:03:21 +00:00
kamil
b971227c60 Add new c++ ATF tests in usr.bin/c++: t_hello
This is a copy of t_hello from usr.bin/cc.

Added tests:
 - hello
 - hello_pic
 - hello_pie
 - hello32

These tests do not use c++ runtime library functions.

Protect these tests with MKCXX.
2017-05-14 00:07:07 +00:00
kamil
4dde76f99d Correct hellp_pic ATF test in usr.bin/cc
Drop "-dPIC", this is misspelled "-DPIC" option for libtool.
Enhance code example to be more pedantic.
2017-05-13 23:51:39 +00:00
kre
dfcb546256 If we are using the pad audio device, there must be a process with
the corresponding pad device open, or we get EIO from audio accesses

Explained and fix provided by Nathanial Sloss <nat@n.o>

Note: if we are testing and using real audio hardware, the open
of /dev/pad0 is irrelevant (but harmless, so we don't attempt to
check) and what's more it doesn't matter if it succeeds or fails.

If we're testing under qemu (or any other situation where the only
audio "hardware" is pad) then the open will work, and there should be
no more EIO.

If there is no audio hardware of any kind on the system being tested,
the attempt top open /dev/mixer should fail, and the test will be
skipped.
2017-04-20 00:17:11 +00:00
christos
48c8a60c2e new test 2017-03-06 23:07:42 +00:00
christos
47f9cf0422 add builtin_offsetof 2017-03-06 21:02:47 +00:00
christos
b811ddbd72 add a test for a typeof cast 2017-03-06 12:00:27 +00:00
kre
71b606ef4e Drop the test for QEMU and instead skip relevant tests when /dev/mixer
can't be opened (which more accurately reflects when mixerctl is going
to fail...)

Based upon an idea from Andreas Gustafsson (gson@) - except that using
/dev/audio0 for this purpose doesn't work, if the only audio device
configured is pad0 an open of audio fails with EIO (???)

While here, perpare for the updated mixerctl coming soon to a repository
near you...
	Use correct usage in the test of a bogus -d arg (otherwise the
		new mixerctl will complain about usage, and never even
		attempt to open the bogus device)
	Don't require /dev/mixer for the noargs -> generate usage msg
		test ... this will now generate a failing test with the
		old mixerctl if there is no working /dev/mixer, but
		that mixerctl won't be around much longer.
2017-02-23 14:01:37 +00:00
kre
700ea9d267 Limit previous to the i386 qemu kernels, the tests work on amd64 and sparc
(which have some audio configured.)
2017-02-23 02:28:10 +00:00
kre
e4eeed67d9 Skip most of the mixerctl tests when running under QEMU (assumed to be for ATF)
as the kernel that runs them has no audio (and no mixers) configured.

The usage message test might be returned some day if /usr/bin/mixerctl
gets modified so it doesn't attempt to open the device (and error out)
in cases where the device isn't actually going to be used (and -d wasn't
given to set the device name explicitly).
2017-02-23 02:09:24 +00:00
kre
697c0e2acf Ugh... fix a last minute fix that went horribly wrong! 2017-02-21 21:22:45 +00:00
kre
67cef682dd PR bin/50934
Add a test program for the bug described in this PR.
This is the first pkill/pgrep/prenice test (more would be good!)

This test has been confirmed to work once the bug described in the PR
has been fixed, so the test is not marked "expected to fail" even
though initially that is what should happen.

Note: the test cana also fail if the system running the tests happens
to be running processes with names that match the patterns searched for
by the test, other than the test program itself.  This is expected to be
unlikely.
2017-02-21 10:40:30 +00:00
christos
8684dbb301 PR/51875: Ngie Cooper: portability fixes 2017-01-14 20:43:52 +00:00
christos
f0970fd0b2 mixerctl tests from Charlotte Koch 2017-01-02 15:40:09 +00:00
abhinav
6cddff1a99 Add tests for uniq(1) based on the example test cases provided in the POSIX man page.
Ok christos
2016-10-22 14:13:39 +00:00
christos
eb8cf8dd65 house-cleaning 2016-08-28 15:59:15 +00:00
christos
dd0e0080d2 adjust to current config format 2016-08-27 12:08:14 +00:00
christos
080051aa7f Add union cast test 2016-08-19 10:21:50 +00:00
christos
fa75a57426 new test for struct that only has anon members, and that the size of struct
is computer right.
2016-08-18 14:45:56 +00:00
agc
83432fa6b8 remove some unused test cases 2016-06-01 14:52:56 +00:00
agc
6d27eeee35 Use human2atf to generate a t_netpgpverify.sh script which is half the
size of the previous one (using on-the-fly gzip compression), and includes
more cases (including a gpg-signed file for cross-testing purposes).

Add the appropriate Testspec file.
2016-06-01 06:39:11 +00:00
gson
5973801c0c Add regression tests for some past gdb bugs. 2016-04-08 10:09:16 +00:00
christos
a34d3aeabd Add test for PR/49872 2016-04-05 00:48:53 +00:00
gson
43ed5fd66c Fix typo 2016-04-03 14:41:30 +00:00
christos
40c99df3a6 Add an anonymous struct test 2015-10-14 16:32:55 +00:00
uebayasi
8b6b28e153 Catch up with the current, generated Makefile format. 2015-10-04 07:59:47 +00:00
christos
862f3563b3 new test 2015-07-29 18:26:15 +00:00
christos
198668b6a8 new c99 init test found by xorg's Iconify.c 2015-07-28 18:05:19 +00:00
christos
6aa5718835 new test. 2015-07-01 15:36:44 +00:00
christos
2a8cfbd271 one t in literal. 2015-05-11 19:37:51 +00:00
christos
94ac2a41a2 add one more test 2015-05-11 17:21:32 +00:00
christos
a2bce09441 add test for typename as a function param 2015-04-03 21:37:26 +00:00
martin
dfdb00a60a Make the dummy data that we expect to go into .data section bigger,
otherwise on e.g. alpha it goes into the "small objects data" .sdata
section, which confuses the matching done in this test.
2015-02-17 11:51:04 +00:00
martin
5f67668838 Mark the failing tests as expected failure and point to PR toolchain/49085. 2015-01-27 12:57:14 +00:00
uebayasi
867e9b4f2b config(1): Fix test breakage
Now config(1) checks the content of $S/conf/Makefile.kern.inc.  Install it
into config(1) test directory to fix test.  Noticed by Martin Husemann.
2014-12-20 07:02:25 +00:00
agc
996632d6d1 Since the netpgpverify rewrite to have no external pre-requisites, the
output format for signatures has changed cosmetically (mainly
whitespace changes).  Re-format all the test cases so that the tests
now pass again with the new output format:

	Tests root: /usr/tests/usr.bin/netpgpverify

	t_netpgpverify (1/1): 2 test cases
	    netpgpverify_dsa: [0.261980s] Passed.
	    netpgpverify_rsa: [0.237469s] Passed.
	[0.509571s]

	Summary for 1 test programs:
	    2 passed test cases.
	    0 failed test cases.
	    0 expected failed test cases.
	    0 skipped test cases.
2014-11-23 01:56:35 +00:00
christos
e45a1decc7 test for c99 flexible packed arrays 2014-11-20 21:18:47 +00:00
christos
e9101a47cf Add one more test 2014-11-20 20:52:15 +00:00
uebayasi
2db56cefe0 Handle warning messages. 2014-11-20 09:02:00 +00:00
uebayasi
b8860b296b Minor tweaks. 2014-11-16 04:47:18 +00:00
uebayasi
41543d65fd Test SORT() command. 2014-11-16 03:49:09 +00:00