Unify the build with RHEL 9

There's no need to do a build just for this.

Resolves: RHEL-61904
This commit is contained in:
Debarshi Ray 2024-11-01 02:26:34 +01:00
parent 9de99d0375
commit ed2088ef6f

View File

@ -1,4 +1,4 @@
From d461caa5b1a278124d039df93140d2d5bf4eabe7 Mon Sep 17 00:00:00 2001
From c25ad44b7cb50d470b1533931b7808cc194f0d50 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <rishi@fedoraproject.org>
Date: Wed, 18 Aug 2021 17:55:21 +0200
Subject: [PATCH 1/2] cmd/run: Make sosreport work by setting the HOST
@ -10,10 +10,10 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1940037
1 file changed, 1 insertion(+)
diff --git a/src/cmd/run.go b/src/cmd/run.go
index 7657ffa50821..23d422623b14 100644
index 719c0d6abb20..92a097283f38 100644
--- a/src/cmd/run.go
+++ b/src/cmd/run.go
@@ -501,6 +501,7 @@ func constructExecArgs(container, preserveFDs string,
@@ -566,6 +566,7 @@ func constructExecArgs(container, preserveFDs string,
execArgs = append(execArgs, envOptions...)
execArgs = append(execArgs, []string{
@ -22,10 +22,10 @@ index 7657ffa50821..23d422623b14 100644
"--preserve-fds", preserveFDs,
}...)
--
2.39.2
2.46.1
From 3c2c67752e8f88f72058799cbce3612fc937b230 Mon Sep 17 00:00:00 2001
From e7877a4d1d38dc35aa6da6c012ec9a23397b7aa4 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <rishi@fedoraproject.org>
Date: Fri, 10 Dec 2021 13:42:15 +0100
Subject: [PATCH 2/2] test/system: Update to test the migration path for
@ -36,36 +36,39 @@ This reverts the changes to the tests made in commit
ca899c8a561f357ae32c6ba6813520fd8b682abb and the parts of commit
3aeb7cf288319e35eb9c5e26ea18d97452462c1e that were removed.
---
test/system/002-help.bats | 11 -----------
test/system/002-help.bats | 14 --------------
test/system/100-root.bats | 27 +++++++++++++++++++++++++++
2 files changed, 27 insertions(+), 11 deletions(-)
2 files changed, 27 insertions(+), 14 deletions(-)
create mode 100644 test/system/100-root.bats
diff --git a/test/system/002-help.bats b/test/system/002-help.bats
index 7e4565e9d23d..58a4c2c87ece 100644
index a8bfbc2c79d2..5dd14025ea0b 100644
--- a/test/system/002-help.bats
+++ b/test/system/002-help.bats
@@ -23,17 +23,6 @@ setup() {
_setup_environment
@@ -33,20 +33,6 @@ teardown() {
cleanup_all
}
-@test "help: Try to run toolbox with no command" {
- run $TOOLBOX
-@test "help: Smoke test" {
- run --keep-empty-lines --separate-stderr "$TOOLBX"
-
- assert_failure
- assert [ ${#lines[@]} -eq 0 ]
- lines=("${stderr_lines[@]}")
- assert_line --index 0 "Error: missing command"
- assert_line --index 1 "create Create a new toolbox container"
- assert_line --index 2 "enter Enter an existing toolbox container"
- assert_line --index 3 "list List all existing toolbox containers and images"
- assert_line --index 4 "Run 'toolbox --help' for usage."
- assert_line --index 2 "create Create a new Toolbx container"
- assert_line --index 3 "enter Enter an existing Toolbx container"
- assert_line --index 4 "list List all existing Toolbx containers and images"
- assert_line --index 6 "Run 'toolbox --help' for usage."
- assert [ ${#stderr_lines[@]} -eq 7 ]
-}
-
@test "help: Run command 'help'" {
@test "help: Command 'help'" {
if ! command -v man 2>/dev/null; then
skip "Test works only if man is in PATH"
skip "not found man(1)"
diff --git a/test/system/100-root.bats b/test/system/100-root.bats
new file mode 100644
index 000000000000..32d87904213e
index 000000000000..cf35d60ac25c
--- /dev/null
+++ b/test/system/100-root.bats
@@ -0,0 +1,27 @@
@ -77,15 +80,15 @@ index 000000000000..32d87904213e
+
+setup() {
+ _setup_environment
+ cleanup_containers
+ cleanup_all
+}
+
+teardown() {
+ cleanup_containers
+ cleanup_all
+}
+
+@test "root: Try to enter the default container with no containers created" {
+ run $TOOLBOX <<< "n"
+ run "$TOOLBX" <<< "n"
+
+ assert_success
+ assert_line --index 0 "No toolbox containers found. Create now? [y/N] A container can be created later with the 'create' command."
@ -97,5 +100,5 @@ index 000000000000..32d87904213e
+ skip "Testing of entering toolboxes is not implemented"
+}
--
2.39.2
2.46.1