Commit Graph

4886 Commits

Author SHA1 Message Date
mcf 013e6195ab Unset ESCDELAY in libcurses test director to ensure consistent results
Non-default values of ESCDELAY may result in unexpected test failures.
2021-06-10 07:21:07 +00:00
christos 381ab8c9c7 remove the kill in the trace code. 2021-06-09 21:09:20 +00:00
christos f4ff94b461 remove not required include files 2021-06-09 21:08:56 +00:00
christos a7b6ad49c9 1. Preallocate the patterns so that out of memory conditions don't happen
during their allocation, which the test cannot handle properly.
2. Enable building the test without atf so that we can easily debug with
   atf memory allocations interfering
3. Add memory tracing (disabled)
2021-06-09 20:48:37 +00:00
christos 9f4fca625f Good bye oabi! Tested building earmv7hf. 2021-06-07 17:11:16 +00:00
christos fa566a7940 Add more information for the malloc failure. 2021-06-07 11:45:35 +00:00
blymn 880393fc5e New tests and updates for corrected behaviour due to fix for PR56224
* Added extra testing to the addstr test to demonstrate bug described
  in PR#56224 and validate case when scrolling enabled still works.
* Fixed slk test, the slk_init output changed due to corrected wrapping,
  slk_restore no longer returns ERR probably due to addwchar no longer
  returning ERR when an implicit scroll was attempted when scrolling
  disabled.  Commented out the slk_wset test, this is now returning ERR
  instead of misbehaving, needs investigation.
2021-06-06 04:57:58 +00:00
gson 2a775ce64a Use the correct pathname when cleaning up the inner mount on test
failure.  Fixes the ATF crash reported in PR bin/56221, but not
the issue causing the test to fail in the first place.
2021-06-05 06:40:59 +00:00
blymn c22b5d7ca1 Convert % into %% in input string so printf won't barf 2021-06-05 06:23:48 +00:00
blymn 4bbbff78d1 Decouple the clear test from the addstr test, they should not be linked
together because they are not really related.
2021-06-05 06:13:36 +00:00
blymn 536401f05c Add new check file for the clear test. 2021-06-05 06:11:09 +00:00
blymn b1b304b3bc Fix debug_test so it actually works and does not do damage
* disable blind clearing of /tmp.  The comment says this is needed for getwin/putwin
  those tests need to be looked at to correct this.
* remove invalid -I option from director arguments for now.
* fix paths to executables so debug_test will work with installed versions by default
  the previous version was using the src tree locations but basedir was wrong for that.
2021-06-04 23:07:39 +00:00
christos bb9221f69f PR/56230: Don't try to use ifunc with arm and oabi 2021-06-04 15:37:48 +00:00
hannken d08ba6d24b Test "mountdhup" has to pass now. 2021-06-04 10:48:07 +00:00
christos 163a255287 PR/56230: Jan-Benedict Glaw: arm oabi does not and will not have ifunc support. 2021-06-03 20:17:37 +00:00
yamaguchi 8ccc16d5e6 Update test case.
The state of IPCP and IPv6CP is Closed when those are disabled.
2021-06-01 05:18:33 +00:00
joerg ea1995c1a3 Drop explicit -msecure-plt, it's the default for both clang and gcc. 2021-05-30 02:26:51 +00:00
rillig 7e868d5633 tests/lint: make test d_gcc_extension platform-independent
That test was intended to test the keywords '__extension__' and
'__typeof'.  The GCC builtin functions were just a side-effect.

These built-in functions generated error messages on platforms such as
amd64 where sizeof(long double) != sizeof(double), but not on others
such as sparc.

The current infrastructure for the lint tests cannot handle tests with
platform-dependent outcome.
2021-05-25 19:22:18 +00:00
rillig 8ee892733f tests/lint: make test 130 platform-independent
On 32-bit platforms such as i386 and sparc, sizeof(int) == sizeof(long),
which produced an additional unintended lint error message:

