public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/y2038] support: Add 'touch' command
@ 2021-02-23 12:36 Adhemerval Zanella
  0 siblings, 0 replies; 8+ messages in thread
From: Adhemerval Zanella @ 2021-02-23 12:36 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5a662245b9db4be41b3c8809cb10c5c905a2e171

commit 5a662245b9db4be41b3c8809cb10c5c905a2e171
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Wed Aug 5 14:05:54 2020 -0300

    support: Add 'touch' command
    
    It allow creates empty files with an specific mode.

Diff:
---
 support/test-container.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/support/test-container.c b/support/test-container.c
index 28cc44d9f1..0d85bfb357 100644
--- a/support/test-container.c
+++ b/support/test-container.c
@@ -104,6 +104,7 @@ int verbose = 0;
 	 cwd PATH
 	 exec FILE
 	 mkdirp MODE DIR
+	 touch MODE FILE
 
        variables:
 	 $B/ build dir, equivalent to $(common-objpfx)
@@ -129,6 +130,7 @@ int verbose = 0;
 	 - 'cwd': set test working directory
 	 - 'exec': change test binary location (may end in /)
 	 - 'mkdirp': A minimal "mkdir -p FILE" command.
+	 - 'touch': A minimal 'touch' command to create empty files.
 
    * mytest.root/postclean.req causes fresh rsync (with delete) after
      test if present
@@ -1018,6 +1020,15 @@ main (int argc, char **argv)
 		TEST_COMPARE (errno, 0);
 		xmkdirp (the_words[2], m);
 	      }
+	    else if (nt == 3 && strcmp (the_words[0], "touch") == 0)
+	      {
+		long int m;
+		errno = 0;
+		m = strtol (the_words[1], NULL, 0);
+		TEST_COMPARE (errno, 0);
+
+		xclose (xopen (the_words[2], O_WRONLY | O_TRUNC | O_CREAT, m));
+	      }
 	    else if (nt > 0 && the_words[0][0] != '#')
 	      {
 		fprintf (stderr, "\033[31minvalid [%s]\033[0m\n", the_words[0]);


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [glibc/azanella/y2038] support: Add 'touch' command
@ 2021-03-05 19:19 Adhemerval Zanella
  0 siblings, 0 replies; 8+ messages in thread
From: Adhemerval Zanella @ 2021-03-05 19:19 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=581e15718b178754b0fdfaf492374dabcd3a3cee

commit 581e15718b178754b0fdfaf492374dabcd3a3cee
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Wed Aug 5 14:05:54 2020 -0300

    support: Add 'touch' command
    
    It allow creates empty files with an specific mode.

Diff:
---
 support/test-container.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/support/test-container.c b/support/test-container.c
index 28cc44d9f1..0d85bfb357 100644
--- a/support/test-container.c
+++ b/support/test-container.c
@@ -104,6 +104,7 @@ int verbose = 0;
 	 cwd PATH
 	 exec FILE
 	 mkdirp MODE DIR
+	 touch MODE FILE
 
        variables:
 	 $B/ build dir, equivalent to $(common-objpfx)
@@ -129,6 +130,7 @@ int verbose = 0;
 	 - 'cwd': set test working directory
 	 - 'exec': change test binary location (may end in /)
 	 - 'mkdirp': A minimal "mkdir -p FILE" command.
+	 - 'touch': A minimal 'touch' command to create empty files.
 
    * mytest.root/postclean.req causes fresh rsync (with delete) after
      test if present
@@ -1018,6 +1020,15 @@ main (int argc, char **argv)
 		TEST_COMPARE (errno, 0);
 		xmkdirp (the_words[2], m);
 	      }
