Git v2.16.0-rc2 - breakages in t1308 and 1404
Quoted 3 lines · Junio C Hamano
A release candidate Git v2.16.0-rc2 is now available for testing at the usual places. It is comprised of 483 non-merge commits since v2.15.0, contributed by 80 people, 23 of which are new faces.
<snip>
Please forgive my not knowing the proper way to report this ... we have a few breakages on the NonStop port (which has finally caught up to 2.16, yay!). The test run takes a very long time to run, so this is preliminary. I'm also not sure who should try to resolve these.
For 1308:
Value not found for "foo.bar"
not ok 23 - proper error on directory "files"
#
# echo "Error (-1) reading configuration file a-directory." >expect && # mkdir a-directory && # test_expect_code 2 test-config configset_get_value foo.bar a-directory 2>output && # grep "^warning:" output && # grep "^Error" output >actual && # test_cmp expect actual
test_expect_code: command exited with 1, we wanted 2 test-config configset_get_value foo.bar a-directory
It looks like the exit code is coming back as 1 not 2. There is also a file except vs expect. ./trash directory.t1308-config-set: ls
a-directory actual config2 except expect output result
For 1404: It looks like the error was detected, but the test case was not structured to handle where the detection occurred. Here's what I see:
not ok 52 - delete fails cleanly if packed-refs file is locked #
# prefix=refs/locked-packed-refs && # # Set up a reference with differing loose and packed versions: # git update-ref $prefix/foo $C && # git pack-refs --all && # git update-ref $prefix/foo $D && # git for-each-ref $prefix >unchanged && # # Now try to delete it while the `packed-refs` lock is held: # : >.git/packed-refs.lock && # test_when_finished "rm -f .git/packed-refs.lock" && # test_must_fail git update-ref -d $prefix/foo >out 2>err && # git for-each-ref $prefix >actual && # test_i18ngrep "Unable to create $Q.*packed-refs.lock$Q: File exists" err && # test_cmp unchanged actual
#
# failed 1 among 52 test(s) 1..52 ./trash directory.t1404-update-ref-errors: ls actual commands expected expected-refs out unchanged actual-refs err expected-err input output.err ./trash directory.t1404-update-ref-errors: cat err error: Unable to create '/home/git/git/t/trash directory.t1404-update-ref-errors/.git/packed-refs.lock': File already exists.
Another git process seems to be running in this repository, e.g. an editor opened by 'git commit'. Please make sure all processes are terminated then try again. If it still fails, a git process may have crashed in this repository earlier:
remove the file manually to continue.
./trash directory.t1404-update-ref-errors: cat out
Sincerely,
Randall
-- Brief whoami:
NonStop developer since approximately 211288444200000000 UNIX developer since approximately 421664400
-- In my real life, I talk too much.
Quoted 4 lines · Randall S. Becker
It looks like the exit code is coming back as 1 not 2. There is also a file except vs expect.
./trash directory.t1308-config-set: ls
a-directory actual config2 except expect output result
The test that leaves "except" does look wrong. The relevant part looks like this:
test_expect_success 'find value with highest priority from a configset' '
echo hask >expect &&
test-config configset_get_value case.baz config2 .git/config >actual &&
test_cmp expect actual
'
test_expect_success 'find value_list for a key from a configset' '
cat >except <<-\EOF &&
sam
...
EOF
test-config configset_get_value case.baz config2 .git/config >actual &&
test_cmp expect actual
'The invocations of test-config in these two tests look exactly the same, at least to me, so whatever comes out of the command and stored in 'actual' must match what the first test stored in 'expect' and compared the same as 'actual' in that test.
So the second test is probably asking a wrong question to test-config but because it prepares an expected answer in a wrong file, it did not even notice that it is asking a wrong question X-<.
The wrong test comes from 4c715ebb ("test-config: add tests for the config_set API", 2014-07-28); I do not know offhand if the author of that change is still around.
Having said all that, I suspect that the "except" thing may not have anything to do with what you are observing; sorry for not ending up to be very helpful X-<.
Quoted 7 lines · Junio C Hamano
Quoted 4 lines · Randall S. Becker
It looks like the exit code is coming back as 1 not 2. There is also a file except vs expect.
./trash directory.t1308-config-set: ls a-directory actual config2 except expect output resultThe test that leaves "except" does look wrong. The relevant part looks
like
Quoted 3 lines
this:
test_expect_success'find value with highest priority from a
configset' '
Quoted 16 lines
echo hask >expect &&
test-configconfigset_get_valuecase.baz config2 .git/config
actual &&
test_cmpexpect actual
'
test_expect_success'findvalue_listfor a key from a configset' '
cat >except <<-\EOF &&
sam
...
EOF
test-configconfigset_get_valuecase.baz config2 .git/config
actual &&
test_cmpexpect actual
'
Quoted 1 line
The invocations of test-config in these two tests look exactly the same,
at
Quoted 8 lines
least to me, so whatever comes out of the command and stored in 'actual' must match what the first test stored in 'expect'
and compared the same as 'actual' in that test.So the second test is probably asking a wrong question to test-config but because it prepares an expected answer in a wrong file, it did not even notice that it is asking a wrong question X-<.
Quoted 5 lines
The wrong test comes from
4c715ebb("test-config: add tests for theconfig_setAPI", 2014-07-28); I do not know offhand if the author of that change is still around.Having said all that, I suspect that the "except" thing may not have
anything
Quoted 1 line
to do with what you are observing; sorry for not ending up to be very
helpful
Quoted 1 line
X-<.
Sadly, fixing the "except" thing causes the test to break now. I can't make sense of the intent of this, unless the test is to find unmatching keys and it really does mean "except"
actual 2018-01-12 23:03:41 +0000 renamed from expect 2018-01-12 23:03:41 +0000 +0 -4
@@ -1,5 +1 @@ -sam -bat hask -lama -ball
[case]
baz = lama
[my]
new = silk
[case]
baz = ball
Quoted 1 line · Randall S. Becker
Sadly, fixing the "except" thing causes the test to break now.
That is exactly what I wanted to say. If you want to "fix" it, you'd need to figure out what the author of the "except" thing wanted to test, adjust the args given to test-config (it cannot be the same as the test-config invocation of the previous test), and then fix the typo s/except/expect/. Changing the typo alone *will* of course make the test fail, because then the file with the corrected name, i.e. "expect", has bogus lines that does not match how the current invocation of "test-config" command is expected to output.
Quoted 17 lines
sense of the intent of this, unless the test is to find unmatching keys and it really does mean "except"
actual 2018-01-12 23:03:41 +0000 renamed from expect 2018-01-12 23:03:41 +0000 +0
-4@@ -1,5 +1 @@ -sam -bat hask -lama -ball[case]
baz = lama
[my]
new = silk
[case]
baz = ball
Quoted 5 lines · Junio C Hamano
Quoted 1 line · Randall S. Becker
Sadly, fixing the "except" thing causes the test to break now.
Quoted 9 lines
That is exactly what I wanted to say. If you want to "fix" it, you'd need to figure out what the author of the "except" thing wanted to test, adjust the args given to test-config (it cannot be the same as the test-config invocation of the previous test), and then fix the typo s/except/expect/. Changing the typo alone *will* of course make the test fail, because then the file with the corrected name, i.e. "expect", has bogus lines that does not match how the current invocation of "test-config" command is expected to output.
Hi Guys,
I was the original author of the test, I am sorry about the typo.
I will submit a patch fixing the test. The fix can be checked at
https://github.com/git/git/pull/451.
'configset_get_value' will be changed to 'configset_get_value_multi' since the test expects a list of values instead of a single value.
Thanks,
Tanay Abhra
Quoted 4 lines · Tanay Abhra
I was the original author of the test, I am sorry about the typo.
...
'configset_get_value' will be changed to 'configset_get_value_multi' since the test expects a list of values instead of a single value.
Thanks for a quick reaction!!