msg_130.c(78): error: duplicate case in switch: 4 [199]
2021-05-25 19:04:07 +00:00
cjep 3c486dbb8b The long lines test is now expected to pass 2021-05-25 11:55:42 +00:00
yamaguchi b119e5ab50 Added missing cleanup option
Fixes PR/56206
2021-05-25 00:38:30 +00:00
gson 31a46dc160 On mips, avoid deliberately executing an illegal instruction for now
because it causes GXemul to exit rather than generating a trap.  A bug
report has been sent to the GXemul author.
2021-05-24 10:44:06 +00:00
kre 8a7b619378 With the (very) recent changes to printf(1), a numeric conversion from data
of the form '+1 (two (or more) characters after the quote) will now generate
an error message, and cause printf(1) to exit(1) when it is done.

Adapt the test cases which use that data form to handle that.
2021-05-19 22:45:49 +00:00
kre e95234e270 Handle the (very) recent change to printf(1) - when writing to a closed
stdout printf(1) now issues an error message, hence stderr in such cases
should not be empty, rather than should be empty.   Adapt to that.
2021-05-19 22:43:18 +00:00
kre 392642ae5f Fix a truly embarrassing quoting screwup. There is an explanation as
to why this didn't cause any failures, but I won't go into it here.
This was detected by the about to be committed printf changes.

While here also correct a couple of minor comment layout issues.
2021-05-19 22:20:34 +00:00
kre 78eadc76d4 Add two new sub-tests to the echo test case of the t_builtins shell ATF test.
The first verifies that echo exits >0 when it encounters an I/O error on
its output (this part would have succeeded for a long time).  It also
verifies the POSIX requirement that when most standard utilities (or
perhaps many rather than most) exit(>0) they must write a message to stderr.
Our sh's built in echo did not do that (nor does /bin/echo but that's not
relevant here).

The second demonstrates (on an unfixed built-in echo) a bug reported in
private e-mail by Oguz <oguzismailuysal@gmail.com> where once an instance of
the built-in echo has detected an I/O error, all later invocations of
the built-in echo, with no I/O errors of their own, also exit(1) (the error
status on stdout is not cleared, each echo sees the "I/O error occurred" and
does exit(1)).