+	    else if (nt == 3 && strcmp (the_words[0], "touch") == 0)
+	      {
+		long int m;
+		errno = 0;
+		m = strtol (the_words[1], NULL, 0);
+		TEST_COMPARE (errno, 0);
+
+		xclose (xopen (the_words[2], O_WRONLY | O_TRUNC | O_CREAT, m));
+	      }
 	    else if (nt > 0 && the_words[0][0] != '#')
 	      {
 		fprintf (stderr, "\033[31minvalid [%s]\033[0m\n", the_words[0]);


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [glibc/azanella/y2038] support: Add 'touch' command
@ 2021-03-04 17:36 Adhemerval Zanella
  0 siblings, 0 replies; 8+ messages in thread
From: Adhemerval Zanella @ 2021-03-04 17:36 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f39fc7d5966f4a1f864ad2d3c167d3af3e33f434

commit f39fc7d5966f4a1f864ad2d3c167d3af3e33f434
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Wed Aug 5 14:05:54 2020 -0300

    support: Add 'touch' command
    
    It allow creates empty files with an specific mode.

Diff:
---
 support/test-container.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/support/test-container.c b/support/test-container.c
index 28cc44d9f1..0d85bfb357 100644
--- a/support/test-container.c
+++ b/support/test-container.c
@@ -104,6 +104,7 @@ int verbose = 0;
 	 cwd PATH
 	 exec FILE
 	 mkdirp MODE DIR
+	 touch MODE FILE
 
        variables:
 	 $B/ build dir, equivalent to $(common-objpfx)
@@ -129,6 +130,7 @@ int verbose = 0;
 	 - 'cwd': set test working directory
 	 - 'exec': change test binary location (may end in /)
 	 - 'mkdirp': A minimal "mkdir -p FILE" command.
+	 - 'touch': A minimal 'touch' command to create empty files.
 
    * mytest.root/postclean.req causes fresh rsync (with delete) after
      test if present
@@ -1018,6 +1020,15 @@ main (int argc, char **argv)
 		TEST_COMPARE (errno, 0);
 		xmkdirp (the_words[2], m);
 	      }
+	    else if (nt == 3 && strcmp (the_words[0], "touch") == 0)
+	      {
+		long int m;
+		errno = 0;
+		m = strtol (the_words[1], NULL, 0);
+		TEST_COMPARE (errno, 0);
+
+		xclose (xopen (the_words[2], O_WRONLY | O_TRUNC | O_CREAT, m));
+	      }
 	    else if (nt > 0 && the_words[0][0] != '#')
 	      {
 		fprintf (stderr, "\033[31minvalid [%s]\033[0m\n", the_words[0]);


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [glibc/azanella/y2038] support: Add 'touch' command
@ 2021-03-04 11:29 Adhemerval Zanella
  0 siblings, 0 replies; 8+ messages in thread
From: Adhemerval Zanella @ 2021-03-04 11:29 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f39fc7d5966f4a1f864ad2d3c167d3af3e33f434

commit f39fc7d5966f4a1f864ad2d3c167d3af3e33f434
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Wed Aug 5 14:05:54 2020 -0300

    support: Add 'touch' command
    
    It allow creates empty files with an specific mode.

Diff:
---
 support/test-container.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/support/test-container.c b/support/test-container.c
index 28cc44d9f1..0d85bfb357 100644
--- a/support/test-container.c
+++ b/support/test-container.c
@@ -104,6 +104,7 @@ int verbose = 0;
 	 cwd PATH
 	 exec FILE
 	 mkdirp MODE DIR
+	 touch MODE FILE
 
        variables:
 	 $B/ build dir, equivalent to $(common-objpfx)
@@ -129,6 +130,7 @@ int verbose = 0;
 	 - 'cwd': set test working directory
 	 - 'exec': change test binary location (may end in /)
 	 - 'mkdirp': A minimal "mkdir -p FILE" command.
+	 - 'touch': A minimal 'touch' command to create empty files.
 
    * mytest.root/postclean.req causes fresh rsync (with delete) after
      test if present
@@ -1018,6 +1020,15 @@ main (int argc, char **argv)
 		TEST_COMPARE (errno, 0);
 		xmkdirp (the_words[2], m);
 	      }
