bug#34894: Another solaris 10 ln issue on 8.31

2019-03-28 Thread Assaf Gordon

tags 34894 fixed
close 34894
stop

On 2019-03-17 3:17 p.m., John Marino wrote:

On 3/17/2019 15:28, Paul Eggert wrote:

John Marino wrote:

After applying the recent patch to 8.31 ln to fix functionality on
solaris 10, I saw some improvement but I think there's something else
wrong.


Thanks. Could you please try the attached patch, which I installed on
master?


Installed here:
https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=3e0dff3925b5e521cae468087950e85b60002d1c


Okay, that seems to fix the regression on ln.


Thanks for confirming, I'm closing this bug.

-assaf







bug#34894: Another solaris 10 ln issue on 8.31

2019-03-17 Thread John Marino

On 3/17/2019 15:28, Paul Eggert wrote:

John Marino wrote:

After applying the recent patch to 8.31 ln to fix functionality on
solaris 10, I saw some improvement but I think there's something else
wrong.

e.g. # ln -s /raven/etc/fonts/conf.avail/50-user.conf .
ln: failed to create symbolic link '.': Invalid argument


Thanks. Could you please try the attached patch, which I installed on
master?

Also, please try running 'make check'. It should catch bugs like this.


Okay, that seems to fix the regression on ln.
I ran the test in a limited environment, which is why many of the tests 
were skipped.  However, there was one failure with tee you should look 
at (attached).



Testsuite summary for GNU coreutils 8.31

# TOTAL: 616
# PASS:  405
# SKIP:  210
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

Regards,
John

FAIL: tests/misc/tee


++ initial_cwd_=/construction/coreutils/coreutils-8.31
+++ testdir_prefix_
+++ printf gt
++ pfx_=gt
+++ mktempd_ /construction/coreutils/coreutils-8.31 gt-tee.sh.
+++ case $# in
+++ destdir_=/construction/coreutils/coreutils-8.31
+++ template_=gt-tee.sh.
+++ MAX_TRIES_=4
+++ case $destdir_ in
+++ destdir_slash_=/construction/coreutils/coreutils-8.31/
+++ case $template_ in
 unset TMPDIR
+++ d=/construction/coreutils/coreutils-8.31/gt-tee.sh.NJqa
+++ case $d in
+++ :
+++ test -d /construction/coreutils/coreutils-8.31/gt-tee.sh.NJqa
 ls -dgo /construction/coreutils/coreutils-8.31/gt-tee.sh.NJqa
