{"thread":{"id":"46173","subject":"t1308-config-set.sh fails on current master","startedAt":"2017-06-14T01:15:23Z","lastAt":"2017-06-14T11:00:06Z","messageCount":7,"participants":["Øyvind A. Holm","Jonathan Nieder","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"322179","messageId":"20170614011514.sh4euddp44hjbu4u@sunbase.org","threadId":"46173","inReplyTo":null,"subject":"t1308-config-set.sh fails on current master","fromName":"Øyvind A. Holm","fromEmail":"sunny@sunbase.org","sentAt":"2017-06-14T01:15:15Z","receivedAt":"2017-06-14T01:15:23Z","isPatch":false,"sender":{"key":"sunny@sunbase.org","avatar":"https://avatars.githubusercontent.com/u/113445?v=4"},"body":"t1308-config-set.sh fails on current master (v2.13.1-449-g02a2850ad58e). \nThe error is introduced by commit e2d90fd1c33a (\"config.mak.uname: set \nFREAD_READS_DIRECTORIES for Linux and FreeBSD\"). Reverting the commit \nresults in a conflict, but the test works on the commit before, \n02912f477586.\n\nTested on\n\n  Debian GNU/Linux 8.8 (jessie)\n  Linux Mint 18 Sarah\n\nTest output:\n\n  $ ./t1308-config-set.sh\n  ok 1 - setup default config\n  ok 2 - get value for a simple key\n  ok 3 - get value for a key with value as an empty string\n  ok 4 - get value for a key with value as NULL\n  ok 5 - upper case key\n  ok 6 - mixed case key\n  ok 7 - key and value with mixed case\n  ok 8 - key with case sensitive subsection\n  ok 9 - key with case insensitive section header\n  ok 10 - key with case insensitive section header & variable\n  ok 11 - find value with misspelled key\n  ok 12 - find value with the highest priority\n  ok 13 - find integer value for a key\n  ok 14 - find string value for a key\n  ok 15 - check line error when NULL string is queried\n  ok 16 - find integer if value is non parse-able\n  ok 17 - find bool value for the entered key\n  ok 18 - find multiple values\n  ok 19 - find value from a configset\n  ok 20 - find value with highest priority from a configset\n  ok 21 - find value_list for a key from a configset\n  ok 22 - proper error on non-existent files\n  not ok 23 - proper error on directory \"files\"\n  #\n  #               echo \"Error (-1) reading configuration file a-directory.\" >expect &&\n  #               mkdir a-directory &&\n  #               test_expect_code 2 test-config configset_get_value foo.bar a-directory 2>output &&\n  #               grep \"^warning:\" output &&\n  #               grep \"^Error\" output >actual &&\n  #               test_cmp expect actual\n  #\n  ok 24 - proper error on non-accessible files\n  ok 25 - proper error on error in default config files\n  ok 26 - proper error on error in custom config files\n  ok 27 - check line errors for malformed values\n  ok 28 - error on modifying repo config without repo\n  ok 29 - iteration shows correct origins\n  # failed 1 among 29 test(s)\n  1..29\n  $\n\nØyvind\n\nN 60.376° E 5.3334°\nOpenPGP fingerprint: A006 05D6 E676 B319 55E2  E77E FB0C BEE8 94A5 06E5\n2daabdde-509d-11e7-a17a-db5caa6d21d3\n"},{"id":"322181","messageId":"20170614012535.GU133952@aiede.mtv.corp.google.com","threadId":"46173","inReplyTo":"20170614011514.sh4euddp44hjbu4u@sunbase.org","subject":"Re: t1308-config-set.sh fails on current master","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2017-06-14T01:25:35Z","receivedAt":"2017-06-14T01:25:43Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi Øyvind,\n\nØyvind A. Holm wrote:\n\n> t1308-config-set.sh fails on current master (v2.13.1-449-g02a2850ad58e). \n> The error is introduced by commit e2d90fd1c33a (\"config.mak.uname: set \n> FREAD_READS_DIRECTORIES for Linux and FreeBSD\"). Reverting the commit \n> results in a conflict, but the test works on the commit before, \n> 02912f477586.\n>\n> Tested on\n>\n>   Debian GNU/Linux 8.8 (jessie)\n>   Linux Mint 18 Sarah\n\nInteresting.  I'm not able to reproduce it, but of course that doesn't\nmean much.\n\n> Test output:\n> \n>   $ ./t1308-config-set.sh\n>   ok 1 - setup default config\n>   ok 2 - get value for a simple key\n>   ok 3 - get value for a key with value as an empty string\n>   ok 4 - get value for a key with value as NULL\n>   ok 5 - upper case key\n>   ok 6 - mixed case key\n>   ok 7 - key and value with mixed case\n>   ok 8 - key with case sensitive subsection\n>   ok 9 - key with case insensitive section header\n>   ok 10 - key with case insensitive section header & variable\n>   ok 11 - find value with misspelled key\n>   ok 12 - find value with the highest priority\n>   ok 13 - find integer value for a key\n>   ok 14 - find string value for a key\n>   ok 15 - check line error when NULL string is queried\n>   ok 16 - find integer if value is non parse-able\n>   ok 17 - find bool value for the entered key\n>   ok 18 - find multiple values\n>   ok 19 - find value from a configset\n>   ok 20 - find value with highest priority from a configset\n>   ok 21 - find value_list for a key from a configset\n>   ok 22 - proper error on non-existent files\n>   not ok 23 - proper error on directory \"files\"\n>   #\n>   #               echo \"Error (-1) reading configuration file a-directory.\" >expect &&\n>   #               mkdir a-directory &&\n>   #               test_expect_code 2 test-config configset_get_value foo.bar a-directory 2>output &&\n>   #               grep \"^warning:\" output &&\n>   #               grep \"^Error\" output >actual &&\n>   #               test_cmp expect actual\n>   #\n>   ok 24 - proper error on non-accessible files\n>   ok 25 - proper error on error in default config files\n>   ok 26 - proper error on error in custom config files\n>   ok 27 - check line errors for malformed values\n>   ok 28 - error on modifying repo config without repo\n>   ok 29 - iteration shows correct origins\n>   # failed 1 among 29 test(s)\n>   1..29\n\nWhat is the output of the following command?\n\n\t./t1308-config-set.sh --run=1,23 -x -v -i\n\nOther diagnostics:\n\n- what is the output of \"env\"?\n- cat ../GIT-BUILD-OPTIONS\n- if you run that under 'strace -f -o /tmp/strace.out', does the\n  strace.out say anything interesting?\n\nThanks,\nJonathan\n"},{"id":"322182","messageId":"20170614021739.erkdifufziwiqjxp@sunbase.org","threadId":"46173","inReplyTo":"20170614012535.GU133952@aiede.mtv.corp.google.com","subject":"Re: t1308-config-set.sh fails on current master","fromName":"Øyvind A. Holm","fromEmail":"sunny@sunbase.org","sentAt":"2017-06-14T02:17:40Z","receivedAt":"2017-06-14T02:17:49Z","isPatch":false,"sender":{"key":"sunny@sunbase.org","avatar":"https://avatars.githubusercontent.com/u/113445?v=4"},"body":"Hi, Jonathan, thanks for having a look at this.\n\nOn 2017-06-13 18:25:35, Jonathan Nieder wrote:\n> Øyvind A. Holm wrote:\n> > t1308-config-set.sh fails on current master \n> > (v2.13.1-449-g02a2850ad58e). The error is introduced by commit \n> > e2d90fd1c33a (\"config.mak.uname: set FREAD_READS_DIRECTORIES for \n> > Linux and FreeBSD\"). Reverting the commit results in a conflict, but \n> > the test works on the commit before, 02912f477586.\n> >\n> > Tested on\n> >\n> >   Debian GNU/Linux 8.8 (jessie)\n> >   Linux Mint 18 Sarah\n>\n> Interesting.  I'm not able to reproduce it, but of course that doesn't\n> mean much.\n\nI'll admit that I have a somewhat special build system, but it's been \nworking great since I created it 7 months ago, and I run the test suite \nevery time I install a new git. I'm using the Makefile located at\n\n  https://gitlab.com/sunny256/src-other/blob/master/devel/git/Makefile\n\nIt's only doing regular stuff like \"make configure\", \"./configure\", etc, \nbut I'm mentioning it in case the Makefile reveals something \ninteresting. The git installation is in a non-standard location, the \nnewest version of git I've installed is for example located under \n/usr/src-other/pool/git.master.v2.13.1-394-g41dd4330a121/ .\n\n> What is the output of the following command?\n>\n> ./t1308-config-set.sh --run=1,23 -x -v -i\n\nInitialized empty Git repository in /home/sunny/src/git/src-other/devel/git/git/t/trash directory.t1308-config-set/.git/\nexpecting success: \n\tcat >.git/config <<-\\EOF\n\t[case]\n\t\tpenguin = very blue\n\t\tMovie = BadPhysics\n\t\tUPPERCASE = true\n\t\tMixedCase = true\n\t\tmy =\n\t\tfoo\n\t\tbaz = sam\n\t[Cores]\n\t\tWhatEver = Second\n\t\tbaz = bar\n\t[cores]\n\t\tbaz = bat\n\t[CORES]\n\t\tbaz = ball\n\t[my \"Foo bAr\"]\n\t\thi = mixed-case\n\t[my \"FOO BAR\"]\n\t\thi = upper-case\n\t[my \"foo bar\"]\n\t\thi = lower-case\n\t[case]\n\t\tbaz = bat\n\t\tbaz = hask\n\t[lamb]\n\t\tchop = 65\n\t\thead = none\n\t[goat]\n\t\tlegs = 4\n\t\thead = true\n\t\tskin = false\n\t\tnose = 1\n\t\thorns\n\tEOF\n\n+ cat\nok 1 - setup default config\n\nskipping test: get value for a simple key \n\tcheck_config get_value case.penguin \"very blue\"\n\nok 2 # skip get value for a simple key (--run)\n\nskipping test: get value for a key with value as an empty string \n\tcheck_config get_value case.my \"\"\n\nok 3 # skip get value for a key with value as an empty string (--run)\n\nskipping test: get value for a key with value as NULL \n\tcheck_config get_value case.foo \"(NULL)\"\n\nok 4 # skip get value for a key with value as NULL (--run)\n\nskipping test: upper case key \n\tcheck_config get_value case.UPPERCASE \"true\" &&\n\tcheck_config get_value case.uppercase \"true\"\n\nok 5 # skip upper case key (--run)\n\nskipping test: mixed case key \n\tcheck_config get_value case.MixedCase \"true\" &&\n\tcheck_config get_value case.MIXEDCASE \"true\" &&\n\tcheck_config get_value case.mixedcase \"true\"\n\nok 6 # skip mixed case key (--run)\n\nskipping test: key and value with mixed case \n\tcheck_config get_value case.Movie \"BadPhysics\"\n\nok 7 # skip key and value with mixed case (--run)\n\nskipping test: key with case sensitive subsection \n\tcheck_config get_value \"my.Foo bAr.hi\" \"mixed-case\" &&\n\tcheck_config get_value \"my.FOO BAR.hi\" \"upper-case\" &&\n\tcheck_config get_value \"my.foo bar.hi\" \"lower-case\"\n\nok 8 # skip key with case sensitive subsection (--run)\n\nskipping test: key with case insensitive section header \n\tcheck_config get_value cores.baz \"ball\" &&\n\tcheck_config get_value Cores.baz \"ball\" &&\n\tcheck_config get_value CORES.baz \"ball\" &&\n\tcheck_config get_value coreS.baz \"ball\"\n\nok 9 # skip key with case insensitive section header (--run)\n\nskipping test: key with case insensitive section header & variable \n\tcheck_config get_value CORES.BAZ \"ball\" &&\n\tcheck_config get_value cores.baz \"ball\" &&\n\tcheck_config get_value cores.BaZ \"ball\" &&\n\tcheck_config get_value cOreS.bAz \"ball\"\n\nok 10 # skip key with case insensitive section header & variable (--run)\n\nskipping test: find value with misspelled key \n\tcheck_config expect_code 1 get_value \"my.fOo Bar.hi\" \"Value not found for \\\"my.fOo Bar.hi\\\"\"\n\nok 11 # skip find value with misspelled key (--run)\n\nskipping test: find value with the highest priority \n\tcheck_config get_value case.baz \"hask\"\n\nok 12 # skip find value with the highest priority (--run)\n\nskipping test: find integer value for a key \n\tcheck_config get_int lamb.chop 65\n\nok 13 # skip find integer value for a key (--run)\n\nskipping test: find string value for a key \n\tcheck_config get_string case.baz hask &&\n\tcheck_config expect_code 1 get_string case.ba \"Value not found for \\\"case.ba\\\"\"\n\nok 14 # skip find string value for a key (--run)\n\nskipping test: check line error when NULL string is queried \n\ttest_expect_code 128 test-config get_string case.foo 2>result &&\n\ttest_i18ngrep \"fatal: .*case\\.foo.*\\.git/config.*line 7\" result\n\nok 15 # skip check line error when NULL string is queried (--run)\n\nskipping test: find integer if value is non parse-able \n\tcheck_config expect_code 128 get_int lamb.head\n\nok 16 # skip find integer if value is non parse-able (--run)\n\nskipping test: find bool value for the entered key \n\tcheck_config get_bool goat.head 1 &&\n\tcheck_config get_bool goat.skin 0 &&\n\tcheck_config get_bool goat.nose 1 &&\n\tcheck_config get_bool goat.horns 1 &&\n\tcheck_config get_bool goat.legs 1\n\nok 17 # skip find bool value for the entered key (--run)\n\nskipping test: find multiple values \n\tcheck_config get_value_multi case.baz sam bat hask\n\nok 18 # skip find multiple values (--run)\n\nskipping test: find value from a configset \n\tcat >config2 <<-\\EOF &&\n\t[case]\n\t\tbaz = lama\n\t[my]\n\t\tnew = silk\n\t[case]\n\t\tbaz = ball\n\tEOF\n\techo silk >expect &&\n\ttest-config configset_get_value my.new config2 .git/config >actual &&\n\ttest_cmp expect actual\n\nok 19 # skip find value from a configset (--run)\n\nskipping test: find value with highest priority from a configset \n\techo hask >expect &&\n\ttest-config configset_get_value case.baz config2 .git/config >actual &&\n\ttest_cmp expect actual\n\nok 20 # skip find value with highest priority from a configset (--run)\n\nskipping test: find value_list for a key from a configset \n\tcat >except <<-\\EOF &&\n\tsam\n\tbat\n\thask\n\tlama\n\tball\n\tEOF\n\ttest-config configset_get_value case.baz config2 .git/config >actual &&\n\ttest_cmp expect actual\n\nok 21 # skip find value_list for a key from a configset (--run)\n\nskipping test: proper error on non-existent files \n\techo \"Error (-1) reading configuration file non-existent-file.\" >expect &&\n\ttest_expect_code 2 test-config configset_get_value foo.bar non-existent-file 2>actual &&\n\ttest_cmp expect actual\n\nok 22 # skip proper error on non-existent files (--run)\n\nexpecting success: \n\techo \"Error (-1) reading configuration file a-directory.\" >expect &&\n\tmkdir a-directory &&\n\ttest_expect_code 2 test-config configset_get_value foo.bar a-directory 2>output &&\n\tgrep \"^warning:\" output &&\n\tgrep \"^Error\" output >actual &&\n\ttest_cmp expect actual\n\n+ echo Error (-1) reading configuration file a-directory.\n+ mkdir a-directory\n+ test_expect_code 2 test-config configset_get_value foo.bar a-directory\nValue not found for \"foo.bar\"\nerror: last command exited with $?=1\nnot ok 23 - proper error on directory \"files\"\n#\t\n#\t\techo \"Error (-1) reading configuration file a-directory.\" >expect &&\n#\t\tmkdir a-directory &&\n#\t\ttest_expect_code 2 test-config configset_get_value foo.bar a-directory 2>output &&\n#\t\tgrep \"^warning:\" output &&\n#\t\tgrep \"^Error\" output >actual &&\n#\t\ttest_cmp expect actual\n#\t\n\n\n> Other diagnostics:\n>\n> - what is the output of \"env\"?\n\nGIT_PS1_SHOWDIRTYSTATE=1\nSSH_AGENT_PID=22038\nXDG_SESSION_ID=31\nDSN=svn+ssh://sunny256@developer.skolelinux.no/repos\nTERM=screen-256color-bce\nSHELL=/bin/bash\nSSH_CLIENT=37.253.243.58 43994 22\nGL=git@gitlab.com:sunny256\nLC_NUMERIC=C\nOLDPWD=/home/sunny/src/git/src-other/devel/git/git\nAFVROOT=/home/sunny/afvroot\nGH=git@github.com:sunny256\nLNS=sunny@sunbase.org:/home/sunny/src/git\nSSH_TTY=/dev/pts/1\nWHOIS_SERVER=whois.dotster.com\nUSER=sunny\nHISTFILESIZE=10000000\nLS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;37;41:ex=01;32:*.bat=01;32:*.btm=01;32:*.cmd=01;32:*.com=01;32:*.csh=01;32:*.exe=01;32:*.sh=01;32:*.Z=01;31:*.arj=01;31:*.bz=01;31:*.bz2=01;31:*.cpio=01;31:*.deb=01;31:*.gz=01;31:*.lzh=01;31:*.rpm=01;31:*.tar=01;31:*.taz=01;31:*.tgz=01;31:*.tz=01;31:*.z=01;31:*.zip=01;31:*.avi=01;35:*.bmp=01;35:*.gif=01;35:*.jpg=01;35:*.mov=01;35:*.mpg=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.html=01;33:*.txt=01;33:*.utf8=01;33:*~=00;34:\nMTOOLS_DATE_STRING=yyyy-mm-dd\nMTOOLS_TWENTY_FOUR_HOUR_CLOCK=1\nSSH_AUTH_SOCK=/tmp/ssh-VdBkCiAwUqdc/agent.22035\nTERMCAP=SC|screen-256color-bce|VT 100/ANSI X3.64 virtual terminal:\\\n\t:DO=\\E[%dB:LE=\\E[%dD:RI=\\E[%dC:UP=\\E[%dA:bs:bt=\\E[Z:\\\n\t:cd=\\E[J:ce=\\E[K:cl=\\E[H\\E[J:cm=\\E[%i%d;%dH:ct=\\E[3g:\\\n\t:do=^J:nd=\\E[C:pt:rc=\\E8:rs=\\Ec:sc=\\E7:st=\\EH:up=\\EM:\\\n\t:le=^H:bl=^G:cr=^M:it#8:ho=\\E[H:nw=\\EE:ta=^I:is=\\E)0:\\\n\t:li#56:co#180:am:xn:xv:LP:sr=\\EM:al=\\E[L:AL=\\E[%dL:\\\n\t:cs=\\E[%i%d;%dr:dl=\\E[M:DL=\\E[%dM:dc=\\E[P:DC=\\E[%dP:\\\n\t:im=\\E[4h:ei=\\E[4l:mi:IC=\\E[%d@:ks=\\E[?1h\\E=:\\\n\t:ke=\\E[?1l\\E>:vi=\\E[?25l:ve=\\E[34h\\E[?25h:vs=\\E[34l:\\\n\t:ti=\\E[?1049h:te=\\E[?1049l:us=\\E[4m:ue=\\E[24m:so=\\E[3m:\\\n\t:se=\\E[23m:mb=\\E[5m:md=\\E[1m:mh=\\E[2m:mr=\\E[7m:\\\n\t:me=\\E[m:ms:\\\n\t:Co#8:pa#64:AF=\\E[3%dm:AB=\\E[4%dm:op=\\E[39;49m:AX:\\\n\t:vb=\\Eg:G0:as=\\E(0:ae=\\E(B:\\\n\t:ac=\\140\\140aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++,,hhII00:\\\n\t:po=\\E[5i:pf=\\E[4i:Km=\\E[M:k0=\\E[10~:k1=\\EOP:k2=\\EOQ:\\\n\t:k3=\\EOR:k4=\\EOS:k5=\\E[15~:k6=\\E[17~:k7=\\E[18~:\\\n\t:k8=\\E[19~:k9=\\E[20~:k;=\\E[21~:F1=\\E[23~:F2=\\E[24~:\\\n\t:F3=\\E[1;2P:F4=\\E[1;2Q:F5=\\E[1;2R:F6=\\E[1;2S:\\\n\t:F7=\\E[15;2~:F8=\\E[17;2~:F9=\\E[18;2~:FA=\\E[19;2~:kb=:\\\n\t:K2=\\EOE:kB=\\E[Z:kF=\\E[1;2B:kR=\\E[1;2A:*4=\\E[3;2~:\\\n\t:*7=\\E[1;2F:#2=\\E[1;2H:#3=\\E[2;2~:#4=\\E[1;2D:%c=\\E[6;2~:\\\n\t:%e=\\E[5;2~:%i=\\E[1;2C:kh=\\E[1~:@1=\\E[1~:kH=\\E[4~:\\\n\t:@7=\\E[4~:kN=\\E[6~:kP=\\E[5~:kI=\\E[2~:kD=\\E[3~:ku=\\EOA:\\\n\t:kd=\\EOB:kr=\\EOC:kl=\\EOD:km:\nGR=sunny@sunbase.org:/home/sunny/repos/Git\nPAGER=less -S\nNCDU_SHELL=mc\nPATH=/home/sunny/bin/Local/sunbase:/home/sunny/bin:/usr/src-other/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/src-other/prg/git/libexec/git-core:/opt/git-annex\nMAIL=/home/sunny/mail/inbox\nSTY=21459.vanl\nBC_ENV_ARGS=-l --quiet\nLC_COLLATE=C\nPP=git@github.com:piratpartiet\nPWD=/home/sunny/src/git/src-other/devel/git/git/t\nIRCSERVER=irc.homelien.no\nMAILDIR=/home/sunny/mail\nBMS=sunny@bellmann:/home/sunny/src/git\nEDITOR=v\nSESS_UUID=,bash_profile/cf9306e4-e476-11e6-ab83-db5caa6d21d3,screen/e9db0984-e476-11e6-b0ae-db5caa6d21d3,ssh-agent/fc7d8b3e-e476-11e6-8155-db5caa6d21d3,\nLANG=en_GB.UTF-8\nBB=git@bitbucket.org:sunny256\nSUUID_LOGDIR=/home/sunny/uuids\nTZ=CET\nWHOIS_HIDE=1\nSLX=svn+ssh://sunny256@svn.skolelinux.no/repos/skolelinux\nSVN_SSH=ssh\nPS1=\\[\\033[0m\\033[1;33m\\]$(date +\"%Y-%m-%d %T\") \\[\\033[01;31m\\]\\u\\[\\033[1;35m\\]@\\[\\033[01;34m\\]\\h\\[\\033[m\\]:\\[\\033[1;32m\\]\\w\\033[1;33m\\]$(__git_ps1 \" (%s)\")\\[\\033[m\\]\\n\\$ \nGIT_PS1_SHOWUNTRACKEDFILES=1\nIRCNAME=sunny\nHISTCONTROL=ignoreboth\nBM=sunny@bellmann:/home/sunny/repos/Git\nNCURSES_NO_UTF8_ACS=1\nHOME=/home/sunny\nSHLVL=4\nIRCNICK=sunny256\nLESSCHARSET=utf-8\nGIT_PS1_SHOWSTASHSTATE=1\nSUUID_EDITOR=vim\nLOGNAME=sunny\nLESS=-RSX\nWINDOW=2\nCVS_RSH=ssh\nGIT_PS1_SHOWUPSTREAM=verbose\nSSH_CONNECTION=37.253.243.58 43994 178.79.142.16 22\nPROMPT_COMMAND=history -a\nCVSEDITOR=/home/sunny/bin/cvs-editor\nTREE_CHARSET=UTF-8\nXDG_RUNTIME_DIR=/run/user/1000\nSR=svn+ssh://sunny@sunbase.org/home/sunny/repos/Svn\nRSYNC_RSH=ssh\nLC_TIME=en_DK.UTF-8\nHISTTIMEFORMAT=%F %T \nGHH=https://sunny256@github.com/sunny256\n_=/usr/local/bin/env\n\n\n> - cat ../GIT-BUILD-OPTIONS\n\nSHELL_PATH='/bin/sh'\nPERL_PATH='/usr/bin/perl'\nDIFF='diff'\nPYTHON_PATH='/usr/bin/python'\nTAR='tar'\nNO_CURL=''\nNO_EXPAT=''\nUSE_LIBPCRE=''\nNO_PERL=''\nNO_PYTHON=''\nNO_UNIX_SOCKETS=''\nPAGER_ENV='LESS=FRX LV=-c'\nDC_SHA1='YesPlease'\nNO_GETTEXT=''\nGETTEXT_POISON=''\n\n\n> - if you run that under 'strace -f -o /tmp/strace.out', does the\n>   strace.out say anything interesting?\n\nIn fact, when running the test under strace, another test fails too, and \nit's also reproducible:\n\n$ strace -f -o /tmp/strace.out ./t1308-config-set.sh\nok 1 - setup default config\n[snip]\nok 22 - proper error on non-existent files\nnot ok 23 - proper error on directory \"files\"\n#\n#               echo \"Error (-1) reading configuration file a-directory.\" >expect &&\n#               mkdir a-directory &&\n#               test_expect_code 2 test-config configset_get_value foo.bar a-directory 2>output &&\n#               grep \"^warning:\" output &&\n#               grep \"^Error\" output >actual &&\n#               test_cmp expect actual\n#\nnot ok 24 - proper error on non-accessible files\n#\n#               chmod -r .git/config &&\n#               test_when_finished \"chmod +r .git/config\" &&\n#               echo \"Error (-1) reading configuration file .git/config.\" >expect &&\n#               test_expect_code 2 test-config configset_get_value foo.bar .git/config 2>output &&\n#               grep \"^warning:\" output &&\n#               grep \"^Error\" output >actual &&\n#               test_cmp expect actual\n#\nok 25 - proper error on error in default config files\nok 26 - proper error on error in custom config files\nok 27 - check line errors for malformed values\nok 28 - error on modifying repo config without repo\nok 29 - iteration shows correct origins\n# failed 2 among 29 test(s)\n1..29\n$\n\nI didn't see any red flags in the strace output, but I've put the file \nfor download at\n\n  http://sunbase.org/strace.git-v2.13.1-449-g02a2850ad58e.out\n\nThanks,\nØyvind\n\nN 60.376° E 5.3334°\nOpenPGP fingerprint: A006 05D6 E676 B319 55E2  E77E FB0C BEE8 94A5 06E5\n6f7b6448-50a2-11e7-8259-db5caa6d21d3\n"},{"id":"322187","messageId":"20170614050215.c32crnjifah6cxae@sigill.intra.peff.net","threadId":"46173","inReplyTo":"20170614021739.erkdifufziwiqjxp@sunbase.org","subject":"Re: t1308-config-set.sh fails on current master","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-06-14T05:02:15Z","receivedAt":"2017-06-14T05:02:22Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Jun 14, 2017 at 04:17:40AM +0200, Øyvind A. Holm wrote:\n\n> > Interesting.  I'm not able to reproduce it, but of course that doesn't\n> > mean much.\n> \n> I'll admit that I have a somewhat special build system, but it's been \n> working great since I created it 7 months ago, and I run the test suite \n> every time I install a new git. I'm using the Makefile located at\n> \n>   https://gitlab.com/sunny256/src-other/blob/master/devel/git/Makefile\n> \n> It's only doing regular stuff like \"make configure\", \"./configure\", etc, \n> but I'm mentioning it in case the Makefile reveals something \n> interesting. The git installation is in a non-standard location, the \n> newest version of git I've installed is for example located under \n> /usr/src-other/pool/git.master.v2.13.1-394-g41dd4330a121/ .\n\nI couldn't reproduce either with my usual build, but I don't usually use\nautoconf. Running:\n\n  make configure\n  ./configure\n  make\n  (cd t && ./t1308-*)\n\ndoes fail for me. The problem is that the generated config.mak.autogen\nsets the wrong value for FREAD_READS_DIRECTORIES (and overrides the\ndefault entry for Linux from config.mak.uname. So the configure script\nneeds to be fixed.\n\n-Peff\n"},{"id":"322188","messageId":"20170614051544.cz2zvnkc4mlysz7h@sigill.intra.peff.net","threadId":"46173","inReplyTo":"20170614050215.c32crnjifah6cxae@sigill.intra.peff.net","subject":"Re: t1308-config-set.sh fails on current master","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-06-14T05:15:44Z","receivedAt":"2017-06-14T05:15:54Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Jun 14, 2017 at 01:02:15AM -0400, Jeff King wrote:\n\n> On Wed, Jun 14, 2017 at 04:17:40AM +0200, Øyvind A. Holm wrote:\n> \n> > > Interesting.  I'm not able to reproduce it, but of course that doesn't\n> > > mean much.\n> > \n> > I'll admit that I have a somewhat special build system, but it's been \n> > working great since I created it 7 months ago, and I run the test suite \n> > every time I install a new git. I'm using the Makefile located at\n> > \n> >   https://gitlab.com/sunny256/src-other/blob/master/devel/git/Makefile\n> > \n> > It's only doing regular stuff like \"make configure\", \"./configure\", etc, \n> > but I'm mentioning it in case the Makefile reveals something \n> > interesting. The git installation is in a non-standard location, the \n> > newest version of git I've installed is for example located under \n> > /usr/src-other/pool/git.master.v2.13.1-394-g41dd4330a121/ .\n> \n> I couldn't reproduce either with my usual build, but I don't usually use\n> autoconf. Running:\n> \n>   make configure\n>   ./configure\n>   make\n>   (cd t && ./t1308-*)\n> \n> does fail for me. The problem is that the generated config.mak.autogen\n> sets the wrong value for FREAD_READS_DIRECTORIES (and overrides the\n> default entry for Linux from config.mak.uname. So the configure script\n> needs to be fixed.\n\nActually, I'm not sure if configure.ac is wrong, or the new uses of\nFREAD_READS_DIRECTORIES. Because the test configure.ac actually checks:\n\n  FILE *f = fopen(\".\", \"r\");\n  return f && fread(&c, 1, 1, f);\n\nI.e., it sees that not only do we fopen() a directory, but we actually\nread garbage from it. Whereas on Linux, we fopen the file and then the\nread gets EISDIR.\n\nSo it's not true that FREAD_READS_DIRECTORIES; this is more like\nFOPEN_OPENS_DIRECTORIES.\n\nJust looking at how the macro is used, I think we want to handle both\ncases the same (by doing an fstat check after fopen). So I think it\nwould be OK to continue to use FREAD_READS_DIRECTORIES for both cases,\nand just fix the configure script. It may be worth updating the macro\nname for clarity, though.\n\n-Peff\n"},{"id":"322189","messageId":"20170614053018.pbeftfyz2md4o73h@sigill.intra.peff.net","threadId":"46173","inReplyTo":"20170614051544.cz2zvnkc4mlysz7h@sigill.intra.peff.net","subject":"[PATCH] configure.ac: loosen FREAD_READS_DIRECTORIES test program","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-06-14T05:30:18Z","receivedAt":"2017-06-14T05:30:28Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Jun 14, 2017 at 01:15:44AM -0400, Jeff King wrote:\n\n> > I couldn't reproduce either with my usual build, but I don't usually use\n> > autoconf. Running:\n> > \n> >   make configure\n> >   ./configure\n> >   make\n> >   (cd t && ./t1308-*)\n> > \n> > does fail for me. The problem is that the generated config.mak.autogen\n> > sets the wrong value for FREAD_READS_DIRECTORIES (and overrides the\n> > default entry for Linux from config.mak.uname. So the configure script\n> > needs to be fixed.\n> \n> Actually, I'm not sure if configure.ac is wrong, or the new uses of\n> FREAD_READS_DIRECTORIES. Because the test configure.ac actually checks:\n\nPoking around more, I think the best thing is to just update the\nconfigure script. The rationale is below.\n\n-- >8 --\nSubject: [PATCH] configure.ac: loosen FREAD_READS_DIRECTORIES test program\n\nWe added an FREAD_READS_DIRECTORIES Makefile knob long ago\nin cba22528f (Add compat/fopen.c which returns NULL on\nattempt to open directory, 2008-02-08) to handle systems\nwhere reading from a directory returned garbage. This works\nby catching the problem at the fopen() stage and returning\nNULL.\n\nMore recently, we found that there is a class of systems\n(including Linux) where fopen() succeeds but fread() fails.\nSince the solution is the same (having fopen return NULL),\nthey use the same Makefile knob as of e2d90fd1c\n(config.mak.uname: set FREAD_READS_DIRECTORIES for Linux and\nFreeBSD, 2017-05-03).\n\nThis works fine except for one thing: the autoconf test in\nconfigure.ac to set FREAD_READS_DIRECTORIES actually checks\nwhether fread succeeds. Which means that on Linux systems,\nthe knob isn't set (and we even override the config.mak.uname\ndefault). t1308 catches the failure.\n\nWe can fix this by tweaking the autoconf test to cover both\ncases. In theory we might care about the distinction between\nthe traditional \"fread reads directories\" case and the new\n\"fopen opens directories\". But since our solution catches\nthe problem at the fopen stage either way, we don't actually\nneed to know the difference. The \"fopen\" case is a superset.\n\nThis does mean the FREAD_READS_DIRECTORIES name is slightly\nmisleading. Probably FOPEN_OPENS_DIRECTORIES would be more\naccurate. But it would be disruptive to simply change the\nname (people's existing build configs would fail), and it's\nnot worth the complexity of handling both. Let's just add a\ncomment in the knob description.\n\nReported-by: Øyvind A. Holm <sunny@sunbase.org>\nSigned-off-by: Jeff King <peff@peff.net>\n---\n Makefile     | 3 ++-\n configure.ac | 4 ++--\n 2 files changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 7c621f7f7..33b888730 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -19,7 +19,8 @@ all::\n # have been written to the final string if enough space had been available.\n #\n # Define FREAD_READS_DIRECTORIES if you are on a system which succeeds\n-# when attempting to read from an fopen'ed directory.\n+# when attempting to read from an fopen'ed directory (or even to fopen\n+# it at all).\n #\n # Define NO_OPENSSL environment variable if you do not have OpenSSL.\n # This also implies BLK_SHA1.\ndiff --git a/configure.ac b/configure.ac\nindex deeb968da..602383ed1 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -869,9 +869,9 @@ AC_CACHE_CHECK([whether system succeeds to read fopen'ed directory],\n [\n AC_RUN_IFELSE(\n \t[AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],\n-\t\t[[char c;\n+\t\t[[\n \t\tFILE *f = fopen(\".\", \"r\");\n-\t\treturn f && fread(&c, 1, 1, f)]])],\n+\t\treturn f)]])],\n \t[ac_cv_fread_reads_directories=no],\n \t[ac_cv_fread_reads_directories=yes])\n ])\n-- \n2.13.1.766.g6bea926c5\n\n"},{"id":"322234","messageId":"20170614105955.aj4rtamzp4yy6g6b@sunbase.org","threadId":"46173","inReplyTo":"20170614053018.pbeftfyz2md4o73h@sigill.intra.peff.net","subject":"Re: [PATCH] configure.ac: loosen FREAD_READS_DIRECTORIES test program","fromName":"Øyvind A. Holm","fromEmail":"sunny@sunbase.org","sentAt":"2017-06-14T10:59:56Z","receivedAt":"2017-06-14T11:00:06Z","isPatch":true,"sender":{"key":"sunny@sunbase.org","avatar":"https://avatars.githubusercontent.com/u/113445?v=4"},"body":"On 2017-06-14 01:30:18, Jeff King wrote:\n> On Wed, Jun 14, 2017 at 01:15:44AM -0400, Jeff King wrote:\n> > Actually, I'm not sure if configure.ac is wrong, or the new uses of \n> > FREAD_READS_DIRECTORIES. Because the test configure.ac actually \n> > checks:\n>\n> Poking around more, I think the best thing is to just update the \n> configure script. The rationale is below.\n>\n> -- >8 --\n> Subject: [PATCH] configure.ac: loosen FREAD_READS_DIRECTORIES test \n> program\n\nYes, this patch fixes t1308. I also ran the whole test suite with the \npatch, everything succeeds.\n\nThanks,\nØyvind\n\nN 60.376° E 5.3334°\nOpenPGP fingerprint: A006 05D6 E676 B319 55E2  E77E FB0C BEE8 94A5 06E5\n17e7451e-50f0-11e7-a287-db5caa6d21d3\n"}]}