+	    else if (nt == 3 && strcmp (the_words[0], "touch") == 0)
+	      {
+		long int m;
+		errno = 0;
+		m = strtol (the_words[1], NULL, 0);
+		TEST_COMPARE (errno, 0);
+
+		xclose (xopen (the_words[2], O_WRONLY | O_TRUNC | O_CREAT, m));
+	      }
 	    else if (nt > 0 && the_words[0][0] != '#')
 	      {
 		fprintf (stderr, "\033[31minvalid [%s]\033[0m\n", the_words[0]);


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [glibc/azanella/y2038] support: Add 'touch' command
@ 2021-03-02 12:30 Adhemerval Zanella
  0 siblings, 0 replies; 8+ messages in thread
From: Adhemerval Zanella @ 2021-03-02 12:30 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7a8b4e7a0f4386d47bbed960d4da9e165c45749b

commit 7a8b4e7a0f4386d47bbed960d4da9e165c45749b
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Wed Aug 5 14:05:54 2020 -0300

    support: Add 'touch' command
    
    It allow creates empty files with an specific mode.

Diff:
---
 support/test-container.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/support/test-container.c b/support/test-container.c
index 28cc44d9f1..0d85bfb357 100644
--- a/support/test-container.c
+++ b/support/test-container.c
@@ -104,6 +104,7 @@ int verbose = 0;
 	 cwd PATH
 	 exec FILE
 	 mkdirp MODE DIR
+	 touch MODE FILE
 
        variables:
 	 $B/ build dir, equivalent to $(common-objpfx)
@@ -129,6 +130,7 @@ int verbose = 0;
 	 - 'cwd': set test working directory
 	 - 'exec': change test binary location (may end in /)
 	 - 'mkdirp': A minimal "mkdir -p FILE" command.
+	 - 'touch': A minimal 'touch' command to create empty files.
 
    * mytest.root/postclean.req causes fresh rsync (with delete) after
      test if present
@@ -1018,6 +1020,15 @@ main (int argc, char **argv)
 		TEST_COMPARE (errno, 0);
 		xmkdirp (the_words[2], m);
 	      }
+	    else if (nt == 3 && strcmp (the_words[0], "touch") == 0)
+	      {
+		long int m;
+		errno = 0;
+		m = strtol (the_words[1], NULL, 0);
+		TEST_COMPARE (errno, 0);
+
+		xclose (xopen (the_words[2], O_WRONLY | O_TRUNC | O_CREAT, m));
+	      }
 	    else if (nt > 0 && the_words[0][0] != '#')
 	      {
 		fprintf (stderr, "\033[31minvalid [%s]\033[0m\n", the_words[0]);


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [glibc/azanella/y2038] support: Add 'touch' command
@ 2021-03-01 17:35 Adhemerval Zanella
  0 siblings, 0 replies; 8+ messages in thread
From: Adhemerval Zanella @ 2021-03-01 17:35 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=88a7f1f57731cd01677f900938863ab17766a121

commit 88a7f1f57731cd01677f900938863ab17766a121
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Wed Aug 5 14:05:54 2020 -0300

    support: Add 'touch' command
    
    It allow creates empty files with an specific mode.

Diff:
---
 support/test-container.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/support/test-container.c b/support/test-container.c
index 28cc44d9f1..0d85bfb357 100644
--- a/support/test-container.c
+++ b/support/test-container.c
@@ -104,6 +104,7 @@ int verbose = 0;
 	 cwd PATH
 	 exec FILE
 	 mkdirp MODE DIR
+	 touch MODE FILE
 
        variables:
 	 $B/ build dir, equivalent to $(common-objpfx)
@@ -129,6 +130,7 @@ int verbose = 0;
 	 - 'cwd': set test working directory
 	 - 'exec': change test binary location (may end in /)
 	 - 'mkdirp': A minimal "mkdir -p FILE" command.
+	 - 'touch': A minimal 'touch' command to create empty files.
 
    * mytest.root/postclean.req causes fresh rsync (with delete) after
      test if present
@@ -1018,6 +1020,15 @@ main (int argc, char **argv)
 		TEST_COMPARE (errno, 0);
 		xmkdirp (the_words[2], m);
 	      }
