summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorUlf Hermann <[email protected]>2017-05-04 17:25:35 +0200
committerUlf Hermann <[email protected]>2017-05-08 12:06:41 +0000
commit5330df77490e15d23f27cdfe06e3374b0d9086f8 (patch)
tree518d9236621ca2179af620dbea97634a67312e22 /tests
parent99b4bda9c43ece1987212ddccecc3102488f3b09 (diff)
Write to /dev/null rather than /dev/zero
/dev/zero is meant for reading zeroes. /dev/null is for writing into nirvana. Change-Id: Ic04eaefd72944776a1d3515c0008baf3d3d8de09 Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog4
-rw-r--r--tests/elfshphehdr.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index b8de1386..fef6f55a 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,5 +1,9 @@
2017-05-04 Ulf Hermann <[email protected]>
+ * elfshphehdr.c: For writing, use /dev/null rather than /dev/zero.
+
+2017-05-04 Ulf Hermann <[email protected]>
+
* newfile.c: Close the file when we're done and unlink it afterwards.
* newscn.c: Likewise.
* update1.c: Likewise.
diff --git a/tests/elfshphehdr.c b/tests/elfshphehdr.c
index d1ab633b..e0f0712f 100644
--- a/tests/elfshphehdr.c
+++ b/tests/elfshphehdr.c
@@ -152,7 +152,7 @@ main (int argc __attribute__ ((unused)), char **argv __attribute ((unused)))
{
elf_version (EV_CURRENT);
- int fd = fd = open("/dev/zero", O_WRONLY | O_BINARY);
+ int fd = fd = open("/dev/null", O_WRONLY | O_BINARY);
check ("open", fd >= 0);
Elf *elf;