zephyr/tests
Christopher Friedt bfa0a87277 tests: posix: pthread_pressure: enable pthread barrier in twister
In some cases, when GitHub CI is running several Qemu processes,
each with heavy loads, SMP tests have shown some flakiness. This
exhibits itself as something like

```
... pthread_pressure on qemu_riscv32 failed (Timeout)
```

That is actually not at all limited to POSIX or any particular
architecture, but is mainly to do with the host scheduler and
perhaps memory barrier operations being lost in ISA translation
by Qemu.

Collectively, we can refer to these issues as "scheduler noise".

To reduce scheduler noise in the `pthread_pressure` testsuite,
enable `CONFIG_PTHREAD_CREATE_BARRIER` in `testcase.yaml`.

Note: end-users will likely not experience the need to enable
this in `prj.conf`. E.g. the following basic test demonstrates
0 failures locallly.

```
TEST=tests/posix/pthread_pressure
twister --build-only -T $TEST &>/dev/null
FAIL=0
for ((i=0; i < 100; i++)); do
  echo "Run $((i+1))/100"
  twister --test-only -T $TEST &>/dev/null
  if [ $? -ne 0 ]; then
    FAIL=$((FAIL+1))
    echo "Failed $FAIL times"
  fi
done
echo "Failure Rate: $((FAIL))/100"
```

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-06-12 14:06:10 -04:00
..
application_development samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
arch tests: arm_runtime_nmi: Add barriers 2023-06-05 20:20:54 -04:00
benchmarks tests: ignore benchmark on some qemu platforms 2023-06-05 20:53:02 -04:00
bluetooth Bluetooth: Rework the HCI header set 2023-06-12 06:20:24 -04:00
boards tests: boards: esp32: cache_coex: add esp32s2 2023-05-27 06:22:50 -04:00
boot tests: boot: mcuboot: disable test 2023-05-25 16:29:40 -04:00
bsim Bluetooth: Rework the HCI header set 2023-06-12 06:20:24 -04:00
cmake tests: snippets: Rework the snippet test 2023-05-25 21:51:26 +02:00
crypto tests: samples: cleanup test tags, add integration_platforms 2023-06-02 04:47:06 -04:00
drivers tests: drivers: dac loopback on stm32 boards fix pinout 2023-06-08 11:48:22 -04:00
kernel tests: timer_api: Decrease tick rate for nRF RTC timer 2023-06-12 14:04:56 -04:00
lib tests: samples: cleanup test tags, add integration_platforms 2023-06-02 04:47:06 -04:00
misc tests: samples: cleanup test tags, add integration_platforms 2023-06-02 04:47:06 -04:00
net tests: coap_client: Type case to uint8_t after shift 2023-05-30 13:04:13 -04:00
posix tests: posix: pthread_pressure: enable pthread barrier in twister 2023-06-12 14:06:10 -04:00
robot Twister: Add integration with renode-test 2023-05-26 09:43:49 -04:00
subsys tests: mcumgr: update tags 2023-06-07 05:41:31 -04:00
unit samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
ztest test: ARC: skip div-by-zero test in case of SW div implementation 2023-06-07 05:46:40 -04:00
test_config.yaml twister: add support for levels and test configuration 2023-03-07 15:49:16 +01:00