Re: [Fuego] Patch for Functional.check_mounts

Kumar T <[email protected]>
Newsgroups dev.linux.lists.fuego
Message-ID <CA+wOOGi2+wQ6mHJiT+DpWLYt5ODbxTHUHKH_kcPOnkZ9K2k5TA@mail.gmail.com>
Hi Tim,

Thanks for your comments.

I have combined the patches as single patch. Please find the attached PATCH
and source files.

Thanks,
Kumar.

On Wed, 20 Nov 2019 at 01:10, <[email protected]> wrote:

>
>
> > -----Original Message-----
> > From: Kumar T
> >
> > Hi Tim,
> >
> >       I am Kumar from HCL Technologies. I am developing test cases for
> > "Functional.check_mounts" as discussed earlier. Updated the code as per
> > your review comments.
> >
> >
> > Please find the attached PATCH and other source files. Please review.
>
> The patch you sent consists of edits on top of material that is not
> upstream
> yet.
>
> You need to combine this work with the previous work and submit it
> as one patch.  If the previous patch had been accepted upstream,
> this patch consisting of changes would be appropriate.  However,
> I need to see the entire test as a single patch in order to review it.
>
> Please use an interactive rebase to combine the commits into a single
> commit, and then send that patch.  You can see this blog entry:
>
> https://thoughtbot.com/blog/git-interactive-rebase-squash-amend-rewriting-history
> for some instructions on how to do a rebase.  See especially the section
> "Squash commits together".
>
> Thanks,
>  -- Tim
>
>
>
>
>
>
0001-check_mounts-PATCH-1-1.patch (text/x-patch, 6.2 KB)
From e743b49fe70950a8bd3e799808f531b72d4b9ff0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=8B?= <​>
Date: Wed, 23 Oct 2019 16:14:17 +0530
Subject: [PATCH] <check_mounts>:[PATCH 1/1]

This PATCH added test cases to check the expected mounts
with system mount points. If any mount point is not matched
test would fail. It has save_baseline spec to save the
system mount points as expected mount points.

Signed-off-by: Kumar Thangavel <[email protected]>
---
 tests/Functional.check_mounts/fs-test-1.1.tgz | Bin 0 -> 2209 bytes
 tests/Functional.check_mounts/fuego_test.sh   |  41 ++++++++++++++++++
 tests/Functional.check_mounts/spec.json       |  11 +++++
 tests/Functional.check_mounts/test.yaml       |  15 +++++++
 4 files changed, 67 insertions(+)
 create mode 100644 tests/Functional.check_mounts/fs-test-1.1.tgz
 create mode 100755 tests/Functional.check_mounts/fuego_test.sh
 create mode 100644 tests/Functional.check_mounts/spec.json
 create mode 100644 tests/Functional.check_mounts/test.yaml

