Commit Graph

103 Commits

Author SHA1 Message Date
Khem Raj
89755de94d mdadm: Disable 10ddf-fail-spare and 10ddf-fail-stop-readd testcases
This always fails in my CI setup. There are some others which fail
intermittently however, this one is deterministic and fails always e.g.

    AssertionError:- [1/1]
    Failed ptests:
    {'mdadm': ['/usr/lib/mdadm/ptest/tests/10ddf-fail-spareFAILED_-_see_/usr/lib/mdadm/ptest/logs/10ddf-fail-spare.log_and_/usr/lib/mdadm/ptest/lo

Mark them broken for now.

(From OE-Core rev: 282cd99cea3a8089759947466b585c19892c61d9)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-15 21:42:15 +00:00
Richard Purdie
6ac5b545f2 mdadm: Disable further tests due to intermittent failures
I took the mdadm ptest enabling as I was told the tests were fine now.
They're not. Disable more of them as having intermittent issues.

(From OE-Core rev: 2993a0bd6aca81d4382c3de5ac2fd9b5dac94868)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-07 14:36:30 +01:00
Dmitry Baryshkov
ac0f329806 mdadm: disable strace on rv32 arch
strace program is not yet ported to RiscV 32 arch. Disable corresponding
dependency and test to remove dependency on the non-existing package,
which otherwise breaks building of core images:

ERROR: Nothing RPROVIDES 'strace' (but /oe/poky/meta/recipes-extended/mdadm/mdadm_4.2.bb RDEPENDS on or otherwise requires it)
strace was skipped: incompatible with host riscv32-poky-linux (not in COMPATIBLE_HOST)
NOTE: Runtime target 'strace' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['strace']
NOTE: Runtime target 'mdadm' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['mdadm', 'strace']
NOTE: Runtime target 'matchbox-terminal' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['matchbox-terminal', 'gtk+3', 'glib-2.0', 'util-linux', 'mdadm', 'strace']
ERROR: Required build target 'core-image-weston' has no buildable providers.
Missing or unbuildable dependency chain was: ['core-image-weston', 'matchbox-terminal', 'gtk+3', 'glib-2.0', 'util-linux', 'mdadm', 'strace']

(From OE-Core rev: 9eca859f3bad9a881162f514d6147be5fd1351d9)

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-21 11:34:12 +01:00
Ovidiu Panait
f32ff564f3 mdadm: skip running 04update-uuid and 07revert-inplace testcases
04update-uuid and 07revert-inplace tests are unreliable and fail intermittently
on the autobuilder (BZ#15181 and BZ#15159). Unfortunately, the failures cannot
be reproduced locally and the logs cannot be retrieved from the AB.

Mark the testcases as BROKEN to skip them when running ptest.

(From OE-Core rev: eb219aff7cfe1cff1da93107ac7b22c678c0000f)

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-21 11:34:12 +01:00
Ovidiu Panait
b06d0238c7 mdadm: save ptest logs
Run test script with --save-logs and --logdir parameters, so the log files can
be retrieved in case of failure.

(From OE-Core rev: 32fe21e420b1c2a4e7ef9d7c768a22c9a7caa115)

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-10 09:18:54 +01:00
Ovidiu Panait
71252e03e7 mdadm: add util-linux-blockdev ptest dependency
07revert-inplace test logs contain the following:
func.sh: line 335: /sbin/blockdev: No such file or directory

Add the missing util-linux-blockdev dependency.

(From OE-Core rev: a15cd04f528d137d428a572f15d1ec5ebbbd81f0)

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-25 15:27:33 +01:00
Ovidiu Panait
5276e9f9b8 mdadm: skip running known broken ptests
Upstream marked some testcases as "KNOWN BROKEN" and introduced the
"--skip-broken" flag to ignore them when running the testsuite (commits [1]
and [2]). Backport these two commits to get rid of the last remaining ptest
failures.

Also, add the "--skip-broken" option to the run-ptest script.

[1] https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=28520bf114b3
[2] https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=daa86d663476

(From OE-Core rev: 62148b978b26b5fcd1a2fa3a0ff82ef814f4e7ec)

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-10 11:36:34 +01:00
Ovidiu Panait
03a94d9a35 mdadm: fix segfaults when running ptests
Currently, some segfaults are reported when running ptest:
mdadm[12333]: segfault at 0 ip 00007fe855924060 sp 00007ffc4d6caf88 error 4 in libc.so.6[7f)
Code: d2 0f 84 b7 0f 00 00 48 83 fa 01 0f 84 b9 0f 00 00 49 89 d3 89 f1 89 f8 48 83 e1 3f 4f

Backport the following upstream commits to fix them:
679bd9508a30 ("DDF: Cleanup validate_geometry_ddf_container()")
2b93288a5650 ("DDF: Fix NULL pointer dereference in validate_geometry_ddf()")
548e9b916f86 ("mdadm/Grow: Fix use after close bug by closing after fork")
9ae62977b51d ("monitor: Avoid segfault when calling NULL get_bad_blocks")

The fixes are part of the "Bug fixes and testing improvments" patchset [1].

[1] https://www.spinics.net/lists/raid/msg70621.html

(From OE-Core rev: 9585009e3e505b361cd32b14e0e85e77e7822878)

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-10 11:36:34 +01:00
Ovidiu Panait
3c9c721be3 mdadm: fix 07revert-inplace ptest
Testcase 07revert-inplace fails if strace is not installed:
...
strace -o /tmp/str ./mdadm -A /dev/md0 --update=revert-reshape /dev/<...>
tests/07revert-inplace: line 40: strace: command not found

Add strace to mdadm-ptest RDEPENDS to make sure the testcase passes even with
a core-image-minimal build.

(From OE-Core rev: 7d9386663ac52ab69812867a0823c6055aedbc18)

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-10 11:36:34 +01:00
Ovidiu Panait
f9e29f3f5d mdadm: fix util-linux ptest dependency
Trying to run mdadm-ptest in a core-image-minimal build will result in:
root@qemux86-64:~# ptest-runner mdadm
START: ptest-runner
BEGIN: /usr/lib/mdadm/ptest
which: no lsblk in (/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin)
lsblk command not found!
DURATION: 0
END: /usr/lib/mdadm/ptest
2023-06-28T10:14
STOP: ptest-runner
TOTAL: 1 FAIL: 0

Remove util-linux from RRECOMMENDS and only add util-linux-lsblk and
util-linux-losetup to RDEPENDS.

(From OE-Core rev: 3004f7589974c135cc82630d980ea281b97ecd83)

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-10 11:36:34 +01:00
Mingli Yu
20dec1e527 mdadm: fix tests/00raid0
Backport patch [1] to fix tests/00raid0.

[1] https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=7539254342bc591717b0051734cc6c09c1b88640

(From OE-Core rev: baba79874444a9a55e787983a87408e9bc7ebea2)

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-22 23:17:27 +00:00
Mingli Yu
47b0e320f4 mdadm: Fix raid0 tests
Backport patches to fix raid0 tests:
  tests/00raid0
  tests/00readonly
  tests/03r0assem
  tests/04r0update
  tests/04update-metadata

(From OE-Core rev: cb8ab2674d155fa8d90956c3522653b013ce6e6c)

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-16 17:49:38 +00:00
Mingli Yu
78465fcbbb mdadm: fix tests/02lineargrow
Backport patch [1] to fix tests/02lineargrow.

[1] https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=a2c832465fc75202e244327b2081231dfa974617

(From OE-Core rev: 4f7175b9af3f4407f6dfa1e1eb18b2c3d3a72c88)

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-16 17:49:38 +00:00
Mingli Yu
375a784d8c mdadm: Fix testcase 06wrmostly
Backport patch [1] to fix the failure of the 06wrmostly test.

[1] https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=41edf6f45895193f4a523cb0a08d639c9ff9ccc9

(From OE-Core rev: e7359d98ab588eb7969e4d26979cccae79095479)

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-16 17:49:38 +00:00
Khem Raj
cbb8a79bc9 mdadm: Define alignof using _Alignof when using C11 or newer
(From OE-Core rev: 18f1f2775ef0690802b44a6094383db48c712c19)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-20 16:40:47 +00:00
Khem Raj
76bb16ff69 mdadm: Use _FILE_OFFSET_BITS to use largefile support
(From OE-Core rev: 5aabfacf7823b90fb61400b670989f77a89c7e5b)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-21 10:16:31 +00:00
Khem Raj
4dea2ee73e mdadm: Drop clang specific cflags
This option is no longer needed

(From OE-Core rev: 8d7130937ea4e47f0fa4d23c1c8394e3ca3f939b)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-19 14:14:11 +01:00
Peter Kjellerstedt
83766c9fff meta, meta-selftest: Replace more non-SPDX license identifiers
In commit ceda3238 (meta/meta-selftest/meta-skeleton: Update LICENSE
variable to use SPDX license identifiers) all LICENSE variables were
updated to only use SPDX license identifiers.

This does the same for comments and other variables where it is
appropriate to use the official SPDX license identifiers. There are
still references to, e.g., "GPLv3", but they are then typically in
descriptive text where they refer to the license in a generic sense.

(From OE-Core rev: 165759dced7fbe73b1db2ede67047896071dc6d0)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-01 23:44:59 +00:00
Richard Purdie
b0130fcf91 meta/meta-selftest/meta-skeleton: Update LICENSE variable to use SPDX license identifiers
An automated conversion using scripts/contrib/convert-spdx-licenses.py to
convert to use the standard SPDX license identifiers. Two recipes in meta-selftest
were not converted as they're that way specifically for testing. A change in
linux-firmware was also skipped and may need a more manual tweak.

(From OE-Core rev: ceda3238cdbf1beb216ae9ddb242470d5dfc25e0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-20 16:45:25 +00:00
Chen Qi
0d4392fbb3 mdadm: install mdcheck
This script is used in mdcheck_xxx.service files. So we need to
install it. Also, as it requires bash, we add bash to RDEPENDS.

(From OE-Core rev: 0942b161252fc70c65d46754b44bfebe75cf8c09)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-08 14:20:18 +00:00
Changqing Li
95870c10b1 mdadm: fix testcase 00multipath failure
After upgrade to 4.2, mdadm's testcase 00multipath failed,
because a bug in 4.2 makes "-r" not work in manage mode.

(From OE-Core rev: 8a815877b0fac30f379a7387966b8a0c7ffe753e)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-03 09:05:13 +00:00
Alexander Kanavin
b93bd0e85e mdadm: update 4.1 -> 4.2
Drop 0001-Compute-abs-diff-in-a-standard-compliant-way.patch
(upstream refactored code)
mdadm-fix-ptest-build-errors.patch
(upstream fixed the issue)

(From OE-Core rev: acf82e36996c082f52c02d50b06965f74ef87430)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-11 10:53:44 +00:00
Alexander Kanavin
b3ac015389 patches: correct whitespace/spelling for Upstream-Status tags
(From OE-Core rev: c613ca14c35a5d1782c79a25b83875cbfa2b952b)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-11-21 11:05:02 +00:00
Robert P. J. Day
abeb2e95c6 systemd: '${systemd_unitdir}/system' => '${systemd_system_unitdir}'
Repo-wide replacement to use newer variable to represent systemd
system unitdir directory.

(From OE-Core rev: 5ace3ada5c54500c71becc8e0c6eddeb8bc053e3)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-07 21:54:11 +01:00
Richard Purdie
bb6ddc3691 Convert to new override syntax
This is the result of automated script conversion:

scripts/contrib/convert-overrides.py <oe-core directory>

converting the metadata to use ":" as the override character instead of "_".

(From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-02 15:44:10 +01:00
Dorinda
76e7ccfc30 meta/recipes-extended: Add HOMEPAGE / DESCRIPTION
Added HOMEPAGE and DESCRIPTION for recipes with missing decriptions or homepage

[YOCTO #13471]

(From OE-Core rev: cc6c7af900ae0196a62b7fa1375c55bbcd8e68b4)

Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-06 22:39:04 +00:00
Kai Kang
ce441fde6f mdadm: remove service template from SYSTEMD_SERVICE
Remove service template mdmon@.service from SYSTEMD_SERVICE which should
be not started by systemctl directly. It is hanlded by udev rules.

Replace tab with spaces in SRC_URI as well.

(From OE-Core rev: a55b2b29bb86d98700836de5b7d68965c7cd5ee5)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-09 13:14:01 +01:00
Alexander Kanavin
a6879f527e mdadm: fix more ptests
Particularly:
1. set $dir, so supplementary utilities can be found
2. disable integrity checks as they take more time than any other test

(From OE-Core rev: a8983d659b27219a0d70e56882727ceddd0f4331)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-23 23:33:48 +00:00
Alexander Kanavin
fa7ca65e8b mdadm: correctly set up testing location for ptests
1. Do not clutter /, create a special-purpose dir
2. Clean up the dir after tests are done (if this is not
performed, disk will overflow later in ptesting).
3. Fix up more locations in ptests to use the dir.

Upstream default /var/tmp is not suitable as it is not
big enough (mdadm needs about 500 Mb)

(From OE-Core rev: cd4fc516ce0f8e4c5cadb7a700fe29643ed9128d)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-27 16:48:09 +00:00
Changqing Li
f4a337e472 mdadm: fix do_package failed when changed local.conf but not cleaned
reproduce steps:
1. add DISTRO_FEATURE_append = 'usrmerge' in local.conf
2. bitbake mdadm --success
3. remove DISTRO_FEATURE_append = 'usrmerge' from local.conf
4. bitbake mdadm  -- failed when do_package

it is not proper to change source Makefile during do_install by sed,
fix by pass correct config to EXTRA_OEMAKE

[YOCTO #13493]

(From OE-Core rev: 8eb457bd396592094b59098496d88db0ba03d013)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-31 16:09:35 +00:00
Changqing Li
d7a16809f6 mdadm: skip timeout testcase 11spare-migration
[YOCTO #13368]

(From OE-Core rev: 47c4ad9bd43d3b0539a19691bd4deb19ea63c3a7)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-07 07:47:24 +01:00
Khem Raj
bbd5d098ec mdadm: Include sys/sysmacros.h for major/minor definitions
Fixes
implicit declaration of function 'minor' is invalid in C99 [-Wimplicit-function-declaration]

which eventually ends up with a linker error

(From OE-Core rev: 5841e52e79274b2da17bf7dbd1224d0a3dca2d6f)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-23 22:26:28 +01:00
Changqing Li
eba6cd155a mdadm: make ptest output format align with common style
(From OE-Core rev: 99176bce7a185c996ef892b4f9b2617825a607fb)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-17 09:36:35 +01:00
Mingli Yu
8af95f0ee7 mdadm: fix ptest hang
Before commit[80d17497b7 mdadm: improve the run-ptest],
the mdadm ptest just run some tests without
"--keep-going" option. After the option added in
commit 80d17497b7, all test cases have chance to
be called.

But the logic in mdadm upstream commit
[e2a8e9d tests: wait for complete rebuild in integrity checks]
will make the test enter infinite loop especially in
qemu env as commit e2a8e9d update the logic from
"check wait" to "check state 'U*'" for testcase
tests/01r5integ and tests/01raid6integ. Considering all
other cases still use "check wait" logic, so revert e2a8e9d
to make tests/01r5integ and tests/01raid6integ also use
"check wait" logic to avoid the infinite loop.

[YOCTO #13368]

(From OE-Core rev: b507793f4adde0c60588b06520d7d0b70acfd82a)

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-16 13:53:16 +01:00
Changqing Li
d727e24ed5 mdam: fix mdmonitor start up failure
1. recently, mdadm has changed to use service file under srcdir,
   so remove the one not be used.
2. add -y option to fix below problem
   mdadm: No mail address or alert command - not monitoring

(From OE-Core rev: e3cd783f42bff8ac50d4dde560ead999efd01a57)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-02 08:13:07 +01:00
Changqing Li
98373868d2 mdadm: fix systemd service start up failure
1. mdadm: No mail address or alert command - not monitoring

fixed by use option -y to cause all events to be reported
through 'syslog'.

2. cannot create pid file: No such file or directory

fix by create dir before starting.

(From OE-Core rev: d18c937918ec3553cb98743088a37ff080af2491)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-27 12:20:36 +01:00
Richard Purdie
cd925d23e3 mdadm: Add missing ptest dependency
Without this the ptest fails, unable to find mkfs.ext3.

(From OE-Core rev: 8f4e7f4ff4eed6503213f2d15bb86c0c86368966)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-30 12:37:02 +01:00
Luca Boccassi
613224104a mdadm: use ${systemd_unitdir} rather than /lib/systemd
Fixes build with usrmerge enabled.

(From OE-Core rev: cafbc4bbe128d13c40e104f773cdf85bbd92a87d)

Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-27 17:06:34 +01:00
Liwei Song
06abb513ec mdadm: install the systemd service through Makefile
The original mdadm service may include variable like BINDIR,
It should use the real value of it, since the install method
"install-systemd" in Makefile can easily do such work, so don't
install it in bb file manually, use "make install-systemd" to
install all the service of mdadm.

(From OE-Core rev: be24f1dc995f7a996abfa551abea74f06de19ae6)

Signed-off-by: Liwei Song <liwei.song@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-16 16:35:12 +01:00
Khem Raj
80bb16ee71 mdadm: Disable Werror
Werror spews more warnings with gcc9, like other distros (
debian/fedora) disable Warnings as errors

Fixes

super-intel.c:696:9: error: taking address of packed member of 'struct imsm_super' may result in an unaligned pointer value [-Werror=address-of-packed-member]

(From OE-Core rev: 7ac6ac8eb8fc3c623eba0e245fd9049dc6e2dd86)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-07 10:12:53 +01:00
Khem Raj
4019b0393f Revert "mdadm: fix gcc8 maybe-uninitialized/format-overflow warning"
This patch tried to address a gcc problem when -Og is used, but it did
cause regressions on normal compiles when using clang e.g. the real
problem is to fix the compiler until then disable the warning in
DEBUG_FLAGS

This reverts commit 630281663893cdcfa9c4323b717b415d87d5510f.

(From OE-Core rev: 949961cdf7d4639da538045dc83c2a354e16ea80)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-10 13:46:17 +01:00
Changqing Li
b82fd7552d mdadm: add -Wno-error to DEBUG_OPTIMIZATION
when compile with DEBUG_OPTIMIZATION(-Og), compile failed with below
error, fix by add -Wno-error:

[snip]
| Incremental.c: In function 'Incremental_container':
| Incremental.c:1593:3: error: 'mdfd' may be used uninitialized in this function [-Werror=maybe-uninitialized]
| close(mdfd);
| ^~~~~~~~~~~

[snip]
super-intel.c: In function 'apply_takeover_update':
| super-intel.c:9615:15: error: '%d' directive writing between 1 and 11 bytes into a region of size 7 [-Werror=format-overflow=]
| " MISSING_%d", du->index);
| ^~
...

(From OE-Core rev: 1e0dbc9e320b200b948abaae418f640f9f65fe06)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-25 23:19:53 +00:00
Liwei Song
2f42b8c2ec mdadm: add mdmon service to support Intel VROC
Install mdmon@.service to make Intel VROC work well.

mdmon@.service called from udev is used to update Intel VROC metadata,
with it the VROC raid is operational to read or write under user space.

(From OE-Core rev: 5b2610ee3935d12ab73164aa8716c068dc8f7f56)

Signed-off-by: Liwei Song <liwei.song@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-25 23:13:48 +00:00
Changqing Li
31f6532782 mdadm: fix gcc8 maybe-uninitialized/format-overflow warning
while compiled with -Werror=maybe-uninitialized/-Werror=format-overflow=,
it failed

[snip]
| Incremental.c: In function 'Incremental_container':
| Incremental.c:1593:3: error: 'mdfd' may be used uninitialized in this function [-Werror=maybe-uninitialized]
| close(mdfd);
| ^~~~~~~~~~~

[snip]
super-intel.c: In function 'apply_takeover_update':
| super-intel.c:9615:15: error: '%d' directive writing between 1 and 11 bytes into a region of size 7 [-Werror=format-overflow=]
| " MISSING_%d", du->index);
| ^~

(From OE-Core rev: 630281663893cdcfa9c4323b717b415d87d5510f)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-18 11:12:26 +00:00
Zheng Ruoqin
366fe3d01e mdadm: add init and service scripts
Add init script and service file for sysvinit and systemd.

(From OE-Core rev: a6222a41c54fb9feebb980e57bcc8a572f93acd1)

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
Signed-off-by: Hong Liu <hongl.fnst@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-25 10:43:06 +00:00
Hongxu Jia
a2e1fd796b mdadm: fix gcc-8 format-truncation warning
While compiling with `-Werror=format-truncation=', it failed
[snip]
|super0.c:236:32: error: 'snprintf' output may be truncated
before the last format character [-Werror=format-truncation=]
|   snprintf(nb, sizeof(nb), "%4d", d);
|                                ^
|super0.c:236:3: note: 'snprintf' output between 5 and 12 bytes
into a destination of size 11
|   snprintf(nb, sizeof(nb), "%4d", d);
[snip]

(From OE-Core rev: cd5013a94609ef2f3e0d621339e22e4137d649d3)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-11 10:39:09 +00:00
Khem Raj
d47e89f338 mdadm: Drop redundant patches and fix build with clang
Several patches were being applied unnecessarily, the purpose they
served at one point has either been fixed differently, or accepted
upstream.

Add a new patch to make clang's diagnostics happy

(From OE-Core rev: 8bc0d2f2197430723f8b2d0785169e48c883eedb)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-09 11:08:11 +00:00
Ross Burton
65d17cd92c mdadm: add back lost Upstream-Status tags
(From OE-Core rev: ffde22a3a78c0333f42e8bc9bad633ef279f11ca)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
Mingli Yu
99e50c7e64 mdadm: improve the run-ptest
* There are 120+ cases under ${libdir}/mdadm/ptest/tests,
  but the test will break if one test fails as
  below logic in run-ptest.
  ./test &>./test.log

  That's to say, the tests after the failed test
  have no chance to run with the current logic.

  To guarantee all the tests can run even one
  of the tests fails, the option --keep-going
  should be added.

* Refactor the test report to make the report
  more detailed and more common

(From OE-Core rev: 80d17497b719efb2ca9f36b8a730815547e93aa7)

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Mingli Yu
55d59d3f6d mdadm: Upgrade to 4.1
* Remove 5 backported patches
* Refresh patches to remove fuzz warnings

(From OE-Core rev: a455616df65f1e9dac5e283a9cda047868465d23)

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:18 +00:00