In this second sub-test, the "2>&-" on the first echo command is simply
an artifact caused by the test harness - the "check" function verifies
that exit((>0) requires a message on stderr (and vice versa), but that
only applies to most (or many) utilities, echo is one, but sh is not.
In the second test, the exit status comes from sh - sh is permitted to
write to stderr (via the echo command it runs in this case) and still
exit(0).   But the check function in the test does not understand that
subtlety.   So, we simply suppress the stderr message by closing stderr
(the first of these two new sub-tests has verified that the message exists)..
2021-05-18 21:37:56 +00:00
yamaguchi f0101d0e08 Add a new link-aggregation pseudo interface named lagg(4)
- FreeBSD's lagg(4) based implementation
 - MP-safe and MP-scalable
2021-05-17 04:07:41 +00:00
rillig 2999d7a951 lint: add more specific warning for bit-field of type plain 'int'
Previously, declaring a bit-field of type plain 'int' resulted in this
warning:

	warning: nonportable bit-field type 'int' [34]

This warning was too unspecific to be actionable, and until yesterday it
didn't even include the type.  In order to allow this warning to be
understood and properly fixed, describe the actual nonportability more
precisely:

	warning: bit-field of type plain 'int' has
	implementation-defined signedness [344]
2021-05-16 11:11:36 +00:00
rillig dec93c3088 lint: add type information to unportable bit-field type
Seeing the message "unportable bit-field type 'int'" may sound strange
at first, but that's a strict interpretation of the wording in C99
6.7.2.1p4, which requires that the bit-field type is "'_Bool', 'unsigned
int' or 'signed int', or some other implementation-defined type".

The rationale for C99 6.7.2.1 explicitly lists plain 'int' among the
allowed types for bit-fields, regardless of any additional
implementation-defined types.  This means that lint had interpreted this
paragraph wrong, and it should be fixed to allow plain int as well.
2021-05-16 10:34:19 +00:00
rillig 1a0e12d66e lint: add quotes to message 309 about constant conversion 2021-05-16 10:18:24 +00:00
rillig fc2d694242 tests/lint: add test for warning about zero-bits in '&' 2021-05-16 10:08:01 +00:00
rillig e966428344 tests/lint: add expected output for testing '&' in switch statement 2021-05-16 00:09:49 +00:00
rillig c910954897 lint: warn about unreachable case labels for '&&'
See octeon_gmxreg.h 1.2 from 2020-06-18 for an example, where
RXN_RX_INBND_SPEED was cleaned up without adjusting the corresponding
code in octeon_gmx.c.
2021-05-15 19:12:14 +00:00
rillig e0df50670a tests/lint: test bitwise mismatch in switch statement 2021-05-14 21:14:55 +00:00
yamaguchi 6af4209c35 Fix the wrong state check
After disconnection from PPPoE server, the client waits for
reconnection in initial state or reconnects in PADI state.
2021-05-13 03:37:58 +00:00
yamaguchi 5416d07a0e Add tests for "pppoectl {no}[ipcp|ipv6cp]" 2021-05-11 05:57:02 +00:00
yamaguchi f381967972 Added missing '$' 2021-05-11 00:55:51 +00:00
yamaguchi 0c15ac9ed3 Added missing waiting for DAD completion 2021-05-06 01:09:43 +00:00
rillig d16694fc52 tests/lint: make test for message 118 platform-independent 2021-05-04 19:57:56 +00:00
rillig 8d96908096 lint: fix assertion failure when promoting a bit-field larger than int 2021-05-04 05:40:10 +00:00
rillig 249bb67fed tests/lint: demonstrate assertion failure "len == size_in_bits(INT)"
Seen on sparc64 in hdtoa.c:341 since sparc64 is one of the platforms
that has 128-bit long double and defines struct ieee_ext.ext_frach:48
based on uint64_t, which is a GCC extension.  Plain C99 only allows
_Bool, signed int and unsigned int as base type for bit-fields.
2021-05-04 05:32:52 +00:00
rillig 58cf05d8c5 lint: allow variables to be named 'pcs' 2021-05-03 07:08:54 +00:00
rillig 5615754a21 tests/lint: demonstrate bug in the lexer for GCC attributes 2021-05-03 06:24:18 +00:00
rillig 944c465b9d lint: fix parsing of __typeof__ after statement in ({ ... })
Since C99, declarations and statements can be freely mixed, and GCC
supported this even before 1999.
2021-05-03 05:24:44 +00:00
rillig 413a9598ba tests/lint: remove outdated comment
The test d_gcc_extension is already activated in line 121.
2021-05-03 03:50:43 +00:00
rillig 9491476953 lint: allow large integer types for bit-fields in GCC mode
These types are explicitly allowed by GCC.

I'm not sure which of the flags -g and -p should be stronger.  That is,
if both -g and -p are given, should 'unsigned char' be allowed as a
bit-field type since -g would allow it, or should it be warned about
since -p warns about it?  For now, continue to warn about these.
2021-05-02 22:07:49 +00:00
rillig b0f8c816d4 tests/lint: fix test for GCC bit-field types
The whole purpose of this test is to try the message about invalid
bit-field types in GCC mode.  Therefore, use the default lint1-flags
that include -g.
2021-05-02 21:47:28 +00:00
rillig c29d5e341f tests/lint: add test for bit-field types in GCC mode 2021-05-02 21:22:09 +00:00
rillig ed02aca188 tests/lint: demonstrate missing support for __packed __aligned 2021-05-02 20:44:46 +00:00
martin 3e0848b4f6 Add test for POSIX_SPAWN_RESETIDS flag 2021-05-02 11:18:11 +00:00