diff --git a/tests/Functional.check_mounts/fs-test-1.1.tgz b/tests/Functional.check_mounts/fs-test-1.1.tgz
new file mode 100644
index 0000000000000000000000000000000000000000..1f832d3c62f4b21b36c1148313c20841fae9ecdb
GIT binary patch
literal 2209
zcmV;S2wwLeiwFQZDX?7t1MOLRbJ|D}_rK^<bP?YgdwKemDmzX^1`(^4hf9cLbB>D=
zVg%X<jY^N$j?dqHyGIfd7$?~~@1|16RASJ~^snFDqrnO)Aq&DvquQu#{Y|5e<K@v2
zeKuYm)$^a}*lHXc9Ua#94-XD;zR{>3?{C4;-z89fL_uiy09(v+zPj&Q>p$tRa{jl1
z5q+<k&&=cN{%`Czj*nOTzyGp+yan}VmSgSsKlgua@B4-Xd$5QPsDR1mp5fc>6v7#U
z;4TQ+94y;OzXxz*hck!*<^#L+m>IIk(mDbXW|Mn&zCE3VuwQQ+!+^VYIOluZH$t1c
zv_+1>8TU`%w`h)@(r1P{H9j*3UWMt`>Zdm|)2X6NuZf^zo6HT^33OFGVROm+xg7+E
z2zCH7=Ckn~Ont*evC3fii~+a6oEiR<l_BI{pd23a10>+%(6C)pm4FP?+`FUA;S7-i
zZiP37&v5?)j3D5qZIGrDZbozFhC&IUcK{`{6hRaR2~lxZu$nN#0oxUZOqYc9coc$<
z2KQ}~V9L13bfQTjNxH+a=XSz}5QH%U!bRJcg|uau^NDTIClmU4(b%zrS(#uaHZd4S
zA<hRhFKkyPg=*Y~fH@9<*r<R|I+IcCK}Lk)k$uC&VuJh4jL(-<LUUP>?;>M15qfhp
zpJ4h2hDQQK6c%?JenYWka(7~rYQah3NFCRWG5^ejW^v@WJVdEuX~-#F=ImrCm>H<X
zSeQRHB8q?}H*(7PBncJ+H?+|o7=VKBs?ya|jtd0_{kHyI))Y_&aH;j*sV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!jK3Lgh0d04M+e6E#B`

literal 0
HcmV?d00001

diff --git a/tests/Functional.check_mounts/fuego_test.sh b/tests/Functional.check_mounts/fuego_test.sh
new file mode 100755
index 0000000..609999b
--- /dev/null
+++ b/tests/Functional.check_mounts/fuego_test.sh
@@ -0,0 +1,41 @@
+tarball=fs-test-1.1.tgz
+
+function test_build {
+    make
+}
+
+function test_deploy {
+
+    EXPECTED_FILE=/fuego-rw/boards/$NODE_NAME/expected_mounts.txt
+
+    if [ "$TESTSPEC" = "default" ] ; then
+
+    	if [ -f "${EXPECTED_FILE}" ] ; then
+      	    put "${EXPECTED_FILE}" $BOARD_TESTDIR/fuego.$TESTDIR/ 
+	else
+            abort_job "Please create file ${EXPECTED_FILE} with the list of expected mounts"
+        fi
+
+        put fs_test $BOARD_TESTDIR/fuego.$TESTDIR/
+    fi
+
+}
+ 
+function test_run {
+
+    DATA_FILE=$LOGDIR/expected_mount_data.txt
+
+    if [ "$TESTSPEC" = "save_baseline" ] ; then
+        mount | awk '{print substr($1, 1, length($1))}'>$DATA_FILE
+	cp $DATA_FILE ${EXPECTED_FILE}
+        log_this "echo \"baseline file: ${EXPECTED_FILE} saved\""
+        return 0
+    else
+        report "cd $BOARD_TESTDIR/fuego.$TESTDIR; \
+        ./fs_test"
+    fi
+}
+
+function test_processing {
+    log_compare "$TESTDIR" "0" "FAIL" "n"
+}
diff --git a/tests/Functional.check_mounts/spec.json b/tests/Functional.check_mounts/spec.json
new file mode 100644
index 0000000..e3e383f
--- /dev/null
+++ b/tests/Functional.check_mounts/spec.json
@@ -0,0 +1,11 @@
+{
+    "testName": "Functional.check_mounts",
+    "specs": {
+        "default": {
+	},
+	"save_baseline": {
+            "save_baseline": "true"
+	}
+    }
+}
+
diff --git a/tests/Functional.check_mounts/test.yaml b/tests/Functional.check_mounts/test.yaml
new file mode 100644
index 0000000..beaa67c
--- /dev/null
+++ b/tests/Functional.check_mounts/test.yaml
@@ -0,0 +1,15 @@
+fuego_package_version: 1
+name: Functional.check_mounts
+description: |
+    Run fs_test, using an 'expected_mounts.txt' file, in order to verify
+    that the mouned filesystems on the target board are as expected.
+license: MIT
+author: Kumar Thangavel <[email protected]>
+maintainer: Kumar Thangavel <[email protected]>
+version: 1.1
+fuego_release: 1
+type: Functional
+tags: ['example']
+data_files:
+ - fs-test-1.1.tgz
+ - spec.json
-- 
2.17.1
fs-test-1.1.tgz (application/x-compressed-tar, 2.2 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.