Browse Source

Migrate preupg/in-pipe from downstream

Alois Mahdal 6 years ago
parent
commit
cdb5b36e02
2 changed files with 30 additions and 0 deletions
  1. 2
    0
      src/preupg/in-pipe/main.fmf
  2. 28
    0
      src/preupg/in-pipe/test

+ 2
- 0
src/preupg/in-pipe/main.fmf View File

@@ -0,0 +1,2 @@
1
+description: running in UNIX pipe
2
+timeout: 15m

+ 28
- 0
src/preupg/in-pipe/test View File

@@ -0,0 +1,28 @@
1
+#!/bin/bash
2
+
3
+shellfu import jat_dump
4
+shellfu import preupg_fupath
5
+
6
+jat__pstarts "collect outputs"
7
+    preupg_fupath RHEL6_7 @pass @failed @informational @not_applicable
8
+    jat__eval -S 2 -h "run preupg and confirm via non-tty stdin" \
9
+        "preupg -c RHEL6_7/all-xccdf.xml <<<y >preupg.out 2>preupg.err"
10
+jat__pend
11
+
12
+jat__pstartt "BZ#1231410"       # preupgrade fails if stdin fed from pipe (list index out of range)
13
+    ERR="preupg: error: list index out of range"
14
+    jat__cmd -S 1 -h "the known error is not seen: $ERR" \
15
+        grep "$ERR" preupg.err
16
+jat__pend
17
+
18
+#FIXME: enable after PR#343
19
+#       https://github.com/upgrades-migrations/preupgrade-assistant/issues/343
20
+jat__pstartt "BZ#1331416"       # preupg prints error messages when stdin is redirected from pipe
21
+    ERR="Inappropriate ioctl for device"
22
+    jat__cmd -S 1 -h "the known error is not seen: $ERR" \
23
+        grep "$ERR" preupg.err
24
+jat__pend
25
+
26
+jat__pstartd
27
+    jat_dump__file preupg.out preupg.err
28
+jat__pend