diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2015-12-01 10:13:55 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-12-12 23:42:52 +0000 |
commit | a6bb872fd3a14d2dab5058a6533a44c6ea7c7de4 (patch) | |
tree | 041004873f74999b82fecba59a9a73f6da98db6f | |
parent | 787d82b70368a563913e67aa0a14d6aa005e63e2 (diff) | |
download | poky-a6bb872fd3a14d2dab5058a6533a44c6ea7c7de4.tar.gz |
cpio: fix test case of symlink-bad-length
(From OE-Core rev: 7e2f2bc55a1b367503ab75ac6863f56d662c34cc)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-extended/cpio/cpio-2.11/0001-fix-testcase-of-symlink-bad-length.patch | 57 | ||||
-rw-r--r-- | meta/recipes-extended/cpio/cpio_2.11.bb | 1 |
2 files changed, 58 insertions, 0 deletions
diff --git a/meta/recipes-extended/cpio/cpio-2.11/0001-fix-testcase-of-symlink-bad-length.patch b/meta/recipes-extended/cpio/cpio-2.11/0001-fix-testcase-of-symlink-bad-length.patch new file mode 100644 index 0000000000..642f557ac8 --- /dev/null +++ b/meta/recipes-extended/cpio/cpio-2.11/0001-fix-testcase-of-symlink-bad-length.patch | |||
@@ -0,0 +1,57 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | Subject: fix testcase of symlink-bad-length | ||
4 | |||
5 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
6 | --- | ||
7 | tests/symlink-bad-length.at | 24 ++++++++++++++++++++---- | ||
8 | 1 file changed, 20 insertions(+), 4 deletions(-) | ||
9 | |||
10 | diff --git a/tests/symlink-bad-length.at b/tests/symlink-bad-length.at | ||
11 | index 74208ce..11fc6ce 100644 | ||
12 | --- a/tests/symlink-bad-length.at | ||
13 | +++ b/tests/symlink-bad-length.at | ||
14 | @@ -1,5 +1,5 @@ | ||
15 | # Process this file with autom4te to create testsuite. -*- Autotest -*- | ||
16 | -# Copyright (C) 2014 Free Software Foundation, Inc. | ||
17 | +# Copyright (C) 2014-2015 Free Software Foundation, Inc. | ||
18 | |||
19 | # This program is free software; you can redistribute it and/or modify | ||
20 | # it under the terms of the GNU General Public License as published by | ||
21 | @@ -35,14 +35,30 @@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
22 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= | ||
23 | ]) | ||
24 | |||
25 | +# The exact error message and exit status depend on the host architecture, | ||
26 | +# therefore strderr is filtered out and error code is not checked. | ||
27 | + | ||
28 | +# So far the only case when cpio would exit with code 0 is when it skips | ||
29 | +# several bytes and encounters a valid record header. Perhaps it should | ||
30 | +# exit with code 2 (non-critical error), if at least one byte was skipped, | ||
31 | +# but that could hurt backward compatibility. | ||
32 | + | ||
33 | AT_CHECK([ | ||
34 | base64 -d ARCHIVE.base64 > ARCHIVE || AT_SKIP_TEST | ||
35 | -cpio -ntv < ARCHIVE | ||
36 | -test $? -eq 2 | ||
37 | +TZ=UTC cpio -ntv < ARCHIVE 2>stderr | ||
38 | +cat stderr | grep -v \ | ||
39 | + -e 'stored filename length is out of range' \ | ||
40 | + -e 'premature end of file' \ | ||
41 | + -e 'archive header has reverse byte-order' \ | ||
42 | + -e 'memory exhausted' \ | ||
43 | + -e 'skipped [[0-9][0-9]*] bytes of junk' \ | ||
44 | + -e '[[0-9][0-9]*] block' \ | ||
45 | + >&2 | ||
46 | +echo >&2 STDERR | ||
47 | ], | ||
48 | [0], | ||
49 | [-rw-rw-r-- 1 10029 10031 13 Nov 25 2014 FILE | ||
50 | -],[cpio: premature end of file | ||
51 | +],[STDERR | ||
52 | ]) | ||
53 | |||
54 | AT_CLEANUP | ||
55 | -- | ||
56 | 1.9.1 | ||
57 | |||
diff --git a/meta/recipes-extended/cpio/cpio_2.11.bb b/meta/recipes-extended/cpio/cpio_2.11.bb index 3df1cd5bed..9a6a50e8b8 100644 --- a/meta/recipes-extended/cpio/cpio_2.11.bb +++ b/meta/recipes-extended/cpio/cpio_2.11.bb | |||
@@ -11,6 +11,7 @@ SRC_URI += "file://remove-gets.patch \ | |||
11 | file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ | 11 | file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ |
12 | file://Fix-symlink-bad-length-test-for-64-bit-architectures.patch \ | 12 | file://Fix-symlink-bad-length-test-for-64-bit-architectures.patch \ |
13 | file://fix-testcase-symlink-bad-lengths.patch \ | 13 | file://fix-testcase-symlink-bad-lengths.patch \ |
14 | file://0001-fix-testcase-of-symlink-bad-length.patch \ | ||
14 | " | 15 | " |
15 | 16 | ||
16 | SRC_URI[md5sum] = "1112bb6c45863468b5496ba128792f6c" | 17 | SRC_URI[md5sum] = "1112bb6c45863468b5496ba128792f6c" |