mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeremy Kerr <jk@ozlabs.org>
To: linux-kernel@vger.kernel.org
Cc: linux-efi@vger.kernel.org, Matt Fleming <matt.fleming@intel.com>,
	Lingzhu Xiang <lxiang@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH 2/3 v3] selftests/efivarfs: Add empty file creation test
Date: Wed, 06 Feb 2013 22:48:08 +0800	[thread overview]
Message-ID: <1360162088.143301.227254679723.2.gpush@pecola> (raw)
In-Reply-To: <1360162088.142733.191120808822.0.gpush@pecola>

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>

---
 tools/testing/selftests/efivarfs/efivarfs.sh |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/tools/testing/selftests/efivarfs/efivarfs.sh b/tools/testing/selftests/efivarfs/efivarfs.sh
index e8c0d27..3af4b37 100755
--- a/tools/testing/selftests/efivarfs/efivarfs.sh
+++ b/tools/testing/selftests/efivarfs/efivarfs.sh
@@ -58,6 +58,18 @@ test_create()
 	fi
 }
 
+test_create_empty()
+{
+	local file=$efivarfs_mount/$FUNCNAME-$test_guid
+
+	: > $file
+
+	if [ ! -e $file ]; then
+		echo "$file can not be created without writing" >&2
+		exit 1
+	fi
+}
+
 test_delete()
 {
 	local attrs='\x07\x00\x00\x00'
@@ -112,6 +124,7 @@ check_prereqs
 rc=0
 
 run_test test_create
+run_test test_create_empty
 run_test test_delete
 run_test test_zero_size_delete
 run_test test_open_unlink

      parent reply	other threads:[~2013-02-06 14:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-06 14:48 [PATCH 0/3 v3] selftests: Add efivarfs tests Jeremy Kerr
2013-02-06 14:48 ` [PATCH 3/3 v3] selftests/efivarfs: Add create-read test Jeremy Kerr
2013-02-06 14:48 ` [PATCH 1/3 v3] selftests: Add tests for efivarfs Jeremy Kerr
2013-02-07 23:13   ` Andrew Morton
2013-02-08 10:02     ` [PATCH] Documentation: Add a simple doc for selftests Jeremy Kerr
2013-02-12 23:56       ` Andrew Morton
2013-02-08 10:05     ` [PATCH 1/3 v3] selftests: Add tests for efivarfs Jeremy Kerr
2013-02-08 10:08       ` Matt Fleming
2013-02-12 23:50         ` Andrew Morton
2013-02-13  7:32           ` Matt Fleming
2013-02-12 23:48       ` Andrew Morton
2013-02-06 14:48 ` Jeremy Kerr [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1360162088.143301.227254679723.2.gpush@pecola \
    --to=jk@ozlabs.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lxiang@redhat.com \
    --cc=matt.fleming@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®