Skip to content

Instantly share code, notes, and snippets.

@lupyuen
Created December 24, 2024 06:58
Show Gist options
  • Save lupyuen/160613f2b68f1ab81f1c46146c189b9f to your computer and use it in GitHub Desktop.
Save lupyuen/160613f2b68f1ab81f1c46146c189b9f to your computer and use it in GitHub Desktop.
git bisect run my-test-script.sh
git clone https://github.com/apache/nuttx
cd nuttx
git bisect start
git bisect good 6554ed4d ## Commit #1 is Good
git bisect bad 79a1ebb ## Commit #468 is Bad
git bisect run \
$HOME/nuttx-bisect/my-test-script.sh
➜ 2412222 $ git clone https://github.com/apache/nuttx
Cloning into 'nuttx'...
remote: Enumerating objects: 832421, done.
remote: Counting objects: 100% (1413/1413), done.
remote: Compressing objects: 100% (717/717), done.
remote: Total 832421 (delta 1075), reused 696 (delta 696), pack-reused 831008 (from 4)
Receiving objects: 100% (832421/832421), 297.14 MiB | 16.66 MiB/s, done.
Resolving deltas: 100% (648963/648963), done.
Updating files: 100% (23751/23751), done.
➜ 2412222 $ cd nuttx
➜ nuttx git:(master) $ git bisect start
status: waiting for both good and bad commits
➜ nuttx git:(master) $ git bisect good 6554ed4d ## Commit #1 is Good
status: waiting for bad commit, 1 good commit known
➜ nuttx git:(master) $ git bisect bad 79a1ebb ## Commit #468 is Bad
Bisecting: 233 revisions left to test after this (roughly 8 steps)
[94a2ce3641213cc702abc5c17b0f81a50c714a2e] tools/gdb: need to switch back to inferior 1
➜ nuttx git:(94a2ce3641) $ git bisect run \
$HOME/nuttx-bisect/my-test-script.sh
running '/Users/luppy/nuttx-bisect/my-test-script.sh'
--------------------------------------------------------------------------------
Testing Commit 94a2ce3641213cc702abc5c17b0f81a50c714a2e
Running https://github.com/lupyuen/nuttx-bisect/blob/main/my-test-script.sh
Called by https://github.com/lupyuen/nuttx-bisect/blob/main/run.sh
Tue Dec 24 06:57:27 UTC 2024
++ git rev-parse HEAD
+ nuttx_hash=94a2ce3641213cc702abc5c17b0f81a50c714a2e
+ git status
HEAD detached at 94a2ce3641
You are currently bisecting, started from branch 'master'.
(use "git bisect reset" to get back to the original branch)
nothing to commit, working tree clean
+ TZ=UTC0
+ git --no-pager log -1 --date=format-local:%Y-%m-%dT%H:%M:%S '--format=%cd | %H | %s'
2024-11-23T05:09:16 | 94a2ce3641213cc702abc5c17b0f81a50c714a2e | tools/gdb: need to switch back to inferior 1
+ git bisect log
git bisect start
# status: waiting for both good and bad commits
# good: [6554ed4d668e0c3982aaed8d8fb4b8ae81e5596c] get g_tcbinfo just use elf memory
git bisect good 6554ed4d668e0c3982aaed8d8fb4b8ae81e5596c
# status: waiting for bad commit, 1 good commit known
# bad: [79a1ebb9cd0c13f48a57413fa4bc3950b2cd5e0b] rp23xx: use small lock in arch/arm/src/rp23xx/rp23xx_usbdev.c
git bisect bad 79a1ebb9cd0c13f48a57413fa4bc3950b2cd5e0b
+ [[ 94a2ce3641213cc702abc5c17b0f81a50c714a2e == \9\4\a\2\c\e\3\6\4\1\2\1\3\c\c\7\0\2\a\b\c\5\c\1\7\b\0\f\8\1\a\5\0\c\7\1\4\a\2\e ]]
+ set +x
**** Simulate OK
+ exit 0
Bisecting: 116 revisions left to test after this (roughly 7 steps)
[1cfaff011ea5178ba3faffc10a33d9f52de80bfc] esp32s3-devkit/usbmsc: Initializing configuration for USBMSC
running '/Users/luppy/nuttx-bisect/my-test-script.sh'
--------------------------------------------------------------------------------
Testing Commit 1cfaff011ea5178ba3faffc10a33d9f52de80bfc
Running https://github.com/lupyuen/nuttx-bisect/blob/main/my-test-script.sh
Called by https://github.com/lupyuen/nuttx-bisect/blob/main/run.sh
Tue Dec 24 06:57:27 UTC 2024
++ git rev-parse HEAD
+ nuttx_hash=1cfaff011ea5178ba3faffc10a33d9f52de80bfc
+ git status
HEAD detached at 1cfaff011e
You are currently bisecting, started from branch 'master'.
(use "git bisect reset" to get back to the original branch)
nothing to commit, working tree clean
+ TZ=UTC0
+ git --no-pager log -1 --date=format-local:%Y-%m-%dT%H:%M:%S '--format=%cd | %H | %s'
2024-11-27T16:30:44 | 1cfaff011ea5178ba3faffc10a33d9f52de80bfc | esp32s3-devkit/usbmsc: Initializing configuration for USBMSC
+ git bisect log
git bisect start
# status: waiting for both good and bad commits
# good: [6554ed4d668e0c3982aaed8d8fb4b8ae81e5596c] get g_tcbinfo just use elf memory
git bisect good 6554ed4d668e0c3982aaed8d8fb4b8ae81e5596c
# status: waiting for bad commit, 1 good commit known
# bad: [79a1ebb9cd0c13f48a57413fa4bc3950b2cd5e0b] rp23xx: use small lock in arch/arm/src/rp23xx/rp23xx_usbdev.c
git bisect bad 79a1ebb9cd0c13f48a57413fa4bc3950b2cd5e0b
# good: [94a2ce3641213cc702abc5c17b0f81a50c714a2e] tools/gdb: need to switch back to inferior 1
git bisect good 94a2ce3641213cc702abc5c17b0f81a50c714a2e
+ [[ 1cfaff011ea5178ba3faffc10a33d9f52de80bfc == \9\4\a\2\c\e\3\6\4\1\2\1\3\c\c\7\0\2\a\b\c\5\c\1\7\b\0\f\8\1\a\5\0\c\7\1\4\a\2\e ]]
+ [[ 1cfaff011ea5178ba3faffc10a33d9f52de80bfc == \1\c\f\a\f\f\0\1\1\e\a\5\1\7\8\b\a\3\f\a\f\f\c\1\0\a\3\3\d\9\f\5\2\d\e\8\0\b\f\c ]]
+ set +x
**** Simulate Error
+ exit 1
Bisecting: 58 revisions left to test after this (roughly 6 steps)
[65a93e972cdc224bae1b47ee329727f51d18679b] tools/gdb: guide user for correct usage of nuttxgdb
running '/Users/luppy/nuttx-bisect/my-test-script.sh'
--------------------------------------------------------------------------------
Testing Commit 65a93e972cdc224bae1b47ee329727f51d18679b
Running https://github.com/lupyuen/nuttx-bisect/blob/main/my-test-script.sh
Called by https://github.com/lupyuen/nuttx-bisect/blob/main/run.sh
Tue Dec 24 06:57:27 UTC 2024
++ git rev-parse HEAD
+ nuttx_hash=65a93e972cdc224bae1b47ee329727f51d18679b
+ git status
HEAD detached at 65a93e972c
You are currently bisecting, started from branch 'master'.
(use "git bisect reset" to get back to the original branch)
nothing to commit, working tree clean
+ TZ=UTC0
+ git --no-pager log -1 --date=format-local:%Y-%m-%dT%H:%M:%S '--format=%cd | %H | %s'
2024-11-25T05:37:19 | 65a93e972cdc224bae1b47ee329727f51d18679b | tools/gdb: guide user for correct usage of nuttxgdb
+ git bisect log
git bisect start
# status: waiting for both good and bad commits
# good: [6554ed4d668e0c3982aaed8d8fb4b8ae81e5596c] get g_tcbinfo just use elf memory
git bisect good 6554ed4d668e0c3982aaed8d8fb4b8ae81e5596c
# status: waiting for bad commit, 1 good commit known
# bad: [79a1ebb9cd0c13f48a57413fa4bc3950b2cd5e0b] rp23xx: use small lock in arch/arm/src/rp23xx/rp23xx_usbdev.c
git bisect bad 79a1ebb9cd0c13f48a57413fa4bc3950b2cd5e0b
# good: [94a2ce3641213cc702abc5c17b0f81a50c714a2e] tools/gdb: need to switch back to inferior 1
git bisect good 94a2ce3641213cc702abc5c17b0f81a50c714a2e
# bad: [1cfaff011ea5178ba3faffc10a33d9f52de80bfc] esp32s3-devkit/usbmsc: Initializing configuration for USBMSC
git bisect bad 1cfaff011ea5178ba3faffc10a33d9f52de80bfc
+ [[ 65a93e972cdc224bae1b47ee329727f51d18679b == \9\4\a\2\c\e\3\6\4\1\2\1\3\c\c\7\0\2\a\b\c\5\c\1\7\b\0\f\8\1\a\5\0\c\7\1\4\a\2\e ]]
+ [[ 65a93e972cdc224bae1b47ee329727f51d18679b == \1\c\f\a\f\f\0\1\1\e\a\5\1\7\8\b\a\3\f\a\f\f\c\1\0\a\3\3\d\9\f\5\2\d\e\8\0\b\f\c ]]
+ [[ 65a93e972cdc224bae1b47ee329727f51d18679b == \6\5\a\9\3\e\9\7\2\c\d\c\2\2\4\b\a\e\1\b\4\7\e\e\3\2\9\7\2\7\f\5\1\d\1\8\6\7\9\b ]]
+ set +x
**** Simulate Error
+ exit 1
Bisecting: 28 revisions left to test after this (roughly 5 steps)
[1e265af8ebc90ed3353614300640abeda08a80b6] tools/gdb: add utils.get_tid(tcb)
running '/Users/luppy/nuttx-bisect/my-test-script.sh'
--------------------------------------------------------------------------------
Testing Commit 1e265af8ebc90ed3353614300640abeda08a80b6
Running https://github.com/lupyuen/nuttx-bisect/blob/main/my-test-script.sh
Called by https://github.com/lupyuen/nuttx-bisect/blob/main/run.sh
Tue Dec 24 06:57:28 UTC 2024
++ git rev-parse HEAD
+ nuttx_hash=1e265af8ebc90ed3353614300640abeda08a80b6
+ git status
HEAD detached at 1e265af8eb
You are currently bisecting, started from branch 'master'.
(use "git bisect reset" to get back to the original branch)
nothing to commit, working tree clean
+ TZ=UTC0
+ git --no-pager log -1 --date=format-local:%Y-%m-%dT%H:%M:%S '--format=%cd | %H | %s'
2024-11-23T19:03:40 | 1e265af8ebc90ed3353614300640abeda08a80b6 | tools/gdb: add utils.get_tid(tcb)
+ git bisect log
git bisect start
# status: waiting for both good and bad commits
# good: [6554ed4d668e0c3982aaed8d8fb4b8ae81e5596c] get g_tcbinfo just use elf memory
git bisect good 6554ed4d668e0c3982aaed8d8fb4b8ae81e5596c
# status: waiting for bad commit, 1 good commit known
# bad: [79a1ebb9cd0c13f48a57413fa4bc3950b2cd5e0b] rp23xx: use small lock in arch/arm/src/rp23xx/rp23xx_usbdev.c
git bisect bad 79a1ebb9cd0c13f48a57413fa4bc3950b2cd5e0b
# good: [94a2ce3641213cc702abc5c17b0f81a50c714a2e] tools/gdb: need to switch back to inferior 1
git bisect good 94a2ce3641213cc702abc5c17b0f81a50c714a2e
# bad: [1cfaff011ea5178ba3faffc10a33d9f52de80bfc] esp32s3-devkit/usbmsc: Initializing configuration for USBMSC
git bisect bad 1cfaff011ea5178ba3faffc10a33d9f52de80bfc
# bad: [65a93e972cdc224bae1b47ee329727f51d18679b] tools/gdb: guide user for correct usage of nuttxgdb
git bisect bad 65a93e972cdc224bae1b47ee329727f51d18679b
+ [[ 1e265af8ebc90ed3353614300640abeda08a80b6 == \9\4\a\2\c\e\3\6\4\1\2\1\3\c\c\7\0\2\a\b\c\5\c\1\7\b\0\f\8\1\a\5\0\c\7\1\4\a\2\e ]]
+ [[ 1e265af8ebc90ed3353614300640abeda08a80b6 == \1\c\f\a\f\f\0\1\1\e\a\5\1\7\8\b\a\3\f\a\f\f\c\1\0\a\3\3\d\9\f\5\2\d\e\8\0\b\f\c ]]
+ [[ 1e265af8ebc90ed3353614300640abeda08a80b6 == \6\5\a\9\3\e\9\7\2\c\d\c\2\2\4\b\a\e\1\b\4\7\e\e\3\2\9\7\2\7\f\5\1\d\1\8\6\7\9\b ]]
+ [[ 1e265af8ebc90ed3353614300640abeda08a80b6 == \1\e\2\6\5\a\f\8\e\b\c\9\0\e\d\3\3\5\3\6\1\4\3\0\0\6\4\0\a\b\e\d\a\0\8\a\8\0\b\6 ]]
+ set +x
**** Simulate Error
+ exit 1
Bisecting: 14 revisions left to test after this (roughly 4 steps)
[c70f3e3f984f1e837d03bca5444373d6ff94e96d] tools/gdb: Add check for tail when checking a queue
running '/Users/luppy/nuttx-bisect/my-test-script.sh'
--------------------------------------------------------------------------------
Testing Commit c70f3e3f984f1e837d03bca5444373d6ff94e96d
Running https://github.com/lupyuen/nuttx-bisect/blob/main/my-test-script.sh
Called by https://github.com/lupyuen/nuttx-bisect/blob/main/run.sh
Tue Dec 24 06:57:28 UTC 2024
++ git rev-parse HEAD
+ nuttx_hash=c70f3e3f984f1e837d03bca5444373d6ff94e96d
+ git status
HEAD detached at c70f3e3f98
You are currently bisecting, started from branch 'master'.
(use "git bisect reset" to get back to the original branch)
nothing to commit, working tree clean
+ TZ=UTC0
+ git --no-pager log -1 --date=format-local:%Y-%m-%dT%H:%M:%S '--format=%cd | %H | %s'
2024-11-23T18:55:46 | c70f3e3f984f1e837d03bca5444373d6ff94e96d | tools/gdb: Add check for tail when checking a queue
+ git bisect log
git bisect start
# status: waiting for both good and bad commits
# good: [6554ed4d668e0c3982aaed8d8fb4b8ae81e5596c] get g_tcbinfo just use elf memory
git bisect good 6554ed4d668e0c3982aaed8d8fb4b8ae81e5596c
# status: waiting for bad commit, 1 good commit known
# bad: [79a1ebb9cd0c13f48a57413fa4bc3950b2cd5e0b] rp23xx: use small lock in arch/arm/src/rp23xx/rp23xx_usbdev.c
git bisect bad 79a1ebb9cd0c13f48a57413fa4bc3950b2cd5e0b
# good: [94a2ce3641213cc702abc5c17b0f81a50c714a2e] tools/gdb: need to switch back to inferior 1
git bisect good 94a2ce3641213cc702abc5c17b0f81a50c714a2e
# bad: [1cfaff011ea5178ba3faffc10a33d9f52de80bfc] esp32s3-devkit/usbmsc: Initializing configuration for USBMSC
git bisect bad 1cfaff011ea5178ba3faffc10a33d9f52de80bfc
# bad: [65a93e972cdc224bae1b47ee329727f51d18679b] tools/gdb: guide user for correct usage of nuttxgdb
git bisect bad 65a93e972cdc224bae1b47ee329727f51d18679b
# bad: [1e265af8ebc90ed3353614300640abeda08a80b6] tools/gdb: add utils.get_tid(tcb)
git bisect bad 1e265af8ebc90ed3353614300640abeda08a80b6
+ [[ c70f3e3f984f1e837d03bca5444373d6ff94e96d == \9\4\a\2\c\e\3\6\4\1\2\1\3\c\c\7\0\2\a\b\c\5\c\1\7\b\0\f\8\1\a\5\0\c\7\1\4\a\2\e ]]
+ [[ c70f3e3f984f1e837d03bca5444373d6ff94e96d == \1\c\f\a\f\f\0\1\1\e\a\5\1\7\8\b\a\3\f\a\f\f\c\1\0\a\3\3\d\9\f\5\2\d\e\8\0\b\f\c ]]
+ [[ c70f3e3f984f1e837d03bca5444373d6ff94e96d == \6\5\a\9\3\e\9\7\2\c\d\c\2\2\4\b\a\e\1\b\4\7\e\e\3\2\9\7\2\7\f\5\1\d\1\8\6\7\9\b ]]
+ [[ c70f3e3f984f1e837d03bca5444373d6ff94e96d == \1\e\2\6\5\a\f\8\e\b\c\9\0\e\d\3\3\5\3\6\1\4\3\0\0\6\4\0\a\b\e\d\a\0\8\a\8\0\b\6 ]]
+ [[ c70f3e3f984f1e837d03bca5444373d6ff94e96d == \c\7\0\f\3\e\3\f\9\8\4\f\1\e\8\3\7\d\0\3\b\c\a\5\4\4\4\3\7\3\d\6\f\f\9\4\e\9\6\d ]]
+ set +x
**** Simulate Error
+ exit 1
Bisecting: 6 revisions left to test after this (roughly 3 steps)
[5d86bee5c7102b90a4376e630bd7c3cdf5e8395e] tools/gdb: add diagnose commands
running '/Users/luppy/nuttx-bisect/my-test-script.sh'
--------------------------------------------------------------------------------
Testing Commit 5d86bee5c7102b90a4376e630bd7c3cdf5e8395e
Running https://github.com/lupyuen/nuttx-bisect/blob/main/my-test-script.sh
Called by https://github.com/lupyuen/nuttx-bisect/blob/main/run.sh
Tue Dec 24 06:57:28 UTC 2024
++ git rev-parse HEAD
+ nuttx_hash=5d86bee5c7102b90a4376e630bd7c3cdf5e8395e
+ git status
HEAD detached at 5d86bee5c7
You are currently bisecting, started from branch 'master'.
(use "git bisect reset" to get back to the original branch)
nothing to commit, working tree clean
+ TZ=UTC0
+ git --no-pager log -1 --date=format-local:%Y-%m-%dT%H:%M:%S '--format=%cd | %H | %s'
2024-11-23T05:09:16 | 5d86bee5c7102b90a4376e630bd7c3cdf5e8395e | tools/gdb: add diagnose commands
+ git bisect log
git bisect start
# status: waiting for both good and bad commits
# good: [6554ed4d668e0c3982aaed8d8fb4b8ae81e5596c] get g_tcbinfo just use elf memory
git bisect good 6554ed4d668e0c3982aaed8d8fb4b8ae81e5596c
# status: waiting for bad commit, 1 good commit known
# bad: [79a1ebb9cd0c13f48a57413fa4bc3950b2cd5e0b] rp23xx: use small lock in arch/arm/src/rp23xx/rp23xx_usbdev.c
git bisect bad 79a1ebb9cd0c13f48a57413fa4bc3950b2cd5e0b
# good: [94a2ce3641213cc702abc5c17b0f81a50c714a2e] tools/gdb: need to switch back to inferior 1
git bisect good 94a2ce3641213cc702abc5c17b0f81a50c714a2e
# bad: [1cfaff011ea5178ba3faffc10a33d9f52de80bfc] esp32s3-devkit/usbmsc: Initializing configuration for USBMSC
git bisect bad 1cfaff011ea5178ba3faffc10a33d9f52de80bfc
# bad: [65a93e972cdc224bae1b47ee329727f51d18679b] tools/gdb: guide user for correct usage of nuttxgdb
git bisect bad 65a93e972cdc224bae1b47ee329727f51d18679b
# bad: [1e265af8ebc90ed3353614300640abeda08a80b6] tools/gdb: add utils.get_tid(tcb)
git bisect bad 1e265af8ebc90ed3353614300640abeda08a80b6
# bad: [c70f3e3f984f1e837d03bca5444373d6ff94e96d] tools/gdb: Add check for tail when checking a queue
git bisect bad c70f3e3f984f1e837d03bca5444373d6ff94e96d
+ [[ 5d86bee5c7102b90a4376e630bd7c3cdf5e8395e == \9\4\a\2\c\e\3\6\4\1\2\1\3\c\c\7\0\2\a\b\c\5\c\1\7\b\0\f\8\1\a\5\0\c\7\1\4\a\2\e ]]
+ [[ 5d86bee5c7102b90a4376e630bd7c3cdf5e8395e == \1\c\f\a\f\f\0\1\1\e\a\5\1\7\8\b\a\3\f\a\f\f\c\1\0\a\3\3\d\9\f\5\2\d\e\8\0\b\f\c ]]
+ [[ 5d86bee5c7102b90a4376e630bd7c3cdf5e8395e == \6\5\a\9\3\e\9\7\2\c\d\c\2\2\4\b\a\e\1\b\4\7\e\e\3\2\9\7\2\7\f\5\1\d\1\8\6\7\9\b ]]
+ [[ 5d86bee5c7102b90a4376e630bd7c3cdf5e8395e == \1\e\2\6\5\a\f\8\e\b\c\9\0\e\d\3\3\5\3\6\1\4\3\0\0\6\4\0\a\b\e\d\a\0\8\a\8\0\b\6 ]]
+ [[ 5d86bee5c7102b90a4376e630bd7c3cdf5e8395e == \c\7\0\f\3\e\3\f\9\8\4\f\1\e\8\3\7\d\0\3\b\c\a\5\4\4\4\3\7\3\d\6\f\f\9\4\e\9\6\d ]]
+ [[ 5d86bee5c7102b90a4376e630bd7c3cdf5e8395e == \5\d\8\6\b\e\e\5\c\7\1\0\2\b\9\0\a\4\3\7\6\e\6\3\0\b\d\7\c\3\c\d\f\5\e\8\3\9\5\e ]]
+ set +x
**** Simulate Error
+ exit 1
Bisecting: 3 revisions left to test after this (roughly 2 steps)
[e7c2e7c5760bc3166192473347ecc71d16255d94] tools/gdb: use remote-register standard
running '/Users/luppy/nuttx-bisect/my-test-script.sh'
--------------------------------------------------------------------------------
Testing Commit e7c2e7c5760bc3166192473347ecc71d16255d94
Running https://github.com/lupyuen/nuttx-bisect/blob/main/my-test-script.sh
Called by https://github.com/lupyuen/nuttx-bisect/blob/main/run.sh
Tue Dec 24 06:57:28 UTC 2024
++ git rev-parse HEAD
+ nuttx_hash=e7c2e7c5760bc3166192473347ecc71d16255d94
+ git status
HEAD detached at e7c2e7c576
You are currently bisecting, started from branch 'master'.
(use "git bisect reset" to get back to the original branch)
nothing to commit, working tree clean
+ TZ=UTC0
+ git --no-pager log -1 --date=format-local:%Y-%m-%dT%H:%M:%S '--format=%cd | %H | %s'
2024-11-23T05:09:16 | e7c2e7c5760bc3166192473347ecc71d16255d94 | tools/gdb: use remote-register standard
+ git bisect log
git bisect start
# status: waiting for both good and bad commits
# good: [6554ed4d668e0c3982aaed8d8fb4b8ae81e5596c] get g_tcbinfo just use elf memory
git bisect good 6554ed4d668e0c3982aaed8d8fb4b8ae81e5596c
# status: waiting for bad commit, 1 good commit known
# bad: [79a1ebb9cd0c13f48a57413fa4bc3950b2cd5e0b] rp23xx: use small lock in arch/arm/src/rp23xx/rp23xx_usbdev.c
git bisect bad 79a1ebb9cd0c13f48a57413fa4bc3950b2cd5e0b
# good: [94a2ce3641213cc702abc5c17b0f81a50c714a2e] tools/gdb: need to switch back to inferior 1
git bisect good 94a2ce3641213cc702abc5c17b0f81a50c714a2e
# bad: [1cfaff011ea5178ba3faffc10a33d9f52de80bfc] esp32s3-devkit/usbmsc: Initializing configuration for USBMSC
git bisect bad 1cfaff011ea5178ba3faffc10a33d9f52de80bfc
# bad: [65a93e972cdc224bae1b47ee329727f51d18679b] tools/gdb: guide user for correct usage of nuttxgdb
git bisect bad 65a93e972cdc224bae1b47ee329727f51d18679b
# bad: [1e265af8ebc90ed3353614300640abeda08a80b6] tools/gdb: add utils.get_tid(tcb)
git bisect bad 1e265af8ebc90ed3353614300640abeda08a80b6
# bad: [c70f3e3f984f1e837d03bca5444373d6ff94e96d] tools/gdb: Add check for tail when checking a queue
git bisect bad c70f3e3f984f1e837d03bca5444373d6ff94e96d
# bad: [5d86bee5c7102b90a4376e630bd7c3cdf5e8395e] tools/gdb: add diagnose commands
git bisect bad 5d86bee5c7102b90a4376e630bd7c3cdf5e8395e
+ [[ e7c2e7c5760bc3166192473347ecc71d16255d94 == \9\4\a\2\c\e\3\6\4\1\2\1\3\c\c\7\0\2\a\b\c\5\c\1\7\b\0\f\8\1\a\5\0\c\7\1\4\a\2\e ]]
+ [[ e7c2e7c5760bc3166192473347ecc71d16255d94 == \1\c\f\a\f\f\0\1\1\e\a\5\1\7\8\b\a\3\f\a\f\f\c\1\0\a\3\3\d\9\f\5\2\d\e\8\0\b\f\c ]]
+ [[ e7c2e7c5760bc3166192473347ecc71d16255d94 == \6\5\a\9\3\e\9\7\2\c\d\c\2\2\4\b\a\e\1\b\4\7\e\e\3\2\9\7\2\7\f\5\1\d\1\8\6\7\9\b ]]
+ [[ e7c2e7c5760bc3166192473347ecc71d16255d94 == \1\e\2\6\5\a\f\8\e\b\c\9\0\e\d\3\3\5\3\6\1\4\3\0\0\6\4\0\a\b\e\d\a\0\8\a\8\0\b\6 ]]
+ [[ e7c2e7c5760bc3166192473347ecc71d16255d94 == \c\7\0\f\3\e\3\f\9\8\4\f\1\e\8\3\7\d\0\3\b\c\a\5\4\4\4\3\7\3\d\6\f\f\9\4\e\9\6\d ]]
+ [[ e7c2e7c5760bc3166192473347ecc71d16255d94 == \5\d\8\6\b\e\e\5\c\7\1\0\2\b\9\0\a\4\3\7\6\e\6\3\0\b\d\7\c\3\c\d\f\5\e\8\3\9\5\e ]]
+ [[ e7c2e7c5760bc3166192473347ecc71d16255d94 == \e\7\c\2\e\7\c\5\7\6\0\b\c\3\1\6\6\1\9\2\4\7\3\3\4\7\e\c\c\7\1\d\1\6\2\5\5\d\9\4 ]]
+ set +x
**** Simulate Error
+ exit 1
Bisecting: 0 revisions left to test after this (roughly 1 step)
[68d47ee8473bad7461e3ce53194afde089f8a033] tools/gdb: init superclass in python3 code style
running '/Users/luppy/nuttx-bisect/my-test-script.sh'
--------------------------------------------------------------------------------
Testing Commit 68d47ee8473bad7461e3ce53194afde089f8a033
Running https://github.com/lupyuen/nuttx-bisect/blob/main/my-test-script.sh
Called by https://github.com/lupyuen/nuttx-bisect/blob/main/run.sh
Tue Dec 24 06:57:29 UTC 2024
++ git rev-parse HEAD
+ nuttx_hash=68d47ee8473bad7461e3ce53194afde089f8a033
+ git status
HEAD detached at 68d47ee847
You are currently bisecting, started from branch 'master'.
(use "git bisect reset" to get back to the original branch)
nothing to commit, working tree clean
+ TZ=UTC0
+ git --no-pager log -1 --date=format-local:%Y-%m-%dT%H:%M:%S '--format=%cd | %H | %s'
2024-11-23T05:09:16 | 68d47ee8473bad7461e3ce53194afde089f8a033 | tools/gdb: init superclass in python3 code style
+ git bisect log
git bisect start
# status: waiting for both good and bad commits
# good: [6554ed4d668e0c3982aaed8d8fb4b8ae81e5596c] get g_tcbinfo just use elf memory
git bisect good 6554ed4d668e0c3982aaed8d8fb4b8ae81e5596c
# status: waiting for bad commit, 1 good commit known
# bad: [79a1ebb9cd0c13f48a57413fa4bc3950b2cd5e0b] rp23xx: use small lock in arch/arm/src/rp23xx/rp23xx_usbdev.c
git bisect bad 79a1ebb9cd0c13f48a57413fa4bc3950b2cd5e0b
# good: [94a2ce3641213cc702abc5c17b0f81a50c714a2e] tools/gdb: need to switch back to inferior 1
git bisect good 94a2ce3641213cc702abc5c17b0f81a50c714a2e
# bad: [1cfaff011ea5178ba3faffc10a33d9f52de80bfc] esp32s3-devkit/usbmsc: Initializing configuration for USBMSC
git bisect bad 1cfaff011ea5178ba3faffc10a33d9f52de80bfc
# bad: [65a93e972cdc224bae1b47ee329727f51d18679b] tools/gdb: guide user for correct usage of nuttxgdb
git bisect bad 65a93e972cdc224bae1b47ee329727f51d18679b
# bad: [1e265af8ebc90ed3353614300640abeda08a80b6] tools/gdb: add utils.get_tid(tcb)
git bisect bad 1e265af8ebc90ed3353614300640abeda08a80b6
# bad: [c70f3e3f984f1e837d03bca5444373d6ff94e96d] tools/gdb: Add check for tail when checking a queue
git bisect bad c70f3e3f984f1e837d03bca5444373d6ff94e96d
# bad: [5d86bee5c7102b90a4376e630bd7c3cdf5e8395e] tools/gdb: add diagnose commands
git bisect bad 5d86bee5c7102b90a4376e630bd7c3cdf5e8395e
# bad: [e7c2e7c5760bc3166192473347ecc71d16255d94] tools/gdb: use remote-register standard
git bisect bad e7c2e7c5760bc3166192473347ecc71d16255d94
+ [[ 68d47ee8473bad7461e3ce53194afde089f8a033 == \9\4\a\2\c\e\3\6\4\1\2\1\3\c\c\7\0\2\a\b\c\5\c\1\7\b\0\f\8\1\a\5\0\c\7\1\4\a\2\e ]]
+ [[ 68d47ee8473bad7461e3ce53194afde089f8a033 == \1\c\f\a\f\f\0\1\1\e\a\5\1\7\8\b\a\3\f\a\f\f\c\1\0\a\3\3\d\9\f\5\2\d\e\8\0\b\f\c ]]
+ [[ 68d47ee8473bad7461e3ce53194afde089f8a033 == \6\5\a\9\3\e\9\7\2\c\d\c\2\2\4\b\a\e\1\b\4\7\e\e\3\2\9\7\2\7\f\5\1\d\1\8\6\7\9\b ]]
+ [[ 68d47ee8473bad7461e3ce53194afde089f8a033 == \1\e\2\6\5\a\f\8\e\b\c\9\0\e\d\3\3\5\3\6\1\4\3\0\0\6\4\0\a\b\e\d\a\0\8\a\8\0\b\6 ]]
+ [[ 68d47ee8473bad7461e3ce53194afde089f8a033 == \c\7\0\f\3\e\3\f\9\8\4\f\1\e\8\3\7\d\0\3\b\c\a\5\4\4\4\3\7\3\d\6\f\f\9\4\e\9\6\d ]]
+ [[ 68d47ee8473bad7461e3ce53194afde089f8a033 == \5\d\8\6\b\e\e\5\c\7\1\0\2\b\9\0\a\4\3\7\6\e\6\3\0\b\d\7\c\3\c\d\f\5\e\8\3\9\5\e ]]
+ [[ 68d47ee8473bad7461e3ce53194afde089f8a033 == \e\7\c\2\e\7\c\5\7\6\0\b\c\3\1\6\6\1\9\2\4\7\3\3\4\7\e\c\c\7\1\d\1\6\2\5\5\d\9\4 ]]
+ [[ 68d47ee8473bad7461e3ce53194afde089f8a033 == \6\8\d\4\7\e\e\8\4\7\3\b\a\d\7\4\6\1\e\3\c\e\5\3\1\9\4\a\f\d\e\0\8\9\f\8\a\0\3\3 ]]
+ set +x
**** Simulate Error
+ exit 1
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[74bac565397dea37ebfc3ac0b7b7532737738279] tools/gdb: fix regression on older version of GDB
running '/Users/luppy/nuttx-bisect/my-test-script.sh'
--------------------------------------------------------------------------------
Testing Commit 74bac565397dea37ebfc3ac0b7b7532737738279
Running https://github.com/lupyuen/nuttx-bisect/blob/main/my-test-script.sh
Called by https://github.com/lupyuen/nuttx-bisect/blob/main/run.sh
Tue Dec 24 06:57:29 UTC 2024
++ git rev-parse HEAD
+ nuttx_hash=74bac565397dea37ebfc3ac0b7b7532737738279
+ git status
HEAD detached at 74bac56539
You are currently bisecting, started from branch 'master'.
(use "git bisect reset" to get back to the original branch)
nothing to commit, working tree clean
+ TZ=UTC0
+ git --no-pager log -1 --date=format-local:%Y-%m-%dT%H:%M:%S '--format=%cd | %H | %s'
2024-11-23T05:09:16 | 74bac565397dea37ebfc3ac0b7b7532737738279 | tools/gdb: fix regression on older version of GDB
+ git bisect log
git bisect start
# status: waiting for both good and bad commits
# good: [6554ed4d668e0c3982aaed8d8fb4b8ae81e5596c] get g_tcbinfo just use elf memory
git bisect good 6554ed4d668e0c3982aaed8d8fb4b8ae81e5596c
# status: waiting for bad commit, 1 good commit known
# bad: [79a1ebb9cd0c13f48a57413fa4bc3950b2cd5e0b] rp23xx: use small lock in arch/arm/src/rp23xx/rp23xx_usbdev.c
git bisect bad 79a1ebb9cd0c13f48a57413fa4bc3950b2cd5e0b
# good: [94a2ce3641213cc702abc5c17b0f81a50c714a2e] tools/gdb: need to switch back to inferior 1
git bisect good 94a2ce3641213cc702abc5c17b0f81a50c714a2e
# bad: [1cfaff011ea5178ba3faffc10a33d9f52de80bfc] esp32s3-devkit/usbmsc: Initializing configuration for USBMSC
git bisect bad 1cfaff011ea5178ba3faffc10a33d9f52de80bfc
# bad: [65a93e972cdc224bae1b47ee329727f51d18679b] tools/gdb: guide user for correct usage of nuttxgdb
git bisect bad 65a93e972cdc224bae1b47ee329727f51d18679b
# bad: [1e265af8ebc90ed3353614300640abeda08a80b6] tools/gdb: add utils.get_tid(tcb)
git bisect bad 1e265af8ebc90ed3353614300640abeda08a80b6
# bad: [c70f3e3f984f1e837d03bca5444373d6ff94e96d] tools/gdb: Add check for tail when checking a queue
git bisect bad c70f3e3f984f1e837d03bca5444373d6ff94e96d
# bad: [5d86bee5c7102b90a4376e630bd7c3cdf5e8395e] tools/gdb: add diagnose commands
git bisect bad 5d86bee5c7102b90a4376e630bd7c3cdf5e8395e
# bad: [e7c2e7c5760bc3166192473347ecc71d16255d94] tools/gdb: use remote-register standard
git bisect bad e7c2e7c5760bc3166192473347ecc71d16255d94
# bad: [68d47ee8473bad7461e3ce53194afde089f8a033] tools/gdb: init superclass in python3 code style
git bisect bad 68d47ee8473bad7461e3ce53194afde089f8a033
+ [[ 74bac565397dea37ebfc3ac0b7b7532737738279 == \9\4\a\2\c\e\3\6\4\1\2\1\3\c\c\7\0\2\a\b\c\5\c\1\7\b\0\f\8\1\a\5\0\c\7\1\4\a\2\e ]]
+ [[ 74bac565397dea37ebfc3ac0b7b7532737738279 == \1\c\f\a\f\f\0\1\1\e\a\5\1\7\8\b\a\3\f\a\f\f\c\1\0\a\3\3\d\9\f\5\2\d\e\8\0\b\f\c ]]
+ [[ 74bac565397dea37ebfc3ac0b7b7532737738279 == \6\5\a\9\3\e\9\7\2\c\d\c\2\2\4\b\a\e\1\b\4\7\e\e\3\2\9\7\2\7\f\5\1\d\1\8\6\7\9\b ]]
+ [[ 74bac565397dea37ebfc3ac0b7b7532737738279 == \1\e\2\6\5\a\f\8\e\b\c\9\0\e\d\3\3\5\3\6\1\4\3\0\0\6\4\0\a\b\e\d\a\0\8\a\8\0\b\6 ]]
+ [[ 74bac565397dea37ebfc3ac0b7b7532737738279 == \c\7\0\f\3\e\3\f\9\8\4\f\1\e\8\3\7\d\0\3\b\c\a\5\4\4\4\3\7\3\d\6\f\f\9\4\e\9\6\d ]]
+ [[ 74bac565397dea37ebfc3ac0b7b7532737738279 == \5\d\8\6\b\e\e\5\c\7\1\0\2\b\9\0\a\4\3\7\6\e\6\3\0\b\d\7\c\3\c\d\f\5\e\8\3\9\5\e ]]
+ [[ 74bac565397dea37ebfc3ac0b7b7532737738279 == \e\7\c\2\e\7\c\5\7\6\0\b\c\3\1\6\6\1\9\2\4\7\3\3\4\7\e\c\c\7\1\d\1\6\2\5\5\d\9\4 ]]
+ [[ 74bac565397dea37ebfc3ac0b7b7532737738279 == \6\8\d\4\7\e\e\8\4\7\3\b\a\d\7\4\6\1\e\3\c\e\5\3\1\9\4\a\f\d\e\0\8\9\f\8\a\0\3\3 ]]
+ [[ 74bac565397dea37ebfc3ac0b7b7532737738279 == \7\4\b\a\c\5\6\5\3\9\7\d\e\a\3\7\e\b\f\c\3\a\c\0\b\7\b\7\5\3\2\7\3\7\7\3\8\2\7\9 ]]
+ set +x
**** Simulate Error
+ exit 1
74bac565397dea37ebfc3ac0b7b7532737738279 is the first bad commit
commit 74bac565397dea37ebfc3ac0b7b7532737738279
Author: xuxingliang <xuxingliang@xiaomi.com>
Date: Mon Sep 16 21:21:15 2024 +0800
tools/gdb: fix regression on older version of GDB
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
tools/gdb/gcore.py | 11 +++++++++--
tools/gdb/memdump.py | 28 ++++++++++++++--------------
tools/gdb/net.py | 2 +-
tools/gdb/utils.py | 10 ++++++++--
4 files changed, 32 insertions(+), 19 deletions(-)
bisect found first bad commit%
➜ nuttx git:(74bac56539) $
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment