New upstream release
- d/copyright: Update - d/patches: Remove, applied upstream
This commit is contained in:
1 parent
c26a164c6f
commit
040d2cd650
5 files changed
+65
-130
No files matched your search
-79
@@ -1,79 +0,0 @@
|
||||
From: Simon McVittie <smcv@collabora.com>
|
||||
Date: Wed, 3 Jan 2018 08:23:10 +0000
|
||||
Subject: tests: Assert that byte-order is swapped on LE but not BE CPUs
|
||||
|
||||
Closes: #1392
|
||||
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
||||
Closes: #1393
|
||||
Approved by: cgwalters
|
||||
Applied-upstream: 2018.1, commit:https://github.com/ostreedev/ostree/commit/994cd66744e559c92644f36028c6c262605ad75a
|
||||
---
|
||||
Makefile-tests.am | 8 +++++++-
|
||||
tests/basic-test.sh | 14 +++++++++++++-
|
||||
tests/get-byte-order.c | 12 ++++++++++++
|
||||
3 files changed, 32 insertions(+), 2 deletions(-)
|
||||
create mode 100644 tests/get-byte-order.c
|
||||
|
||||
diff --git a/Makefile-tests.am b/Makefile-tests.am
|
||||
index 2b33555..25a8d08 100644
|
||||
--- a/Makefile-tests.am
|
||||
+++ b/Makefile-tests.am
|
||||
@@ -130,7 +130,13 @@ experimental_test_scripts = \
|
||||
tests/test-summary-collections.sh \
|
||||
tests/test-pull-collections.sh \
|
||||
$(NULL)
|
||||
-test_extra_programs = $(NULL)
|
||||
+test_extra_programs = \
|
||||
+ tests/get-byte-order \
|
||||
+ $(NULL)
|
||||
+
|
||||
+tests_get_byte_order_SOURCES = tests/get-byte-order.c
|
||||
+tests_get_byte_order_CFLAGS = $(AM_CFLAGS) $(GLIB_CFLAGS)
|
||||
+tests_get_byte_order_LDADD = $(GLIB_LIBS)
|
||||
|
||||
tests_repo_finder_mount_SOURCES = tests/repo-finder-mount.c
|
||||
tests_repo_finder_mount_CFLAGS = $(common_tests_cflags)
|
||||
diff --git a/tests/basic-test.sh b/tests/basic-test.sh
|
||||
index 87cb9fa..c4eb9ca 100644
|
||||
--- a/tests/basic-test.sh
|
||||
+++ b/tests/basic-test.sh
|
||||
@@ -759,8 +759,20 @@ $OSTREE show --print-metadata-key=FOO test2 > test2-meta
|
||||
assert_file_has_content test2-meta "BAR"
|
||||
$OSTREE show --print-metadata-key=KITTENS test2 > test2-meta
|
||||
assert_file_has_content test2-meta "CUTE"
|
||||
+
|
||||
$OSTREE show --print-metadata-key=SOMENUM test2 > test2-meta
|
||||
-assert_file_has_content test2-meta "uint64 3026418949592973312"
|
||||
+case "$("${test_builddir}/get-byte-order")" in
|
||||
+ (4321)
|
||||
+ assert_file_has_content test2-meta "uint64 42"
|
||||
+ ;;
|
||||
+ (1234)
|
||||
+ assert_file_has_content test2-meta "uint64 3026418949592973312"
|
||||
+ ;;
|
||||
+ (*)
|
||||
+ fatal "neither little-endian nor big-endian?"
|
||||
+ ;;
|
||||
+esac
|
||||
+
|
||||
$OSTREE show -B --print-metadata-key=SOMENUM test2 > test2-meta
|
||||
assert_file_has_content test2-meta "uint64 42"
|
||||
$OSTREE show --print-detached-metadata-key=SIGNATURE test2 > test2-meta
|
||||
diff --git a/tests/get-byte-order.c b/tests/get-byte-order.c
|
||||
new file mode 100644
|
||||
index 0000000..7e7ba31
|
||||
--- /dev/null
|
||||
+++ b/tests/get-byte-order.c
|
||||
@@ -0,0 +1,12 @@
|
||||
+/* Helper for OSTree tests: return host byte order */
|
||||
+
|
||||
+#include "config.h"
|
||||
+
|
||||
+#include <glib.h>
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ g_print ("%d\n", G_BYTE_ORDER);
|
||||
+ return 0;
|
||||
+}
|
||||
@@ -1,47 +0,0 @@
|
||||
From: Simon McVittie <smcv@collabora.com>
|
||||
Date: Sun, 10 Dec 2017 19:39:38 +0000
|
||||
Subject: tests: Don't assume uid == primary gid
|
||||
|
||||
Nothing guarantees that each user has a group containing only
|
||||
themselves. Even if they do, nothing guarantees that its group ID
|
||||
equals the user ID, particularly if another user earlier in the same
|
||||
range was created without a corresponding group or vice versa.
|
||||
|
||||
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
||||
Forwarded: https://github.com/ostreedev/ostree/pull/1390
|
||||
Applied-upstream: 2018.1, commit:https://github.com/ostreedev/ostree/commit/f63e62fbd272edbdd9695a10d841fc6b5eb69df8
|
||||
---
|
||||
tests/test-basic-user.sh | 14 ++++++++------
|
||||
1 file changed, 8 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/tests/test-basic-user.sh b/tests/test-basic-user.sh
|
||||
index 7f970b5..6987e4a 100755
|
||||
--- a/tests/test-basic-user.sh
|
||||
+++ b/tests/test-basic-user.sh
|
||||
@@ -104,18 +104,20 @@ cd ${test_tmpdir}
|
||||
rm -rf test2-checkout
|
||||
$OSTREE checkout -H -U test2 test2-checkout
|
||||
# With --link-checkout-speedup, specifying --owner-uid should "win" by default.
|
||||
-myid=$(id -u)
|
||||
-newid=$((${myid} + 1))
|
||||
-$OSTREE commit ${COMMIT_ARGS} --owner-uid ${newid} --owner-gid ${newid} \
|
||||
+myuid=$(id -u)
|
||||
+mygid=$(id -g)
|
||||
+newuid=$((${myuid} + 1))
|
||||
+newgid=$((${mygid} + 1))
|
||||
+$OSTREE commit ${COMMIT_ARGS} --owner-uid ${newuid} --owner-gid ${newgid} \
|
||||
--link-checkout-speedup -b test2-linkcheckout-test --tree=dir=test2-checkout
|
||||
$OSTREE ls test2-linkcheckout-test /baz/cow > ls.txt
|
||||
-assert_file_has_content ls.txt "^-006.. ${newid} ${newid} .*/baz/cow"
|
||||
+assert_file_has_content ls.txt "^-006.. ${newuid} ${newgid} .*/baz/cow"
|
||||
|
||||
# But --devino-canonical should override that
|
||||
-$OSTREE commit ${COMMIT_ARGS} --owner-uid ${newid} --owner-gid ${newid} \
|
||||
+$OSTREE commit ${COMMIT_ARGS} --owner-uid ${newuid} --owner-gid ${newgid} \
|
||||
-I -b test2-devino-test --tree=dir=test2-checkout
|
||||
$OSTREE ls test2-devino-test /baz/cow > ls.txt
|
||||
-assert_file_has_content ls.txt "^-006.. ${myid} ${myid} .*/baz/cow"
|
||||
+assert_file_has_content ls.txt "^-006.. ${myuid} ${mygid} .*/baz/cow"
|
||||
|
||||
$OSTREE refs --delete test2-{linkcheckout,devino}-test
|
||||
echo "ok commit with -I"
|
||||
Vendored
-2
@@ -1,2 +0,0 @@
|
||||
2018.1/tests-Don-t-assume-uid-primary-gid.patch
|
||||
2018.1/tests-Assert-that-byte-order-is-swapped-on-LE-but-not-BE-.patch
|
||||
Reference in new issue
Block a user