+	    else if (nt == 3 && strcmp (the_words[0], "touch") == 0)
+	      {
+		long int m;
+		errno = 0;
+		m = strtol (the_words[1], NULL, 0);
+		TEST_COMPARE (errno, 0);
+
+		xclose (xopen (the_words[2], O_WRONLY | O_TRUNC | O_CREAT, m));
+	      }
 	    else if (nt > 0 && the_words[0][0] != '#')
 	      {
 		fprintf (stderr, "\033[31minvalid [%s]\033[0m\n", the_words[0]);


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [glibc/azanella/y2038] support: Add 'touch' command
@ 2021-02-26 20:41 Adhemerval Zanella
  0 siblings, 0 replies; 8+ messages in thread
From: Adhemerval Zanella @ 2021-02-26 20:41 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9ff5bd3559fe095b9703f1cbdf81b04f8474287f

commit 9ff5bd3559fe095b9703f1cbdf81b04f8474287f
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Wed Aug 5 14:05:54 2020 -0300

    support: Add 'touch' command
    
    It allow creates empty files with an specific mode.

Diff:
---
 support/test-container.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/support/test-container.c b/support/test-container.c
index 28cc44d9f1..0d85bfb357 100644
--- a/support/test-container.c
+++ b/support/test-container.c
@@ -104,6 +104,7 @@ int verbose = 0;
 	 cwd PATH
 	 exec FILE
 	 mkdirp MODE DIR
+	 touch MODE FILE
 
        variables:
 	 $B/ build dir, equivalent to $(common-objpfx)
@@ -129,6 +130,7 @@ int verbose = 0;
 	 - 'cwd': set test working directory
 	 - 'exec': change test binary location (may end in /)
 	 - 'mkdirp': A minimal "mkdir -p FILE" command.
+	 - 'touch': A minimal 'touch' command to create empty files.
 
    * mytest.root/postclean.req causes fresh rsync (with delete) after
      test if present
@@ -1018,6 +1020,15 @@ main (int argc, char **argv)
 		TEST_COMPARE (errno, 0);
 		xmkdirp (the_words[2], m);
 	      }
+	    else if (nt == 3 && strcmp (the_words[0], "touch") == 0)
+	      {
+		long int m;
+		errno = 0;
+		m = strtol (the_words[1], NULL, 0);
+		TEST_COMPARE (errno, 0);
+
+		xclose (xopen (the_words[2], O_WRONLY | O_TRUNC | O_CREAT, m));
+	      }
 	    else if (nt > 0 && the_words[0][0] != '#')
 	      {
 		fprintf (stderr, "\033[31minvalid [%s]\033[0m\n", the_words[0]);


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [glibc/azanella/y2038] support: Add 'touch' command
@ 2021-02-23 20:39 Adhemerval Zanella
  0 siblings, 0 replies; 8+ messages in thread
From: Adhemerval Zanella @ 2021-02-23 20:39 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5429827ed63d980e492c0b44b670ad36587d1f2e

commit 5429827ed63d980e492c0b44b670ad36587d1f2e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Wed Aug 5 14:05:54 2020 -0300

    support: Add 'touch' command
    
    It allow creates empty files with an specific mode.

Diff:
---
 support/test-container.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/support/test-container.c b/support/test-container.c
index 28cc44d9f1..0d85bfb357 100644
--- a/support/test-container.c
+++ b/support/test-container.c
@@ -104,6 +104,7 @@ int verbose = 0;
 	 cwd PATH
 	 exec FILE
 	 mkdirp MODE DIR
+	 touch MODE FILE
 
        variables:
 	 $B/ build dir, equivalent to $(common-objpfx)
@@ -129,6 +130,7 @@ int verbose = 0;
 	 - 'cwd': set test working directory
 	 - 'exec': change test binary location (may end in /)
 	 - 'mkdirp': A minimal "mkdir -p FILE" command.
+	 - 'touch': A minimal 'touch' command to create empty files.
 
    * mytest.root/postclean.req causes fresh rsync (with delete) after
      test if present
@@ -1018,6 +1020,15 @@ main (int argc, char **argv)
 		TEST_COMPARE (errno, 0);
 		xmkdirp (the_words[2], m);
 	      }
+	    else if (nt == 3 && strcmp (the_words[0], "touch") == 0)
+	      {
+		long int m;
+		errno = 0;
+		m = strtol (the_words[1], NULL, 0);
+		TEST_COMPARE (errno, 0);
+
+		xclose (xopen (the_words[2], O_WRONLY | O_TRUNC | O_CREAT, m));
+	      }
 	    else if (nt > 0 && the_words[0][0] != '#')
 	      {
 		fprintf (stderr, "\033[31minvalid [%s]\033[0m\n", the_words[0]);


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-03-05 19:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-23 12:36 [glibc/azanella/y2038] support: Add 'touch' command Adhemerval Zanella
2021-02-23 20:39 Adhemerval Zanella
2021-02-26 20:41 Adhemerval Zanella
2021-03-01 17:35 Adhemerval Zanella
2021-03-02 12:30 Adhemerval Zanella
2021-03-04 11:29 Adhemerval Zanella
2021-03-04 17:36 Adhemerval Zanella
2021-03-05 19:19 Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).