+++ perms='drwx-- 2 117 Mar 17 21:09 
/construction/coreutils/coreutils-8.31/gt-tee.sh.NJqa'
+++ case $perms in
+++ :
+++ echo /construction/coreutils/coreutils-8.31/gt-tee.sh.NJqa
+++ return
++ test_dir_=/construction/coreutils/coreutils-8.31/gt-tee.sh.NJqa
++ cd /construction/coreutils/coreutils-8.31/gt-tee.sh.NJqa
++ gl_init_sh_nl_='
'
++ IFS='
'
++ for sig_ in 1 2 3 13 15
+++ expr 1 + 128
++ eval 'trap '\''Exit 129'\'' 1'
+++ trap 'Exit 129' 1
++ for sig_ in 1 2 3 13 15
+++ expr 2 + 128
++ eval 'trap '\''Exit 130'\'' 2'
+++ trap 'Exit 130' 2
++ for sig_ in 1 2 3 13 15
+++ expr 3 + 128
++ eval 'trap '\''Exit 131'\'' 3'
+++ trap 'Exit 131' 3
++ for sig_ in 1 2 3 13 15
+++ expr 13 + 128
++ eval 'trap '\''Exit 141'\'' 13'
+++ trap 'Exit 141' 13
++ for sig_ in 1 2 3 13 15
+++ expr 15 + 128
++ eval 'trap '\''Exit 143'\'' 15'
+++ trap 'Exit 143' 15
++ trap remove_tmp_ 0
+ path_prepend_ ./src
+ test 1 '!=' 0
+ path_dir_=./src
+ case $path_dir_ in
+ abs_path_dir_=/construction/coreutils/coreutils-8.31/./src
+ case $abs_path_dir_ in
+ 
PATH=/construction/coreutils/coreutils-8.31/./src:/construction/coreutils/coreutils-8.31/src:/usr/xpg4/bin:/bin:/usr/bin:/raven/toolchain/gcc8/bin:/raven/toolchain/bin:/raven/sbin:/raven/bin:/sbin:/usr/sbin
+ create_exe_shims_ /construction/coreutils/coreutils-8.31/./src
+ case $EXEEXT in
+ return 0
+ shift
+ test 0 '!=' 0
+ export PATH
+ print_ver_ tee
+ require_built_ tee
+ skip_=no
+ for i in '"$@"'
+ case " $built_programs " in
+ test no = yes
+ test yes = yes
+ local i
+ for i in '$*'
+ env tee --version
tee (GNU coreutils) 8.31
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later .
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Mike Parker, Richard M. Stallman, and David MacKenzie.
+ echo line
+ for n in 0 1 2 12 13
++ seq 0
+ files=
+ rm -f
+ tee
+ for f in out '$files'
+ compare sample out
+ compare_dev_null_ sample out
+ test 2 = 2
+ test xsample = x/dev/null
+ test xout = x/dev/null
+ return 2
+ case $? in
+ compare_ sample out
+ diff -u sample out
+ for n in 0 1 2 12 13
++ seq 1
+ files=1
+ rm -f 1
+ tee 1
+ for f in out '$files'
+ compare sample out
+ compare_dev_null_ sample out
+ test 2 = 2
+ test xsample = x/dev/null
+ test xout = x/dev/null
+ return 2
+ case $? in
+ compare_ sample out
+ diff -u sample out
+ for f in out '$files'
+ compare sample 1
+ compare_dev_null_ sample 1
+ test 2 = 2
+ test xsample = x/dev/null
+ test x1 = x/dev/null
+ return 2
+ case $? in
+ compare_ sample 1
+ diff -u sample 1
+ for n in 0 1 2 12 13
++ seq 2
+ files='1
2'
+ rm -f 1 2
+ tee 1 2
+ for f in out '$files'
+ compare sample out
+ compare_dev_null_ sample out
+ test 2 = 2
+ test xsample = x/dev/null
+ test xout = x/dev/null
+ return 2
+ case $? in
+ compare_ sample out
+ diff -u sample out
+ for f in out '$files'
+ compare sample 1
+ compare_dev_null_ sample 1
+ test 2 = 2
+ test xsample = x/dev/null
+ test x1 = x/dev/null
+ return 2
+ case $? in
+ compare_ sample 1
+ diff -u sample 1
+ for f in out '$files'
+ compare sample 2
+ compare_dev_null_ sample 2
+ test 2 = 2
+ test xsample = x/dev/null
+ test x2 = x/dev/null
+ return 2
+ case $? in
+ compare_ sample 2
+ diff -u sample 2
+ for n in 0 1 2 12 13
++ seq 

bug#34894: Another solaris 10 ln issue on 8.31

2019-03-17 Thread Paul Eggert

John Marino wrote:
After applying the recent patch to 8.31 ln to fix functionality on solaris 10, I 
saw some improvement but I think there's something else wrong.


e.g. # ln -s /raven/etc/fonts/conf.avail/50-user.conf .
ln: failed to create symbolic link '.': Invalid argument


Thanks. Could you please try the attached patch, which I installed on master?

Also, please try running 'make check'. It should catch bugs like this.
>From 3e0dff3925b5e521cae468087950e85b60002d1c Mon Sep 17 00:00:00 2001
From: Paul Eggert 
Date: Sun, 17 Mar 2019 13:20:42 -0700
Subject: [PATCH] ln: port to symlink ("x", ".") failing with EINVAL

Problem reported by John Marino (Bug#34894).
* src/ln.c (main): Port ln -s to Solaris symlink function,
where symlink ("x", ".") fails with errno == EINVAL.
---
 src/ln.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/ln.c b/src/ln.c
index a5b012b39..646ca3d4d 100644
--- a/src/ln.c
+++ b/src/ln.c
@@ -603,7 +603,8 @@ main (int argc, char **argv)
 {
   if (n_files == 2 && !target_directory)
 link_errno = atomic_link (file[0], AT_FDCWD, file[1]);
-  if (link_errno < 0 || link_errno == EEXIST || link_errno == ENOTDIR)
+  if (link_errno < 0 || link_errno == EEXIST || link_errno == ENOTDIR
+	  || link_errno == EINVAL)
 {
   char const *d
 = target_directory ? target_directory : file[n_files - 1];
-- 
2.17.1



bug#34894: Another solaris 10 ln issue on 8.31

2019-03-17 Thread John Marino
After applying the recent patch to 8.31 ln to fix functionality on 
solaris 10, I saw some improvement but I think there's something else wrong.


e.g. # ln -s /raven/etc/fonts/conf.avail/50-user.conf .
ln: failed to create symbolic link '.': Invalid argument

I'm sure commands like that worked with version 8.30.

Regards,
John